OpenBao SSO with Keycloak (OIDC)
Authenticate human operators to OpenBao through a Keycloak realm and grant access via OpenBao policies.
Last updated
On this page (5)
OpenBao · Keycloak · OIDC
Before you start
- OpenBao operator allowed to manage auth mounts and policies.
- Keycloak realm administrator and HTTPS issuer.
Configure sign-in
- Create a Keycloak confidential OIDC client with Standard Flow, and register the OpenBao UI and CLI callbacks you intend to use.
- Enable the oidc auth mount and set oidc_discovery_url to the realm base URL, not the discovery document; configure the client ID and secret.
- Create an OIDC role using sub as user_claim; allow only the registered redirects and attach minimal policies.
Verify the result
- Test UI and bao login -method=oidc if both callbacks are enabled.
- Verify an authenticated test user cannot read a secret outside their policy.
