Set up OpenBao with Keycloak as the identity provider. Create a non-root admin user capable of managing policies, auth methods, and secret engines, while avoiding the root token.








Login via UI as root to the namespace to be used by your organisation. Create one if not done yet:





Now refresh the page to login to that namespace:




You now arrived at the actual config screen:

But from here we'll use the cli.

Configure the oidc settings:
bao write auth/oidc/config \
oidc_discovery_url="https://<keycloak-host>/realms/<realm>" \
oidc_client_id="openbao" \
oidc_client_secret="<client-secret>" \
default_role="default"
And that is (almost) it.
In the web-UI:





Of course you could slso just create an .hcl file and simply upload that here as file.
path "*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
path "sys/*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
path "auth/*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
path "sys/policies/*" {
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
bao write auth/oidc/role/openbao-admin \
allowed_redirect_uris="https://<openbao-host>/ui/oidc/callback" \
user_claim="preferred_username" \
groups_claim="groups" \
bound_claims='{"groups":["openbao-admins"]}' \
policies="admin" \
ttl="1h"