prerequisite: start ppdm-1
We first refresh 0499 from github:
git -C ~/workspace/0499 pull
Now we start keycloak using podman
cd ~/workspace/0499/lab6/keycloak
podman-compose up -d
username: admin password: Password123!
htttp://ansible.demo.local:8180/auth/admin,
username: admin
password: Password123!ppdm-realm) → click Create
Check Default Signature Algorithm to RS256
Navigate to Clients → click Create
ppdm-clientopenid-connectClient for PPDM| Field | Value |
|---|---|
| Client authentication | ON |
| Standard Flow Enabled | ON |
| Standard Token Exchange | ON |
| Service Accounts Enabled | ON |
| Field | Value |
|---|---|
| Root URL | hhttps://ppdm-1.demo.local |
| Valid Redirect URIs | will be filled when ppdm IDP is configured |
| Web Origins | https://ppdm-1.demo.local |
Click Save.
ppdm-adminppdm-userppdm-restoreUsername (this becomes preferred_username in the token): ppdm-admin
on Join Groups, select ppdm-admin
On the client, go to the RClient scopes tab → click ppdm-client-dedicted
Configure the following new Mappers
Mapper Type: Group Membership
| Field | Value |
|—|—|
| Name | groups |
| Token Claim Name | groups |
| Full group path | OFF |
| Add to ID token | ON |
| Add to access token | ON |
| Add to userinfo | ON |
Click Save
Mapper Type: User Property
| Field | Value |
|—|—|
| Name | preferred_username |
| Property | username |
| Token Claim Name | preferred_username |
| Claim JSON Type | String |
| Add to ID token | ON |
| Add to access token | ON |
Click Save
Confirm Keycloak is publishing metadata correctly by browsing to:
http://ansible.demo.local:8180/realms/ppdm-realm/.well-known/openid-configuration
This URL is what you will supply as the Auto Config URI when registering the OIDC provider in PPDM.
Fill in the required fields:
| Field | Value |
|—|—|
| Name | Keycloak |
| Identity Provider | Okta |
| Field | Value |
|—|—|
| Client ID | ppdm-client |
| Client Secret | <secret from Step 5> |
| Meta Discovery URL | http://ansible.demo.local:8180/realms/ppdm-realm/.well-known/openid-configuration |
preferred_username | user_name |
| email | email |
| groups | `groups |
Select AD/LDAP/SSO Groups /Keycloak /ppdm-admin
Administrator as PPDM role:
| # | Task | Done? |
|---|---|---|
| 1 | Create Keycloak realm | ☐ |
| 2 | Set RS256 as default signing algorithm | ☐ |
| 3 | Create confidential OIDC client | ☐ |
| 4 | Set valid redirect URI to PPDM callback | ☐ |
| 5 | Copy client secret | ☐ |
| 6 | Create groups for PPDM roles | ☐ |
| 7 | Create users, assign to groups | ☐ |
| 8 | Add groups and preferred_username mappers | ☐ |
| 9 | Verify well-known OIDC endpoint | ☐ |
| 10 | Register Keycloak as OIDC provider in PPDM UI | ☐ |
| 11 | Map Keycloak groups to PPDM roles in PPDM UI | ☐ |