hsheinblatt opened a new pull request, #1377: URL: https://github.com/apache/knox/pull/1377
KNOX-3434 - Allow missing typ when validating JWTs from TrustedOidcIssuers for token exchange. ## What changes were proposed in this pull request? External trusted OIDC issuer tokens do not always have a typ header. In particular, Kubernetes projected service account tokens do not. Change AbstractJWTFilter so that RFC 8693 token exchange JWT validations for JWTs from TrustedOidcIssuers allow a missing typ. This avoids having to dynamically update the list of issuers for which to skip type verification separately from the trusted OIDC issuer registration, and restricts the use case to only token exchange for externally trusted issuers. ## How was this patch tested? A new unit test was added to show that when a JWT is validated for token exchange and signature validation is to use a registered TrustedOidcIssuer, the typ verifier used allows a missing typ. There were no typ validation unit tests, so two regression tests were added to show that for statically defined JWKS validation and for non-token exchange validation, the existing typ validation continues to be enforced. ## Integration Tests No integration tests are added in this pull request. They will be added once the full delegation enforcement flow is wired in a later task. ## UI changes N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
