Taking your Hashicorp Vault to the next level

Using Hashicorp Vault like a pro

April 22, 2018
Contact Us
Weekly Shorts are topics we discuss in our weekly remote meeting related to recent work we have done with our customers
Taking your Hashicorp Vault to the next level

Have you ever installed Hashicorp Vault and wondered to yourself:

“Am I actually protecting my organization?”
You’re not alone.
While it’s easy to install Vault, making sure that it is configured correctly for productivity and security can be a challenging task. I’ve built my fair share of guides and webinars and worked with Vault a-lot recently. This has led me to create my own list of Vault’s best practices.

Auditing

Auditing simply means to log every interaction with Vault, any API request/response, the audit log contains every interaction with Vault, including errors. Note: If Vault won’t be able to audit an API call, it won’t execute it. This is great because it means that every interaction with Vault is audited and accessible in a log file.

In order to enable auditing functionality via Vaults CLI on your machine, execute the following command:

#gist:<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css"><div id=\"gist90398304\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-vault01\" class=\"file\">\n    \n\n  <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n      <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n      <tr>\n        <td id=\"file-vault01-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n        <td id=\"file-vault01-LC1\" class=\"blob-code blob-code-inner js-file-line\">$ vault audit enable file file_path=/var/log/vault_audit.log<\/td>\n      <\/tr>\n<\/table>\n\n\n  <\/div>\n\n  <\/div>\n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/seanroisentul/892fd04755e353575e76097117222aa4/raw/29d9539f22d93fc09a287d56b3700d3fb5c82fe5/Vault01\" style=\"float:right\">view raw<\/a>\n        <a href=\"https://gist.github.com/seanroisentul/892fd04755e353575e76097117222aa4#file-vault01\">Vault01<\/a>\n        hosted with ❤ by <a href=\"https://github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n

Feel free to put a different path for the log file if you’d like. Once implemented, vault will now log every interaction made to it and will write it as a JSON object. For UNIX systems, you can also choose to audit via Syslog simply by running the following command:

#gist:<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css"><div id=\"gist90398307\" class=\"gist\">\n <div class=\"gist-file\">\n <div class=\"gist-data\">\n <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n <div id=\"file-vault02\" class=\"file\">\n \n\n <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n <tr>\n <td id=\"file-vault02-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n <td id=\"file-vault02-LC1\" class=\"blob-code blob-code-inner js-file-line\">$ vault audit enable syslog<\/td>\n <\/tr>\n<\/table>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n <div class=\"gist-meta\">\n <a href=\"https://gist.github.com/seanroisentul/e89d49375cbd240481f2a31397ebd4b2/raw/f58454088f7cf794d4f79e065732d932a5bd2c7b/Vault02\" style=\"float:right\">view raw<\/a>\n <a href=\"https://gist.github.com/seanroisentul/e89d49375cbd240481f2a31397ebd4b2#file-vault02\">Vault02<\/a>\n hosted with ❤ by <a href=\"https://github.com\">GitHub<\/a>\n <\/div>\n <\/div>\n<\/div>\n

Here’s an example of an output from the audit file:

JSON output
A single JSON output is taken from Vaults audit log file

As we can see, there’s high visibility of who did what to whom with exact details. Therefore, in case of security compromise, we can identify where the attacker tried to reach and how. Avoid Root Token

After initializing Vault, we usually use the root token that has been provided. The root token can do anything within Vault, and I do mean ANYTHING. Therefore, it’s worth understanding that root token usage should be avoided and even better, revoked right after the Vault admin finished setting up the basic configurations and users with proper policies.

Revoking root token

In order to revoke a token in Vault, run the following command:

