-
Notifications
You must be signed in to change notification settings - Fork 0
Implement access token context encoding framework #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature-token-context-baseline
Are you sure you want to change the base?
Implement access token context encoding framework #67
Conversation
closes #37118 Signed-off-by: mposolda <[email protected]>
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @akshayutture-augment's task —— View job Code Review: Access Token Context Encoding FrameworkI've completed a thorough review of this PR implementing an access token context encoding framework. The implementation introduces a new SPI to encode contextual information (session type, token type, and grant type) directly into access token IDs. Overall, the architecture is well-designed, but I've identified several critical bugs and areas for improvement. 🐛 Critical Issues1. Wrong parameter validation in AccessTokenContext constructor (services/src/main/java/org/keycloak/protocol/oidc/encode/AccessTokenContext.java:73)Objects.requireNonNull(grantType, "Null rawTokenId not allowed");Issue: Line 73 validates Fix: Change line 73 to: Objects.requireNonNull(rawTokenId, "Null rawTokenId not allowed");2. Visibility mismatch in factory fields (services/src/main/java/org/keycloak/protocol/oidc/encode/DefaultTokenContextEncoderProviderFactory.java:41-42)Map<String, String> grantsByShortcuts;
Map<String, String> grantsToShortcuts;Issue: These fields are package-private while similar maps (lines 39-40) are private. This inconsistent visibility creates potential for accidental modification and violates encapsulation. Recommendation: Make these fields
|
Test 8
Replicated from ai-code-review-evaluation/keycloak-greptile#8