Skip to content

jwt_authn: return a valid error message for require_any#10385

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
qiwzhang:fix_jwt_error
Mar 18, 2020
Merged

jwt_authn: return a valid error message for require_any#10385
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
qiwzhang:fix_jwt_error

Conversation

@qiwzhang
Copy link
Contributor

Signed-off-by: Wayne Zhang qiwzhang@google.com

Description:
In a RequireAny requirement, jwt_authn filter will iterate all these requirements one by one until one is successfully verified or all of them have been tested. If all of them failed, filter will return the last error. But a particular error is misleading, when a JWT is not indented for a provider, its error is either JwtMissed or JwtUnknownIssuer. The bug occurs when a provider returns a valid error but the last provider returns JwtMissed, the filter will return JwtMissed instead of the valid error.

Changes: remember the last valid error for RequireAny object, and return it for the failure case.

Risk Level: None
Testing: unit-tested
Docs Changes: None

Signed-off-by: Wayne Zhang <qiwzhang@google.com>
@lizan
Copy link
Member

lizan commented Mar 17, 2020

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: coverage (failed build)

🐱

Caused by: a #10385 (comment) was created by @lizan.

see: more, trace.

@mattklein123 mattklein123 merged commit fca28f0 into envoyproxy:master Mar 18, 2020
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.

4 participants