#gist:<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css"><div id=\"gist90398317\" class=\"gist\">\n <div class=\"gist-file\">\n <div class=\"gist-data\">\n <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n <div id=\"file-vault03\" class=\"file\">\n \n\n <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n <tr>\n <td id=\"file-vault03-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n <td id=\"file-vault03-LC1\" class=\"blob-code blob-code-inner js-file-line\">$ vault token revoke <TOKEN><\/td>\n <\/tr>\n<\/table>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n <div class=\"gist-meta\">\n <a href=\"https://gist.github.com/seanroisentul/e5eb9ef48dea1f12a1ad873370f843a9/raw/c243ffd4a6da33de656282825ad791ca701e58a4/Vault03\" style=\"float:right\">view raw<\/a>\n <a href=\"https://gist.github.com/seanroisentul/e5eb9ef48dea1f12a1ad873370f843a9#file-vault03\">Vault03<\/a>\n hosted with ❤ by <a href=\"https://github.com\">GitHub<\/a>\n <\/div>\n <\/div>\n<\/div>\n

Make sure that you can put the token that you’d like to revoke, the root token for example.

Generate Root Token

If you will ever need the root token again, you can re-generate a new one by following this guide.

Policies (ACL)

Access Control List, also known as Policies in Vault, provide a declarative way to grant or forbid access to certain paths and operations in Vault. Policies are “Deny By Default”, so if no policy was assigned, no permissions in the system will be allowed.

Policy Format

Policies are written in HCL (Hashicorp configuration language) or in JSON. Here is an example of a policy:

#gist:<link rel="stylesheet" href="https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css"><div id=\"gist90398325\" class=\"gist\">\n <div class=\"gist-file\">\n <div class=\"gist-data\">\n <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n <div id=\"file-vault04\" class=\"file\">\n \n\n <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n <tr>\n <td id=\"file-vault04-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n <td id=\"file-vault04-LC1\" class=\"blob-code blob-code-inner js-file-line\">path "secret/dev/team-1/*" {<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault04-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n <td id=\"file-vault04-LC2\" class=\"blob-code blob-code-inner js-file-line\"> capabilities = ["create", "update", "read"]<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault04-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n <td id=\"file-vault04-LC3\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault04-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"><\/td>\n <td id=\"file-vault04-LC4\" class=\"blob-code blob-code-inner js-file-line\">path "secret/dev/global" {<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault04-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"><\/td>\n <td id=\"file-vault04-LC5\" class=\"blob-code blob-code-inner js-file-line\"> capabilities = ["read"]<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault04-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"><\/td>\n <td id=\"file-vault04-LC6\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n <\/tr>\n<\/table>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n <div class=\"gist-meta\">\n <a href=\"https://gist.github.com/seanroisentul/63b0690b1b7176d5c35d85950710f016/raw/e78f161696a3949a83ffb344f22505d229fcb5b2/Vault04\" style=\"float:right\">view raw<\/a>\n <a href=\"https://gist.github.com/seanroisentul/63b0690b1b7176d5c35d85950710f016#file-vault04\">Vault04<\/a>\n hosted with ❤ by <a href=\"https://github.com\">GitHub<\/a>\n <\/div>\n <\/div>\n<\/div>\n

Everything in Vault is path based, so it’s pretty straightforward to understand how to write a policy, put the path and the capabilities you’d like to grant to that path. In the example above, we provide permissions to create, update and read secrets from secret/dev/team-1, also, we provide permissions to read only from secret/dev/global. It’s important to understand that by default, whoever will be associated with that policy will NOT have permissions to the other paths (Thus called “Deny By Default”).

Importing a Policy

In order to add a policy to Vault, simply run the following command:

