How to Create Roles with Specific Permissions in Keycloak?

Hi everyone,

I’m trying to configure roles in Keycloak where each role has specific permissions assigned to it. For example:

  • Role1 → Permission1, Permission2
  • Role2 → Permission2, Permission3

I want to know the best approach to achieve this in Keycloak. Should I use composite roles, client scopes, or is there another recommended way to manage role-permission mappings?

Any guidance or best practices would be greatly appreciated!

Thanks in advance.

If you enable “Authorization” for a client, there is a capability to create permissions and policies for your resource beyond the Role Based Access Control.