mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
website: quickstart for generic
This commit is contained in:
@@ -17,4 +17,31 @@ via the `secret/` prefix that Vault mounts by default.
|
||||
|
||||
## Quick Start
|
||||
|
||||
TODO
|
||||
The generic backend allows for writing keys with arbitrary values. The
|
||||
only value that special is the `lease` key, which can be provided with
|
||||
any key to restrict the lease time of the secret. This is useful to ensure
|
||||
clients periodically renew so that key rolling can be time bounded.
|
||||
|
||||
As an example, we can write a new key "foo" to the generic backend
|
||||
mounted at "secret/" by default:
|
||||
|
||||
```
|
||||
$ vault write secret/foo zip=zap lease=1h
|
||||
Success! Data written to: secret/foo
|
||||
```
|
||||
|
||||
This writes the key with the "zip" field set to "zap" and a one hour lease. We can test
|
||||
this by doing a read:
|
||||
|
||||
```
|
||||
$ vault read secret/foo
|
||||
Key Value
|
||||
lease_id secret/foo/e4514713-d5d9-fb14-4177-97a7f7f64518
|
||||
lease_duration 3600
|
||||
lease 1h
|
||||
zip zap
|
||||
```
|
||||
|
||||
As expected, we get the value previously set back as well as our custom lease.
|
||||
The lease_duration has been set to 3600 seconds, or one hour as specified.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user