HashiCorp Vault

Official site no longer had Docker instructions and online tutorials were dodgy, stuck with normal Debian/Ubuntu install.

Certain functionality is not available through the web UI, like getting an approle's Secret ID. You can create a new secret engine, secret, approle and policy in the UI.

CLI commands

To check which authentication backends are enabled:

vault auth list

To list current secret engines are enabled:

vault secrets list

To get information about a kv secret contabo4 that was created via the web UI, do:

vault kv get kv/contabo4

That will show:

== Secret Path ==
kv/data/contabo4

Along with the secret info.

Don't create approle from the web UI as that doesn't appear in the CLI, and approle created in the CLI doesn't appear in the web UI. Instead, create approle from CLI:

Create new approle woodpecker that has the woodpecker-contabo policy:

vault write auth/approle/role/woodpecker token_policies="woodpecker-contabo" token_ttl=10m token_max_ttl=1h

Note that that will not display in the UI.

View the approle info:

vault read auth/approle/role/woodpecker

Get its Role ID:

vault read auth/approle/role/woodpecker/role-id

Generate a secret ID for that approle:

vault write -f auth/approle/role/woodpecker/secret-id