[
https://issues.apache.org/jira/browse/KNOX-3434?focusedWorklogId=1039536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1039536
]
ASF GitHub Bot logged work on KNOX-3434:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Sep/26 21:01
Start Date: 03/Sep/26 21:01
Worklog Time Spent: 10m
Work Description: 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
Issue Time Tracking
-------------------
Worklog Id: (was: 1039536)
Remaining Estimate: 0h
Time Spent: 10m
> Token validation for oidc trusted issuers skips typ validation so k8s
> projected tokens can be used
> --------------------------------------------------------------------------------------------------
>
> Key: KNOX-3434
> URL: https://issues.apache.org/jira/browse/KNOX-3434
> Project: Apache Knox
> Issue Type: Task
> Components: JWT
> Reporter: Harrison Sheinblatt
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently all tokens are validated with a commonly configured type verifier.
> k8s projected tokens do not include a typ header, and so would fail
> verification. When token verification uses a TrustedOidcIssuer, registered as
> an external issuer, then skip typ validation. This will allow k8s projected
> tokens to be verified.
> In the future, if other types of external issuers are to be registered, the
> schema for the trusted issuer can be extended to include a flag controlling
> if typ verification is to be skipped, or optionally which verifier to use.
> But for now, this avoids having to dynamically update the list of issuers for
> which to skip type verification separately from the trusted oidc issuer
> registration.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)