JwtAuthn: complete padding on forward jwt payload header#14779
JwtAuthn: complete padding on forward jwt payload header#14779lizan merged 5 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Xuyang Tao <taoxuy@google.com>
nareddyt
left a comment
There was a problem hiding this comment.
Nit: This is for base64url encoding, not base64. Please fix the PR description to make this distinction. Padding is always required in base64 but optional in base64url
https://tools.ietf.org/html/rfc4648#section-5
https://tools.ietf.org/html/rfc4648#section-3.2
Hi Teju, I believe padding is optional all the base-N encoding also under the situation when length is known. You can also see envoy has |
Signed-off-by: Xuyang Tao <taoxuy@google.com>
|
@lizan Please take a look, thanks. |
|
/retest |
|
Retrying Azure Pipelines: |
|
@lizan could you please submit it? |
|
@lizan @mattklein123 |
…oyproxy#14779)" This reverts commit 8b0aacc. Signed-off-by: Xuyang Tao <taoxuy@google.com>
…oyproxy#14779)" (envoyproxy#16576) This reverts commit 8b0aacc. Signed-off-by: Xuyang Tao <taoxuy@google.com>
Signed-off-by: Xuyang Tao taoxuy@google.com
Commit Message: add
completePaddingutil in base64 to complete padding if it is missing for base64 encoded binary. Use this util method to add padding for theforward_payload_headerin jwtAuthn filter.Context: although padding is not required by base64 encoding spec, some decode libraries are not robust enough to handle the one without padding
Risk Level: low. This is an enhancement without backward compatible issue.
Testing:done