SITE needs some custom roles in the token for the gov and non-gov users so that they can control certain permissions on their side.
This can be met with IDP mappers in keycloak (PS the POC done here)
This will essentially add a group to anyone who logs in with IDP (BCSC, BCeID or IDIR) and the group can map multiple realm roles OR client roles. We will use client roles in this case so that those roles wont be visible for other apps.
Steps
- Create client role on client site-web: role name , description <...>.

- Create group and map the client role to it (Groups → group → Role Mappings → Client Roles → assign).
- Add IDP mapper on IDP :
- Mapper type: Hardcoded Group
- Group:
- Add client role mapper to the client with claim name (such as sites_roles)
SITE needs some custom roles in the token for the gov and non-gov users so that they can control certain permissions on their side.
This can be met with IDP mappers in keycloak (PS the POC done here)
This will essentially add a group to anyone who logs in with IDP (BCSC, BCeID or IDIR) and the group can map multiple realm roles OR client roles. We will use client roles in this case so that those roles wont be visible for other apps.
Steps