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
Workflow grant step can select the wrong client role #55468
A workflow "grant role" step can grant a different client role from the one it is configured with. The step's role setting has the form <clientId>/<roleName>. Keycloak splits this value at every / and uses only the first segment after the client ID as the role name. When a client role name contains / (for example admin/child), the rest of the name is dropped and the step grants the prefix role (admin) instead. How much this matters depends on the permissions of the role that is wrongly granted. Configuring the step requires permission to author workflows.
The step grants exactly the configured client role, including role names that contain /, or it rejects a role reference it cannot resolve unambiguously.
Actual behavior
The step is configured with role-collision-client/admin/child. When the workflow runs, the user receives the client role admin, and admin/child is not assigned.
Anything else?
Related: #50989 (role matching in workflow events).
This issue was originally tracked in the private repository. Migrated by @ssilvert.
Activity
Fix workflow grant/revoke role step selecting the wrong client role