Menu

1 / 5

Kapitan refs in OpenBao: CI and pods reveal without a gpg key

DEV Community: kubernetes·Moep90·about 7 hours ago
#gyUTvYje
#devtokubernetes#devto#dev#ref#target
Long article (2597 words) — no AI summary yet.
Reading 0:00
15s threshold

A Kapitan ref of the gpg backend

is a value encrypted for one or more gpg keys and committed under

refs/ . Whoever reveals it needs the private key of one of those

recipients. On the workstation of the person who owns the key, that is

fine. A CI job that deploys, or a workload in the cluster that renders

manifests, needs a copy of a private key, and every copy decrypts every

ref encrypted for that key, the ones in the Git history included.

Kapitan's vaultkv backend moves the value out of the repository. The

ref file names a path and a key in a key-value store with Vault's API,

and a reveal reads the value from there with a token. OpenBao, the fork

of Vault under the MPL-2.0 license, has that API. Each consumer logs in

to OpenBao as itself: a CI job with an AppRole, a pod with its

ServiceAccount token. A policy decides what each of them may read.

This post moves two gpg refs to vaultkv refs and then deletes the gpg

key. The project is

openbao-refs

in kadet-hub/examples.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.