Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the uma_authorization role in Keycloak?

Tags:

oauth

keycloak

The role uma_authorization is apparently created by default in Keycloak. What is this role? Can I safely delete it?

like image 523
Martin01478 Avatar asked Sep 10 '25 21:09

Martin01478


2 Answers

To answer the question, it's for something called User-Managed Access, which Keycloak Supports.

By default, the feature is not enabled - but you can do so by going to Realm Settings > General Tab (the first tab) and toggling it. Since you're likely not using it, you can remove it.

like image 71
Dois Avatar answered Sep 13 '25 11:09

Dois


The uma_protection role grants Protection API endpoints for resource servers that own resources, permissions, policies, etc.

So the client can call e.g. http://${host}:${port}/realms/${realm_name}/authz/protection/resource_set endpoint to query/manage its own resources with the token obtained using the client credentials flow.

This role is automatically granted to clients with Authorization enabled. You may see it assigned in "Service account roles" tab in Client details.

So when this role is deleted (or unassigned from the client), the resource servers won't be able to manage its own resources and call other Protection API endpoints and will get the 403 response with body like

{
    "error": "invalid_scope",
    "error_description": "Requires uma_protection scope."
}

However you can still manage resources from inside the keycloak security admin console.

like image 39
Dmitry Polomoshnov Avatar answered Sep 13 '25 10:09

Dmitry Polomoshnov