KNOX-3432: Advertise RFC 8693 token-exchange grant type in KnoxIDF discovery metadata - #1376
Open
smolnar82 wants to merge 2 commits into
Open
KNOX-3432: Advertise RFC 8693 token-exchange grant type in KnoxIDF discovery metadata#1376smolnar82 wants to merge 2 commits into
smolnar82 wants to merge 2 commits into
Conversation
Test Results 4 files 4 suites 16s ⏱️ Results for commit 7e47f04. ♻️ This comment has been updated with latest results. |
hanicz
approved these changes
Sep 4, 2026
lmccay
requested changes
Sep 4, 2026
lmccay
left a comment
Contributor
There was a problem hiding this comment.
Have only one question on this.
Otherwise, looks good!
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-3432 - Advertise RFC 8693 token-exchange grant type in KnoxIDF discovery metadata
What changes were proposed in this pull request?
KnoxIDF supports OAuth 2.0 Token Exchange (RFC 8693), but its OIDC discovery document (
.well-known/openid-configuration) only listedauthorization_codeandrefresh_tokeningrant_types_supported. Per RFC 8414 §2 that field must list every grant type the server supports, so a spec-compliant reader would wrongly conclude token exchange is unavailable.TOKEN_EXCHANGE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:token-exchange"toKnoxIDFConstants(RFC 8693 §2.1, IANA-registered). Intentionally duplicated fromJWTFederationFilter.TOKEN_EXCHANGErather than shared; it's a fixed standard identifier, and duplicating avoids a module dependency on the JWT federation provider.DiscoveryResourcenow includes this value ingrant_types_supported.How was this patch tested?
DiscoveryResourceMetadataTestto assert the discovery document advertises all three grant types, including the token-exchange URN.mvn -pl gateway-service-knoxidf test -Dtest=DiscoveryResourceMetadataTest: passes.