- Download and install Vault.
- Configure Vault.
- Configure TCP listeners in the Vault configuration file.
- Start the dev server.
- Verify the server is running.
- Access the Vault UI and modify the default ACL policy.
- (Optional) Restart the dev server if it times out.
Download and install Vault
Refer to the HashiCorp Vault documentation at the following link for instructions on how to download and install the Vault application: https://www.vaultproject.io/docs/installThe second installation option in the preceding link uses a precompiled binary. Download these binaries from https://www.vaultproject.io/downloads
vault command is on your PATH, or you might get an error about Vault not being found.
Shell
Configure Vault
Vault uses documented sane defaults, so you need to set only non-default values in the configuration file. Perform the following steps to configure Vault:1
Run the following command to create the
/etc/vault.d directory:Shell
2
Run the following command to create a Vault configuration file,
vault.hcl:Shell
3
Run the following command to create a unique, non-privileged system user to run Vault:
Shell
4
Run the following command to set the ownership of the
/etc/vault.d directory:Shell
5
Run the following command to set the file permissions:
Shell
Configure TCP listeners
To configure the TCP listener addresses in the Vault configuration file, you must edit the listener stanza, or selection of lines, in thevault.hcl file on your server.
The TCP listener configures Vault to listen on a TCP address and port, as shown in the following example:
None
vault.hcl configuration file (used for demonstration in this guide) shows Vault listening on a private interface, as well as localhost.
You must customize the values defined in the
vault.hcl file for each specific use case (such as IP addresses, ports, and file paths to certificates).None
10.0.5.118 is the IP address of the machine that Vault is installed on, and 8210 is the port on which Vault listens for requests from the KMES Series 3.
Also, ensure that the client certificate common name matches the IP address set in vault.hcl. Otherwise, the KMES Series 3 does not verify the certificates presented by Vault to the KMES.
cluster_address is not defined in the sample
vault.hcl file because this demo uses only a single Vault server.Start the dev server
To start the Vault dev server, run the following command:Shell
You should see output similar to the following example. Notice that Unseal Key and Root Token values display.
Shell
1
Launch a new terminal session.
2
Set the VAULT_ADDR environment variable value by running the following command in the terminal. This configures the Vault client to talk to the dev server.Vault CLI uses the VAULT_ADDR environment variable to determine to which Vault servers to send requests.
Shell
3
Save the unseal key somewhere. You don’t need to save this securely.
4
Set the VAULT_TOKEN environment variable value to the generated Root Token value displayed in the terminal output when you started the dev server.To interact with Vault, you must provide a valid token. Setting this environment variable provides the token to Vault through the CLI.
Shell
Verify the server is running
Verify the server is running by executing thevault status command. If it started properly, the output should look similar to the following example:
Shell
Access the Vault UI
Perform the following steps to access the Vault UI:1
Go to http://localhost:8200 in a web browser.
2
Copy and paste the Root Token in the Token field and select [ Sign In ]. The Root Token displays in the output of the
vault server command you used to start the dev server.Modify the ACL policy
After signing in, perform the following steps to modify the default ACL policy:1
Go to the Policies menu, then select the default ACL policy.
2
Select [ Edit Policy ], scroll to the bottom of the policy, and paste the following lines starting at line 89 of the policy:
None
3
Select [ Save ].
A message confirms that the ACL policy default was successfully saved.
(Optional) Restart the dev server
Perform the following steps to restart the dev server if it times out:1
Trigger a Vault shutdown by using CTRL+C in the terminal window where you started the Vault server.
2
Run the following command in a terminal:
Shell
3
Perform again the steps described earlier:-Configure Vault
- Start the dev server
- Access the Vault UI
- Modify the default ACL policy
4
Re-configure either the userpass or TLS authentication method in Vault, as described in section Set up authentication between the KMES Series 3 and Vault.

