bcgov / bcgov/entity

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

Open
#34,745 0 comments 0 reactions 1 assignee Claimed by @sumesh85 View on GitHub
Pay
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

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](https://dev.loginproxy.gov.bc.ca/auth/admin/bcregistry/console/#/bcregistry/identity-providers/oidc/bcsc/mappers/afa6ec77-61ff-4f9b-b3f9-3bdbe6fce3e2))

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

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.