Skip to content

extensions: make jwt_authn filter token-parsing more flexible (#6355)#6384

Merged
lizan merged 23 commits intoenvoyproxy:masterfrom
larrywest:issue_6355-jwt_authn-token_parsing
Apr 8, 2019
Merged

extensions: make jwt_authn filter token-parsing more flexible (#6355)#6384
lizan merged 23 commits intoenvoyproxy:masterfrom
larrywest:issue_6355-jwt_authn-token_parsing

Conversation

@larrywest
Copy link
Contributor

@larrywest larrywest commented Mar 26, 2019

Description: modifies jwt_authn filter's ExtractorImpl extract method to use the from_headers's value_prefix tag more precisely, allowing syntax like "tag=<JWT>,other=xxx" rather than simply taking the remainder of the string as the JWT candidate.

See Issue #6355 for full description. Should be backwards-compatible with existing uses of jwt_authn.

Risk Level: Medium (scope: affects JWT authentication)

Testing: Unit testing was added to test/.../jwt_authn/extractor_test.cc. Since Extractor itself does not validate the JWT, only the parsing is tested.

Docs Changes: see "Further header options" section added to api/envoy/config/filter/http/jwt_authn/v2alpha/README.md

Release Notes:

Adds enhancement per Issue #6355, so that deployments can use a wider variety of HTTP header syntaxes to pass JWTs and have them authenticated by the jwt_authn filter. Backwards-compatible with existing usage.

JWT authentication with the jwt_authn HTTP filter now permits header syntax like the following:

Authorization: Bespoke jwt=eyJhbGciOiJS...ZFnFIw,extra=7,realm=123

Loading
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