What is Hashicorp Vault ?
HashiCorp Vault is an identity-based secrets and encryption management system. A secret is anything that you want to tightly control access to, such as API encryption keys, passwords, and certificates. Vault provides encryption services that are gated by authentication and authorization methods.
What is the use of secrets ?
In the micro services world our containers were need to be secured, they should not contain secrets to avoid this tools like Hashicorp vault is used for the storing the secretes like Database credentials.
First navigate to vault GUI where we have the vault namespace tab, select the appropriate namespace. Then click on Secrets under the secrets engine you will get “Enable new engine” option to the right corner highlights in the snap shot.
Enable a secrets Engine.
Once you have clicked the enable engine you will get the options like generic and cloud so select `kv` under the generic like shown below in the image.
Under Generic KV option
Under kv provide the path and the name of the secrets then click on create new version and add the password and user ID in key and value format like given below.
You can provide JSON format as well as shown in the screen shot.
Now once the credentials has been added we are ready to use our credentials for DB connections. For more information on Hashicorp vault please visit the website.