feat: map broker claims to realm roles
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Google claim-to-role mapping
|
||||
|
||||
`hd=example.test`인 upstream OIDC identity에는 Keycloak realm role
|
||||
`employee-role`을 부여한다. 매핑 키는 email이 아니라 Google subject이며,
|
||||
role 조건에 쓰는 `hd` claim은 mock provider와 실제 Google provider에서 같은
|
||||
계약을 사용한다.
|
||||
|
||||
Realm import는 `oidc-role-idp-mapper`를 선언한다. 실제 Google 설정 스크립트도
|
||||
같은 mapper를 upsert한다. 따라서 재실행해도 mapper가 중복되지 않는다.
|
||||
|
||||
검증:
|
||||
|
||||
```sh
|
||||
./scripts/verify-google-claim-to-role.sh
|
||||
```
|
||||
|
||||
검증기는 mock Google 로그인, Authorization Code + PKCE 교환, 최종 Keycloak
|
||||
access token의 `realm_access.roles`를 차례로 확인한다.
|
||||
Reference in New Issue
Block a user