KNOX-3434 - Allow missing typ when validating JWTs from TrustedOidcIssuers for token exchange. - #1377
Merged
Merged
Conversation
Test Results 4 files 4 suites 16s ⏱️ Results for commit 1317a73. |
smolnar82
self-requested a review
September 5, 2026 07:54
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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