groups claim that emits full group paths, administrator and user groups, and a Kubernetes Secret containing the client secret.
Inputs
Choose these values before configuring Keycloak: UsedeploymentUrl from the hub values file. It already includes the scheme, so it can be https://... or http://.... The Keycloak issuer URL must be reachable from browsers and from hub pods. The callback URL must match the redirect URI configured on the Keycloak client exactly.
Choose The Realm
Choose the Keycloak realm that will own Metoro access. The realm name becomes the final path segment in the issuer URL:https://<keycloak-host>/realms/<realm>.
Disable open user registration unless your organization deliberately allows users to create their own Keycloak accounts. Password reset can be enabled if Keycloak is responsible for local user credentials.
Create Groups
Create two Keycloak groups:/metoro-admins and /metoro-users. Those emitted values are what the hub role mappings should use.
Add at least one operator to metoro-admins before the first login test.
Create The Client
Create a Keycloak client for Metoro. Use these client settings:Valid redirect URIs and each logout origin to Valid post logout redirect URIs. The redirect URL in the hub values file should still match the primary deploymentUrl.
After saving the client, open the client credentials tab and copy the generated client secret.
Expose The Groups Claim
Configure Keycloak so the hub receives group membership in the token and userinfo response. The hub values requestopenid profile email groups, so the Keycloak client must be allowed to request the groups scope and Keycloak must emit a token claim named groups.
Use a shared groups client scope when you want the setup to match the requested groups OIDC scope.
- In Keycloak, open Client scopes.
- Open the existing
groupsclient scope, or create one with protocolOpenID Connect. - Open Mappers.
- Click Add mapper, then By configuration.
- Select Group Membership.
- Save the mapper with these settings:
groups client scope to the metoro client:
- Open Clients.
- Select the
metoroclient. - Open Client scopes.
- Click Add client scope.
- Select
groups. - Add it as a Default client scope.
openid profile email groups; Keycloak should then include a groups claim containing full group paths such as /metoro-admins.
If you only want this mapper on the metoro client, add it through the client’s dedicated scope instead of a shared groups scope:
- Open Clients.
- Select the
metoroclient. - Open Client scopes.
- Select the dedicated scope, usually named
metoro-dedicated. - Open Mappers.
- Click Add mapper, then By configuration.
- Select Group Membership and use the same mapper settings above.
groups client scope assigned to the client when the hub requests the groups scope. The mapper can live on the dedicated scope, but the requested OIDC scope still needs to be accepted by the client.