Skip to content

KNOX-3434 - Allow missing typ when validating JWTs from TrustedOidcIssuers for token exchange. - #1377

Merged
lmccay merged 2 commits into
apache:masterfrom
hsheinblatt:KNOX-3434
Sep 4, 2026
Merged

KNOX-3434 - Allow missing typ when validating JWTs from TrustedOidcIssuers for token exchange.#1377
lmccay merged 2 commits into
apache:masterfrom
hsheinblatt:KNOX-3434

Conversation

@hsheinblatt

Copy link
Copy Markdown
Contributor

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

@lmccay lmccay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
+1

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Test Results

  4 files    4 suites   16s ⏱️
 84 tests  84 ✅ 0 💤 0 ❌
102 runs  102 ✅ 0 💤 0 ❌

Results for commit 1317a73.

@lmccay
lmccay merged commit e70fe0f into apache:master Sep 4, 2026
3 checks passed
@smolnar82
smolnar82 self-requested a review September 5, 2026 07:54

@smolnar82 smolnar82 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too.

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