#gist:<div id=\"gist90398339\" class=\"gist\">\n <div class=\"gist-file\">\n <div class=\"gist-data\">\n <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n <div id=\"file-vault05\" class=\"file\">\n \n\n <div itemprop=\"text\" class=\"blob-wrapper data type-text\">\n <table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\">\n <tr>\n <td id=\"file-vault05-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"><\/td>\n <td id=\"file-vault05-LC1\" class=\"blob-code blob-code-inner js-file-line\"># vault policy write &lt;POLICY_NAME&gt; &lt;HCL_FILE_PATH&gt;<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault05-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"><\/td>\n <td id=\"file-vault05-LC2\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n <\/tr>\n <tr>\n <td id=\"file-vault05-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"><\/td>\n <td id=\"file-vault05-LC3\" class=\"blob-code blob-code-inner js-file-line\">$ vault policy write dev-team-1 team-one-policy.hcl<\/td>\n <\/tr>\n<\/table>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n <div class=\"gist-meta\">\n <a href=\"https://gist.github.com/seanroisentul/5ef0164f29f94408f0a7ad7840f462c6/raw/91d2cf9442a6fefc5e59e4a740240d1ef7179328/Vault05\" style=\"float:right\">view raw<\/a>\n <a href=\"https://gist.github.com/seanroisentul/5ef0164f29f94408f0a7ad7840f462c6#file-vault05\">Vault05<\/a>\n hosted with &#10084; by <a href=\"https://github.com\">GitHub<\/a>\n <\/div>\n <\/div>\n<\/div>\n

In this example, we created a policy called dev-team-1 and uploaded our HCL file where the policy settings are written team-one-policy.hcl.

Assigning a Policy

In order to assign a policy to a token, simply run the following command:

#gist:&lt;link rel=&quot;stylesheet&quot; href=&quot;https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css&quot;&gt;&lt;div id=\&quot;gist90398347\&quot; class=\&quot;gist\&quot;&gt;\n &lt;div class=\&quot;gist-file\&quot;&gt;\n &lt;div class=\&quot;gist-data\&quot;&gt;\n &lt;div class=\&quot;js-gist-file-update-container js-task-list-container file-box\&quot;&gt;\n &lt;div id=\&quot;file-vault06\&quot; class=\&quot;file\&quot;&gt;\n \n\n &lt;div itemprop=\&quot;text\&quot; class=\&quot;blob-wrapper data type-text\&quot;&gt;\n &lt;table class=\&quot;highlight tab-size js-file-line-container\&quot; data-tab-size=\&quot;8\&quot;&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault06-L1\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;1\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault06-LC1\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;$ vault token create -policy=dev-team-1&lt;\/td&gt;\n &lt;\/tr&gt;\n&lt;\/table&gt;\n\n\n &lt;\/div&gt;\n\n &lt;\/div&gt;\n&lt;\/div&gt;\n\n &lt;\/div&gt;\n &lt;div class=\&quot;gist-meta\&quot;&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/24fcdd539c56a897c73f47f576401d8c/raw/c0134828775473fd933af214d11ceee72e3d3faf/Vault06\&quot; style=\&quot;float:right\&quot;&gt;view raw&lt;\/a&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/24fcdd539c56a897c73f47f576401d8c#file-vault06\&quot;&gt;Vault06&lt;\/a&gt;\n hosted with &amp;#10084; by &lt;a href=\&quot;https://github.com\&quot;&gt;GitHub&lt;\/a&gt;\n &lt;\/div&gt;\n &lt;\/div&gt;\n&lt;\/div&gt;\n

In this example, we created a new token and assigned it to our dev-team-1policy. We can test it out by logging with the created token and try to create/read/update secrets from secret/dev/team-1 with no issues. If we’ll try to create a secret in secret/dev/global we’ll get permission denied message because we set permissions of read-only for secret/dev/global path in our policy above.

You should also assign specific policies for your Auth Methods, this is called Mapping, for example, for GitHub auth method you can run the following command:

