Repository navigation
Conversation
Token exchange is the only grant. Replace the TokenRequest interface with TokenExchangeRequest, drop always-true grant type checks and the unused scope target, and look up issuer aliases without building a map.
The value is always token exchange. Issued tokens no longer contain urn:nais:grant_type, and logs and the token grant metric no longer carry a grant_type attribute.
Run the subject token exchange and chained exchange as one table over external and internal subject tokens, and fold the client credentials and external issuer validation cases into their existing tables.
The target is always an audience client ID. Remove the Target interface and the constant target_type log field.
tronghn
force-pushed
the
refactor/remove_grant_type_and_target
branch
from
November 19, 2026 07:52
f8b9895 to
29cb52d
Compare
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.
Token exchange to an audience client ID is now the only grant and target type, so the abstractions for multiple grants and targets are no longer needed.
TokenRequestandTargetinterfaces withTokenExchangeRequestandClientID. Remove always-true grant type checks and the unused scope target.urn:nais:grant_typeclaim, and remove the constantgrant_typeandtarget_typeattributes from logs and the token grant metric. Update the dashboard to match.jwtpackage.