Hashicorp Vault – Managing Tokens

https://www.vaultproject.io/docs/concepts/tokens.html

vault client:

Creating tokens (Default Lifetime 24 hours):

https://www.amon.cx/blog/managing-all-secrets-with-vault/

vault token-revoke <TokenID>

vault token-create -policy=mypolicy

vault token-create -policy=mypolicy -ttl=”1h”

vault token-create -policy=mypolicy -ttl=”1h” -display-name=“My’s Token”

vault token-create -policy=mypolicy -explicit-max-ttl=”1h”

Requires “brew install” jq first:

VAULT_TOKEN=$(vault token-create -ttl=”1h” -format=json | jq -r ‘.auth’ | jq -r ‘.client_token’)