You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ordinary users can mint trusted UMA permission-ticket claims without uma_protection #55286
The UMA Permission API (the Protection API endpoint that creates permission tickets) does not require the caller to hold the uma_protection role. Any authenticated user holding an access token issued for an authorization-enabled resource-server client can call it. Unlike the other Protection API endpoints, which reject such a token with HTTP 403, this endpoint accepts the request, copies the claims supplied by the caller into a permission ticket, and signs the ticket. When the ticket is later redeemed through the UMA grant, Keycloak places those claims into the policy evaluation context, where claim-based policies, such as regex policies, can use them to grant access to a resource.
In the normal UMA flow, the resource server decides which claims to include in a permission ticket, and the requesting party does not choose them. The reproduction relies on a token issued for the resource-server client, so it does not show exploitation by an arbitrary user through an unrelated client. The weakness is that this endpoint does not apply the same authorization check as the rest of the Protection API, so it accepts claims from callers who are not shown to be the resource server holding a Protection API access token.
Version
main
Expected behavior
The Permission API requires the caller to hold the uma_protection role, consistent with the rest of the Protection API, and rejects other callers with HTTP 403. Only the resource server can add claims to a permission ticket.
Actual behavior
A user token issued for a resource-server client without the uma_protection role is accepted by the Permission API. The request succeeds and returns a signed permission ticket containing a caller-chosen claim, while the same token receives HTTP 403 on the ticket-management endpoint of the same API.
This issue was originally tracked in the private repository. Migrated by @abstractj.
Activity