Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should I store Vault's Unseal Key and Root Token?

Where should I store the Unseal Key and Root Token for HashiCorp Vault?

The Vault will be used by various members on the team.

like image 334
Atlantic0 Avatar asked Sep 23 '16 09:09

Atlantic0


People also ask

What is unseal key in vault?

Unsealing is the process by which your Vault root key (previously known as master key) is used to decrypt the data encryption key that Vault uses to encrypt all data.

Where is Vault token stored?

By default the Vault CLI provides a built in tool for authenticating with any of the enabled authentication backends. Once authenticated, the CLI will store the generated token on disk in the ~/. vault-token file.


Video Answer


1 Answers

In best-practice usage, you wouldn't be storing a root token - once done with it, it should be revoked.

Root tokens are useful in development but should be extremely carefully guarded in production. In fact, the Vault team recommends that root tokens are only used for just enough initial setup (usually, setting up auth methods and policies necessary to allow administrators to acquire more limited tokens) or in emergencies, and are revoked immediately after they are no longer needed.

If a new root token is needed, the operator generate-root command and associated API endpoint can be used to generate one on-the-fly.

Unseal keys should be distributed amongst trusted people, with nobody having access to more than one of them.

This then requires more than one person to restart vault or to gain root access to it.

The documentation doesn't suggest any good hiding places for the individual unseal keys that I could find - I'd suggest wherever you normally store passwords, ie a password manager.

For day-to-day usage, users can log in using the user/pass or ldap auth backends.

like image 67
Colin Nicholson Avatar answered Sep 24 '22 20:09

Colin Nicholson