Files
vault/docs/README.md

1.9 KiB

General Vault Links and Commands

Useful commands

Display the curl equivalent of a Vault CLI command:

vault <any_command> -output-curl-string

The following are equivalent:

curl -s -H "X-Vault-Request: true" -H "X-Vault-Token: $VAULT_TOKEN" "https://vault.koszewscy.waw.pl/v1/auth/userpass/users?list=true"

and

curl -s -X LIST -H "X-Vault-Request: true" -H "X-Vault-Token: $VAULT_TOKEN" https://vault.koszewscy.waw.pl/v1/auth/userpass/users

because the Vault uses non-standard HTTP method LIST for listing resources.

Environment Variables

Environment Variable Purpose (short)
VAULT_ADDR Client/server address (API target)
VAULT_DETAILED Output detailed CLI information
VAULT_FORMAT CLI output format
VAULT_LOG_FORMAT Control logger format (standard/json)
VAULT_LOG_LEVEL Logging level for Vault
VAULT_TOKEN Default Vault token for client auth
VAULT_UNWRAP_TOKEN Pass unwrap tokens to plugin (plugin helper)
VAULT_WRAP_TTL Default wrap TTL for client operations

The list above is a small subset of all available environment variables, that I see most useful. The rest can be found in the ENV_VARS.md file.