Skip to content

backport to 1.17: jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case#15199

Merged
lizan merged 1 commit intoenvoyproxy:release/v1.17from
asraa:saved-jwt-allow-missing-bug-backport
Feb 26, 2021
Merged

backport to 1.17: jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case#15199
lizan merged 1 commit intoenvoyproxy:release/v1.17from
asraa:saved-jwt-allow-missing-bug-backport

Conversation

@asraa
Copy link
Contributor

@asraa asraa commented Feb 25, 2021

Signed-off-by: Asra Ali asraa@google.com

When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT.

This change fixed the above issue by preserving JwtUnknownIssuer in allow_missing case.

Change details:

JwtUnkownIssuer error got converted to JwtMissing in error aggregation inside VerifyAny object. This is the root cause. Such conversion is not needed.
Fix is to preserve JwtUknownIssuer in the error aggregation.
Risk Level: Low
Testing: unit-tested
Docs Changes: N/A
Release Notes: Yes

Backport of #15194

Signed-off-by: Asra Ali <asraa@google.com>
@asraa asraa requested a review from lizan as a code owner February 25, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants