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

  1. Create a Keycloak confidential OIDC client with Standard Flow, and register the OpenBao UI and CLI callbacks you intend to use.
  2. 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.
  3. 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.

Official documentation

Have Pilae connect your identity provider

Pilae can deploy OpenBao with your identity provider already connected. We agree the edition, account mapping and access tests with your team before rollout.