githubEdit

OpenBao/Vault

Requirementes

The dynamic provider credential setup in OpenBao/Vault can be found inside the following link:

https://github.com/AzBuilder/terrakube/tree/main/dynamic-credential-setup/openbao-vaultarrow-up-right

circle-exclamation

Make sure to mount your public and private key to the API container as explained herearrow-up-right

circle-info

Mare sure the private key is in "pkcs8" format

Validate the following terrakube api endpoints are working:

Setup OpenBao/Vault

Running openbao in development mode

bao server -dev -dev-root-token-id="dev-only-token" 

Use the following openbao policy

# Allow tokens to query themselves
path "auth/token/lookup-self" {
  capabilities = ["read"]
}

# Allow tokens to renew themselves
path "auth/token/renew-self" {
  capabilities = ["update"]
}

# Allow tokens to revoke themselves
path "auth/token/revoke-self" {
  capabilities = ["update"]
}

# Configure the actual secrets the token should have access to
path "shared/data/kv/creds" {
  capabilities = ["read"]
}

JWT Role

Adding test values, policy and jwt role to openbao with the following:

At the workspace level we need to define the following environment variables:

Example:

Now running cli driven workflow with the following terraform code to test

It will show the following:

Last updated

Was this helpful?