Keycloak¶
Register the client¶
- Realm → Clients → Create client: type OpenID Connect, client ID
bxp. - Client authentication: On (a confidential client). Standard flow enabled.
- Valid redirect URIs:
https://ca.example.com:8443/v1/oidc/callback. - Credentials tab: copy the client secret to
/etc/bastionxp-ca/oidc-client-secret.
Groups¶
Client → Client scopes → bastionxp-ca-dedicated → Add mapper → By
configuration → Group Membership:
| Field | Value |
|---|---|
| Token Claim Name | groups |
| Full group path | Off |
| Add to ID token | On |
Configuration¶
server:
url: https://ca.example.com:8443
oidc:
issuer: https://keycloak.example.com/realms/<realm>
client_id: bastionxp-ca
client_secret_file: /etc/bastionxp-ca/oidc-client-secret
access:
- groups: [linux-users]
ssh_principals: ["{short_username}"]
- groups: [ca-admins]
admin: true
BastionXP CA's login is tested against a real Keycloak in its test suite.