Skip to content

ENV(SITE) - Add IDP-driven group assignment via Keycloak mappers #34745

Description

@sumesh85

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

  1. Create client role on client site-web: role name , description <...>.

image.png

  1. Create group and map the client role to it (Groups → group → Role Mappings → Client Roles → assign).
  2. Add IDP mapper on IDP :
  • Mapper type: Hardcoded Group
  • Group:
  1. Add client role mapper to the client with claim name (such as sites_roles)

Metadata

Metadata

Assignees

Labels

PayWork for Pay Team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions