Configure role-based access control for brokered users
This guide describes the steps required to implement role-based access control (RBAC) for users logging via identity brokering. In this guide, we use the VSHN SSO as an example. We configure RBAC for the roles we’ve mapped in the role mapping how-to. This guide assumes that you’ve already configured the brokering itself and have configured suitable role mappings.
This page is meant to be growing and doesn’t contain the final configuration at this time. |
For the purpose of this guide, we’ll use the following names, adjust as needed:
Key | Description |
---|---|
|
Foreign Keycloak hostname |
|
The display name of the |
|
Realm within APPUiO IdP |
Prerequisites
-
Installed APPUiO IdP
-
Logged in to APPUiO IdP as Administrator
-
Brokering with id.vshn.net configured
-
Role mappings from claims provided by id.vshn.net configured
Create post-login flow
-
Select realm appuio-cloud in APPUiO IdP.
-
Go to "Authentication" and create a new flow:
Alias = VSHN SSO post-login Description = Check user roles after brokered login via id.vshn.net Top Level Flow Type = generic
-
Add the "Browser Redirect/Refresh" execution to the flow:
-
Add a new sub-flow:
Alias = check user roles VSHN SSO Flow Type = generic
-
Set the sub-flow as
CONDITIONAL
-
Add a "Condition - User Role" execution to the sub-flow (
on the sub-flow) for each role that should have access. For VSHN AG’s APPUiO Cloud configure a "Condition - User Role" execution for both realm rolesvshneer-zone-access
andappuio-zone-access
.Configuration ()Alias = vshneer-access (1) User role = vshneer-zone-access (2) Negate output = On (3)
1 Choose a name that describes the role you’re checking for 2 Select the realm role to check for 3 We negate the output because we want to stop processing conditions if the user trying to log in has the specified role. -
Add a "Deny Access" execution to the sub-flow. This blocks access to all users that have none of the roles configured in the previous step.
-
Mark all the executions in the sub-flow as
REQUIRED
.