Logging on to the HashiCorp Vault Server
You must log on to the HashiCorp Vault server to configure and manage the secret engine.
To log on to the HashiCorp Vault server:
Run the following command:
./vault login <VAULT-TOKEN>
Here,
<VAULT-TOKEN>
is the Initial Root Token generated during HashiCorp Vault initialization. Refer to Initializing HashiCorp Vault Server for details.Sample Output:
[root@localhost ~]# ./vault login s.zfr7HMDO1Hct6Nf7fv5SsjZ7 Success! You are now authenticated. The token information displayed below is already stored in the token helper. You do NOT need to run "vault login" again. Future Vault requests will automatically use this token. Key Value --- ----- token s.zfr7HMDO1Hct6Nf7fv5SsjZ7 token_accessor qArkSqZsmXe7v5DQP82Xk06V token_duration ∞ token_renewable false token_policies ["root"] identity_policies [] policies ["root"]
You are logged on to the HashiCorp Vault server. Now, you can write a simple object store.
Execute the following command.
./vault write secret/hello value=world
Sample Output:
Success! Data written to: secret/hello