#1948

Support OpenBao (and HashiCorp Vault) as an external secrets backend

Openmidego1opened 2d ago

Existing issue

  • I have searched the existing issues and found no duplicate.

Problem or use case

Openship currently stores all secrets (project env vars, provider/runtime credentials, registry and SSH material) in its own database, encrypted with a key derived from BETTER_AUTH_SECRET. There is no way to use an external secrets manager.

Teams that already run OpenBao (the open-source Vault fork) or HashiCorp Vault want a single source of truth for secrets, with central rotation, audit logging, policies and short-lived/dynamic credentials. Right now they have to copy secrets into Openship by hand and keep them in sync, which defeats the purpose.

Proposed solution

Add OpenBao as a secrets provider (Vault-compatible API, so HashiCorp Vault would work too):

  • Connect an OpenBao instance per organization/server: address, namespace, auth method (token, AppRole, ideally Kubernetes/JWT for cluster deploys), optional CA cert.
  • In project/service env vars, allow a value to be a reference instead of plaintext, e.g. bao://kv/data/myapp#DATABASE_URL (KV v2 path + key).
  • Resolve references at deploy/build time and inject them the same way secrets are injected today (runtime env + BuildKit secrets), without persisting the resolved value in Openship's DB.
  • Optional: re-resolve on redeploy / on a schedule to pick up rotated secrets.
  • Optional, later: use OpenBao Transit as the KMS for Openship's own encryption-at-rest key instead of BETTER_AUTH_SECRET.

Alternatives considered

  • Deploy OpenBao as a regular service on Openship and have each app fetch its own secrets at runtime (OpenBao Agent sidecar or API calls). Works, but every app needs custom bootstrap code/auth, and secrets Openship itself needs (build env, registry creds) can't come from OpenBao.
  • Copy secrets into Openship env vars manually. No rotation, no audit trail, two sources of truth.

Additional context

No response

Activity

0

No activity yet.