For ones who happy after production Hashicorp Vault deploy and a little confused about what to do next ... because all youtube and article guides are happyending on vault deploy.
Here the plan:
-
Use your root token you've got after
vault init
to login the Vault:
$ vault login <root token here>
Create base policies with different permissions (admin, provisioner) And write them down
-
Generate tokens for each policy
$ vault token create -policy="admin" $ vault token create -policy="provisioner"
-
Create and attach kv storage engine
$ vault secrets enable -path=secret kv-v2
-
Login under you "provisioner" user and check secret creation
$ vault login <provisioner token here> $ vault kv put secret/foo bar=baz Key Value --- ----- created_time 2020-07-14T15:41:52.080464762Z deletion_time n/a destroyed false version 1
-
Now you can get the key! 💥🍾🎉
$ vault kv get secret/foo ====== Metadata ====== Key Value --- ----- created_time 2020-07-14T15:41:52.080464762Z deletion_time n/a destroyed false version 1 === Data === Key Value --- ----- bar baz
Top comments (0)