Short-lived database credentials solve part of the problem, but an application still needs to authenticate to Vault or OpenBao first. Outside Kubernetes, what can provide that initial trust without baking a reusable secret into the host?
How do you handle the first secret manager login outside Kubernetes?
Answers
On a cloud VM, start by checking whether the secret manager can verify the provider's instance identity. That lets the workload authenticate using an identity supplied by the platform instead of an AppRole SecretID baked into the image.
The authorization policy still matters. Scope the resulting access to the workload and the credentials it actually needs, rather than treating every instance in an account as equivalent.
Reply to this answer
SPIFFE is worth a look if you need an identity approach that spans more than one environment. A system such as SPIRE can issue workload identities that other services can verify, though you'll need a compatible authentication path into your secret manager.
It doesn't make bootstrap disappear. You still have to establish trust in the infrastructure that identifies workloads and issues their credentials.
Reply to this answer
If there's no usable platform identity, a provisioning system can deliver a response-wrapped AppRole SecretID shortly before startup. Deliver the RoleID separately, make the SecretID short-lived and single-use, and have the app exchange it for its own Vault token.
The wrapping token TTL and SecretID TTL are separate settings. This keeps a reusable SecretID out of the image, but the delivery path still needs protection.
Reply to this answer
OIDC or OAuth workload identity may fit if there's an identity provider your workloads can use and the secret manager can validate its tokens. Check how the workload gets its first token, though. Otherwise the bootstrap secret may just have moved to the identity provider.
Reply to this answer
SOPS can keep configuration encrypted in a repository, which is useful for managing static secrets. It doesn't by itself answer how a new host proves who it is or obtains access to the decryption key, so I'd treat it as a storage tool rather than the whole bootstrap solution.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Tavlixo+3w:
CIDR bounds can add a network restriction to AppRole, but an IP address alone isn't a strong workload identity.