OpenBao: what the issuer provides¶
OpenBao trusts the issuer on two auth mounts per namespace, maps the groups claim onto its identity groups by name and signs the certificates sluisctl bao and sluisctl pg/psql request. The contract lives in truvity/openbao docs/integrations/sluis.md. The installation steps are in connect OpenBao.
A change to any item below breaks OpenBao sign-in.
Before you start¶
-
OpenBao can reach
/.well-known/openid-configurationand the key set, both when configured and when keys rotate. -
A mount that pins
jwt_supported_algsnames the algorithm the signing key uses. ES384 is the default, RS256 applies to an RSA key or a pinnedsigning_alg. -
issequals the issuer URL, so a trailing slash on one side refuses every login. -
Every token carries
subandgroups, ID tokens included. Nogroupsscope is needed.
Steps¶
1. Declare two clients¶
clients:
openbao:
kind: exchange
ttl_cap: 15m
requires: [all:openbao:operator, staging:ssh:user, staging:ssh:admin, staging:db:client, ci:release]
openbao-ui:
kind: confidential
secret: openbao-ui-client
redirects: [https://openbao.example/ui/vault/auth/oidc/oidc/callback]
signed_out: [https://openbao.example/ui/]
ttl_cap: 5m
requires: [all:openbao:operator, staging:ssh:user, staging:ssh:admin, staging:db:client]
-
openbaois the audience at thejwt-rosterlogin:sluisctl bao,sluisctl pg/psql,sluisctl token --audience openbaoand CI jobs. Keep its cap short. -
openbao-uiis the web UI sign-in. OpenBao redeems the code, so the secret must reach whatever applies OpenBao's configuration. One redirect serves every namespace. -
Keep the two
requireslists equal, except for groups only jobs hold. Enforce it with a test in the repository that owns the policy. -
Every group OpenBao holds a policy for belongs in
requires, per the naming rule. A missing group is refused at the exchange andsluisctlexits4.
2. Check sluisctl¶
-
baologs in onjwt-rosteras rolerosterwith a token foropenbao.--mount,--login-roleand--audienceoverride them. -
pg/psqlshare that login and make onepki/sign/<role>call over a CSR for an ECDSA P-384 key. No TTL is sent. -
Exit codes:
4refused,5unreachable,2usage (reference).
3. Check CI¶
A job with id-token: write exchanges its GitHub token for openbao, and the ci rules decide its groups (GitHub Actions). The GitHub Action writes kubeconfigs and AWS profiles only. For OpenBao a job runs sluisctl token --audience openbao, or sluisctl bao/pg/psql.
The installation applies policy changes (install).