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-vault
The code will also create a sample workspace with all the require environment variables that can be used to test the functionality using the CLI driven workflow.
Make sure to mount your public and private key to the API container as explained here
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?