Make sure internal claims are filtered out from claim_token and claims from tickets have precedence - #51425
Make sure internal claims are filtered out from claim_token and claims from tickets have precedence#51425pedroigor wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Hardens UMA claim handling against internal-claim spoofing and ensures ticket claims take precedence.
Changes:
- Filters untrusted
kc.*claims. - Merges claims with ticket precedence.
- Adds security and precedence regression tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
EntitlementAPITest.java |
Adds UMA claim security tests. |
PolicyProviderFactory |
Registers the test policy provider. |
ClaimAttributePolicyProvider.java |
Adds claim-based test policy support. |
DefaultEvaluationContext.java |
Initializes and filters context attributes. |
AuthorizationTokenService.java |
Refactors claim handling and precedence. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/ClaimAttributePolicyProvider.java:16
testsuite/DEPRECATED.md:12permits adding bug-fix cases to existing tests but explicitly disallows new files in the deprecated testsuite. Please implement this assertion by extending/reusing an existing provider, or move the regression coverage to the new Test Framework rather than adding this provider file.
public class ClaimAttributePolicyProvider implements PolicyProviderFactory<PolicyRepresentation>, PolicyProvider {
… from tickets have precedence Closes keycloak#51379 Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/ClaimAttributePolicyProvider.java:1
- This adds a new file under the deprecated Arquillian testsuite, which
testsuite/DEPRECATED.md:12explicitly prohibits. Move this regression coverage and its policy provider to the new test framework undertests/, or reuse an existing provider without adding a testsuite file.
package org.keycloak.testsuite.authorization;
Closes #51379