Hashicorp Vault 101: Creating your first secret in Vault UI

Chris Edward Rego
2 min readSep 16, 2021

--

Hashicorp Vault 101 is a series of posts that is aimed towards becoming a zero to hero in Vault.

Running Vault on your local machine

Once we have installed Vault on your local machine, we already blog mentioning the details on installing it on an Ubuntu 18.04 machine.

Vault can be run in two different modes.

  1. Dev Mode
  2. Normal Mode

Dev Mode

For the sake of simplicity, we would be running vault in Dev Mode as the name suggests it’s inclined towards running the Vault in the Development or Local Testing Environment.

Dev Mode is less secure and only used for local testing also all the data stored is in-memory so once we stop the vault process all data is gone. It’s recommended not to run Vault in Dev mode in the Production environment.

In order to run vault in development mode use the following command

vault server -dev

Open ‘http://127.0.0.1:8200' in your browser & type the root token.

Adding the first secrets

Vault provides the various secret engines to store the secrets, among the simplest & easiest ones is the (KV) key-value secret engine. While running the server in development mode by default, (KV — Key-value secret engine) is mounted on /secrets path

We can interact with Vault from both UI, CLI, or API as well, for the simplicity of this demo, we would using Vault UI to create and access key-value-based secrets.

In this case, we were able to create simple key-value based secret mount on secret/my-app which contains key user and password and the secreets stored under them

--

--

Chris Edward Rego
Chris Edward Rego

Written by Chris Edward Rego

Lead DevSecOps. Talks about Cloud Architecture, DevOps & SRE. For more info check https://www.linkedin.com/in/chrisedrego/

No responses yet