-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make OIDC and JWT authentication work together
Currently, when both OIDC and JWT authentication mechanisms are configured in the same SecurityPolicy, the OIDC is applied first. It ensures the presence of the bearer and refresh tokens in cookies, and adds the Authorisation header to the request. Then JWT is applied, validating the added header. This setup works perfectly for browser requests. However, it blocks requests from clients that provide a valid "Authorization: Bearer..." header (normally non-browser clients). The OIDC mechanism kicks in first and redirects the requests to the login pages because of the missing cookies. Use Envoy Gateway's pass_through_matcher option to skip over the OIDC filter when the request is going to be handled by the JWT filter later.
- Loading branch information
Stephen Robin
committed
Jan 24, 2025
1 parent
25dfe10
commit a834e4d
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters