2019-11-17 04:18:37 +00:00
|
|
|
# safe
|
|
|
|
|
|
|
|
> A CLI to interact with HashiCorp Vault.
|
|
|
|
> More information: <https://github.com/starkandwayne/safe>.
|
|
|
|
|
|
|
|
- Add a safe target:
|
|
|
|
|
|
|
|
`safe target {{vault_addr}} {{target_name}}`
|
|
|
|
|
|
|
|
- Authenticate the CLI client against the Vault server, using an authentication token:
|
|
|
|
|
|
|
|
`safe auth {{authentication_token}}`
|
|
|
|
|
|
|
|
- Print the environment variables describing the current target:
|
|
|
|
|
|
|
|
`safe env`
|
|
|
|
|
|
|
|
- Display a tree hierarchy of all reachable keys for a given path:
|
|
|
|
|
|
|
|
`safe tree {{path}}`
|
|
|
|
|
|
|
|
- Move a secret from one path to another:
|
|
|
|
|
|
|
|
`safe move {{old/path/to/secret}} {{new/path/to/secret}}`
|
|
|
|
|
2021-04-10 20:30:31 +01:00
|
|
|
- Generate a new 2048-bit SSH key-pair and store it:
|
2019-11-17 04:18:37 +00:00
|
|
|
|
|
|
|
`safe ssh {{2048}} {{path/to/secret}}`
|
|
|
|
|
|
|
|
- Set non-sensitive keys for a secret:
|
|
|
|
|
|
|
|
`safe set {{path/to/secret}} {{key}}={{value}}`
|
|
|
|
|
|
|
|
- Set auto-generated password in a secret:
|
|
|
|
|
|
|
|
`safe gen {{path/to/secret}} {{key}}`
|