Skip to content

Keycloak

Register the client

  1. Realm → Clients → Create client: type OpenID Connect, client ID bxp.
  2. Client authentication: On (a confidential client). Standard flow enabled.
  3. Valid redirect URIs: https://ca.example.com:8443/v1/oidc/callback.
  4. 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.