Repository navigation
Reject UMA requests targeting disabled resource server clients - #55493
#55493tkyjovsk wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
No active review issues were identified for the change rejecting UMA authorization requests targeting disabled resource-server clients.
No open issues 🎉
What changed in this PR
This PR addresses #55384 by rejecting UMA authorization requests targeting disabled resource-server clients, preventing issuance of new Requesting Party Tokens (RPTs) for those clients.
Changes:
- Check that the target client is enabled before resolving its resource server; otherwise return HTTP 400 and record an error event.
- Add a regression test that creates a permission ticket, disables the resource server, and verifies that authorization is rejected.
| File | Description |
|---|---|
| tests/base/src/test/java/org/keycloak/tests/authz/services/uma/UmaDisabledResourceServerTest.java | Tests rejection of fresh RPT requests after disabling the target client. |
| services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java | Rejects disabled resource-server clients during UMA authorization. |
Review effort: Balanced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean, well-scoped fix that adds a disabled-client check in getResourceServer() following the same error-handling pattern as the existing null-client and null-resource-server guards. The test covers the key scenario (fresh RPT against a disabled resource server) and follows project conventions.
Signed-off-by: Tomas Kyjovsky <tkyjovsk@ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreported flaky test detected, please review
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.ResetPasswordTest#resetPasswordTwiceInSecondBrowserKeycloak CI - Forms IT (chrome) |
Closes #55384.