#gist:&lt;link rel=&quot;stylesheet&quot; href=&quot;https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css&quot;&gt;&lt;div id=\&quot;gist90398352\&quot; class=\&quot;gist\&quot;&gt;\n &lt;div class=\&quot;gist-file\&quot;&gt;\n &lt;div class=\&quot;gist-data\&quot;&gt;\n &lt;div class=\&quot;js-gist-file-update-container js-task-list-container file-box\&quot;&gt;\n &lt;div id=\&quot;file-vault07\&quot; class=\&quot;file\&quot;&gt;\n \n\n &lt;div itemprop=\&quot;text\&quot; class=\&quot;blob-wrapper data type-text\&quot;&gt;\n &lt;table class=\&quot;highlight tab-size js-file-line-container\&quot; data-tab-size=\&quot;8\&quot;&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault07-L1\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;1\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault07-LC1\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;$ vault write auth/github/map/teams/dev-backend value=dev-team-1&lt;\/td&gt;\n &lt;\/tr&gt;\n&lt;\/table&gt;\n\n\n &lt;\/div&gt;\n\n &lt;\/div&gt;\n&lt;\/div&gt;\n\n &lt;\/div&gt;\n &lt;div class=\&quot;gist-meta\&quot;&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/8a48e98ad3975abd4c8cca57553db37e/raw/6578a3f0eee7d1d270b64fcc6d27700509cf9829/Vault07\&quot; style=\&quot;float:right\&quot;&gt;view raw&lt;\/a&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/8a48e98ad3975abd4c8cca57553db37e#file-vault07\&quot;&gt;Vault07&lt;\/a&gt;\n hosted with &amp;#10084; by &lt;a href=\&quot;https://github.com\&quot;&gt;GitHub&lt;\/a&gt;\n &lt;\/div&gt;\n &lt;\/div&gt;\n&lt;\/div&gt;\n

In this example, we set a team called “dev-backend” with our policy from above — dev-team-1.In order to map your policy to a different auth method, you should use the path-help.

Disable SSH / Remote desktop

Vault should be the only main process running on a machine, also, users should never access the machine directly. Instead, they should use Vaults API over the network. It’s recommended to disable SSH to Vaults machine completely, remove any kind of option to remote/log it.If disabling SSH is not an option for you, you can change the ports and encrypt your SSH key and put it in a safe place, making SSH-ing Vaults machine complicated as much as possible.

Accessing Vault

Accessing Vault should be done via its HTTP API, as a developer, for example, I won’t be able to use Vaults CLI because I won’t have access to the machine itself. You can use cURL, but for the simplicity of things, I recommend you use Postman to make your life easier when working with Vault.

Vault-UI

As you may already understand, Vault is not super friendly when it comes to interacting with it. Especially in the modern world where we look for the simplicity of things, a web application with a friendly UI. Recently, Hashicorp announced that they released one of their premium features to the open source; Vault UI. Since the official Hashicorps Vault UI feature was part of the enterprise edition which cost money, there were open source alternatives like Vault-UIby Djenriquez or Goldfish by Canyon.

If you are running Vault with version 0.10 and above, you should have the UI installed by default but not activated.

If you are not running your server in developer mode (vault server -dev) you will need to add ui=true to your server configuration file (HCL/JSON) For example:

