Configure HashiCorp Vault Integration

This feature is currently in public beta. Functionality and documentation may change.

Secret store integrations allow you to use your existing third-party secret stores with strongDM. Your credentials are stored in a tool that is controlled by you, and those credentials are never transmitted to strongDM in any form. If you would like to learn more about how this integration works and why you might wish to use it, please read the Secret Stores Reference.

This guide will walk you through how to integrate HashiCorp Vault with strongDM, as well as how to use it to connect to resources.


Before you begin, ensure that you have the following:

  • A running Vault server (see the Vault Installation Guide)
  • Credentials to some of your resources, stored in the Vault instance
  • Correct paths to the credentials

Authentication to Vault

strongDM currently supports two authentication methods to enable your Relay server to authorize to Vault: token-based authentication and TLS certificates. For more information on either method, see HashiCorp's Vault tutorials: Token Authentication and TLS Certificate Authentication.

strongDM recommends TLS certificate-based authentication for Vault secret stores. Token-based authentication may be a good resource for testing and quick implementation, but it is inherently less secure.

Token-based authentication

Set the VAULT_TOKEN environment variable to allow the Relay to authenticate with Vault.

  1. Get a token for Vault.
  2. Set the necessary environment variable on your Relay server (VAULT_TOKEN). Edit the file /etc/sysconfig/sdm-proxy (unless you have moved or renamed your sdm-proxy file) and add the following line, substituting <YOUR_TOKEN> with your actual token:
  3. Restart the sdm-proxy service (with something like sudo systemctl restart sdm-proxy, depending on your distribution).

TLS certificate-based authentication

Follow the Vault documentation regarding certificate authentication with Vault.

When you install the TLS certificates on the Relay server, place them in a directory that is accessible to the sdm relay service. Save the file paths for use later. Note that the policy for the certificate used needs to allow access to the secret paths.

Configure the Secret Store with the Admin UI

Once you have your Vault set up, credentials stored, and your Relay server able to access said credentials, it's time to register the Vault with strongDM.

  1. In the Admin UI, go to Network > Secret Stores.

  2. Click the add secret store button.

  3. On the Add Secret Store form, set the following:

    Secret Stores Settings
    Secret Stores Settings

    1. Display Name (Required): The name that you enter here will show up in the Admin UI.

    2. Secret Store Type (Required): Select the appropriate type (HashiCorp Vault or HashiCorp Vault (Token)).

    3. Enter the appropriate authorization information for the selected Secret Store Type:

      1. For token-based authentication, enter the server address (e.g.,
      2. For certificate-based authentication, enter the paths to the certificates stored on your Relay server.
    4. Namespace (Optional): If you have a secret inside a Vault Enterprise namespace, you can use this option to allow strongDM to authenticate to a specified namespace and access the secret within it. Using either a root token or a token created inside the namespace, you can access the secret in the following ways:

      1. Set an empty string and use the secret path namespace/mysecret?key=username.

      2. Set namespace/ and use the secret path mysecret?key=username.

        If you try to use a token from namespace1/, for example, but you configure the secret store to use namespace2/, the secret store healthcheck will fail.

If you've configured the Relay server correctly for secret store access and authorization, you will see the green online indicator.

Test Access to the Resource

Now, create a resource that uses the secret store, assign it to a Role that is assigned to a User, and verify that you can connect.

  1. In the Admin UI, add a new resource such as a Server or Datasource and choose the Vault Secret Store type.
  2. Fill out the information for a resource whose credentials you have stored in your Vault secret store.
  3. Select the Vault Secrets Store you created for the Secret Store field, and then fill in the path to the secrets that you've stored in your secret store.
    1. Vault accepts plaintext secrets, which you would use to store one credential field per secret, or JSON secrets, which could include many credential values with different keys. If using JSON, add the key along with the path to the credential, (e.g., example-secret?key=username). Note that Vault will even allow the direct import of JSON (e.g., vault kv put secret/foo @data.json).
    2. It is preferred that certificates be Base64-encoded. If the secret you are storing is a certificate, you should Base64-encode it, and then enter the path as follows when setting up a resource to use it: example-secret?key=certificate&encoding=base64.
  4. Submit the form.
  5. Go to Roles, create a Role with an access rule that grants access to the resource, and assign the Role to the User.
  6. Log in as that User in your local GUI (or have the User do so, if not yours) and verify that the resource exists, test a connection, and execute a query.

Congratulations! You've connected to a resource using secret stores.

Installation — Previous
Configure GCP Secret Manager Integration
Next — Admin UI Guide
Admin UI Overview