#gist:&lt;link rel=&quot;stylesheet&quot; href=&quot;https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css&quot;&gt;&lt;div id=\&quot;gist90398359\&quot; class=\&quot;gist\&quot;&gt;\n &lt;div class=\&quot;gist-file\&quot;&gt;\n &lt;div class=\&quot;gist-data\&quot;&gt;\n &lt;div class=\&quot;js-gist-file-update-container js-task-list-container file-box\&quot;&gt;\n &lt;div id=\&quot;file-vault08\&quot; class=\&quot;file\&quot;&gt;\n \n\n &lt;div itemprop=\&quot;text\&quot; class=\&quot;blob-wrapper data type-text\&quot;&gt;\n &lt;table class=\&quot;highlight tab-size js-file-line-container\&quot; data-tab-size=\&quot;8\&quot;&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L1\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;1\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC1\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;ui = true&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L2\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;2\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC2\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;\n&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L3\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;3\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC3\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;listener &amp;quot;tcp&amp;quot; {&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L4\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;4\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC4\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt; address = &amp;quot;10.0.1.35:8200&amp;quot;&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L5\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;5\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC5\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;}&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L6\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;6\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC6\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;\n&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L7\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;7\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC7\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;storage &amp;quot;consul&amp;quot; {&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L8\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;8\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC8\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt; # ...&lt;\/td&gt;\n &lt;\/tr&gt;\n &lt;tr&gt;\n &lt;td id=\&quot;file-vault08-L9\&quot; class=\&quot;blob-num js-line-number\&quot; data-line-number=\&quot;9\&quot;&gt;&lt;\/td&gt;\n &lt;td id=\&quot;file-vault08-LC9\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;&gt;}&lt;\/td&gt;\n &lt;\/tr&gt;\n&lt;\/table&gt;\n\n\n &lt;\/div&gt;\n\n &lt;\/div&gt;\n&lt;\/div&gt;\n\n &lt;\/div&gt;\n &lt;div class=\&quot;gist-meta\&quot;&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/550a7b3c65a7ec2358382b11dc6493a7/raw/e1369feda61c373f715f1834fcc58182bda33812/Vault08\&quot; style=\&quot;float:right\&quot;&gt;view raw&lt;\/a&gt;\n &lt;a href=\&quot;https://gist.github.com/seanroisentul/550a7b3c65a7ec2358382b11dc6493a7#file-vault08\&quot;&gt;Vault08&lt;\/a&gt;\n hosted with &amp;#10084; by &lt;a href=\&quot;https://github.com\&quot;&gt;GitHub&lt;\/a&gt;\n &lt;\/div&gt;\n &lt;\/div&gt;\n&lt;\/div&gt;\n

Access Vault UI by entering /ui in the web browser with the URL where your Vault is located, for example, if you ran Vault locally on your machine open your browser and navigate to http://127.0.0.1:8200/ui

Vault UI login
Example of Vault UI login window

Note that if you didn’t initialize Vault, you will face the initialization screen process.

After authenticating with our Token/Userpass/LDAP/Okta/GitHub credentials we can start exploring Vault UI.Secrets Menu for exploring secrets with the permissions that were assigned to the logged user.Access for managing users, vault identity entities, as well as leases.Replication for configuration of Disaster Recovery and Performance Replication. (Note that this is enterprise feature, which means you will have to pay to Hashicorp In order to use it.)Policies Menu to configure and manage ACL (Access Control List) policies, with the ability to write a new policy from the web or upload an existing HCL/JSON file from your machine.Tools Menu” provides a way to leverage response wrapping, as well as access cryptographic functions like random and hash.Settings Menu” provides a way to centrally review Secret Engines, Auth Methods, as well as to Seal the Vault.

Vault UI dashboard
Vault UI secrets dashboard

There are many more features and abilities that Vault provides. If you have any questions/thoughts regarding this blog or Vault itself, you may comment here or contact me directly on Twitter @Zvika_Nadav.

For those of you who are not familiar with Hashicorp Vault, I strongly recommend you to take the FREE introduction session which is currently running on a weekly basis by me — register by clicking here.

<p> CODE: https://gist.github.com/Zvikan/75c02d3ecc3bc872546fe3f405585821.js</p>

Taking your Hashicorp Vault to the next level
Zvika Nadav
Operations Engineer
Experienced in automation testing as well as a networking background, being CCNA certified with CCNP knowledge. HIs knowledge includes coding, development, networking, and automation. He has designed automation frameworks and increased the automation performance by 50%. For his enjoyment, he likes video games, movies and streaming. He is passionate about technology and how he can “make things as simple as possible, but no simpler” as Einstein once said. He is often speaking at meetups and blog posting. His strength is that he can be thrown into any ocean and he'll manage to swim. He has the ability to teach others, even on a topic that he has just been revealed to.