HashiCorp Vault (On-Premise) Credential Provider Secret Path Expressions

Use the path expressions listed in this topic to use the HashiCorp Vault (On-Premise) credential provider in your source authentication configurations.

Path syntax – {path_to_secret}/{secretKey}

Secret URL – secrets://{HashiCorp_Source_Name}/{path_to_secret}/{secretKey}

Important
The URL path should always start with the prefix, secrets://. Each URL should also be URL-encoded. Each URL attribute in the path is case-sensitive.

HashiCorp Vault (On-Premise) supports static and dynamic secrets. Configure the required secret engines in the HashiCorp Vault (On-Premise) server and provide their secret paths in the source.

  1. Go to the your HashiCorp secret engine's API document and locate the Get or Generate Credentials API section.

  2. Configure the API path to get credentials

    Note

    Everything after the API version in the URL should be used in place of <path to secret>.

    For example, the if URL to fetch secrets is as follows:

    http://<vault host>/v1/azure/creds/my-role

    Then the <path to secret> is as follows:

    azure/creds/my-role

  3. Define the key whose value needs to be read from the getCredentials API response for the <secretKey>.

    For example, consider the API response for getCredentials as follows:

    Copy
    {
    "data": {
        "client_id": "408bf248-dd4e-4be5-919a-7f6207a307ab",
        "client_secret": "9PfdaDP9qcf98ggw8WSttfVreFcN4q9c4m4x",
        ...
        }
    }

    If the secret expression wants the Client ID field from the connector source, then <secretKey> should be set to client_id.

Secret URL example:

Before Encoding

secrets://<HashiCorp Source>/<mysecret/Admin User>/<Admin username>

Where:

  • <HashiCorp Source> – Configured Credential Provider in the Credential Provider Section

  • <mysecret/Admin User> – Path to the secret

  • <Admin username> – Key to retrieve from the secret path

After Encoding

secrets://HashiCorp%20Source/mysecret%2FAdmin%20User/Admin%20username

Tip
Use urlencoder.org to encode your URL attributes.

Note

By default, the HashiCorp Vault (On-Premise) credential provider checks the {secretKey} in response to the following paths by default:

  • $.

  • $.data

  • $.data.data

If any getCredentials API response returns {secretKey} from another path, then add the following entry key into the HashiCorp source XML for all those paths:

<entry key="secretPaths" value="path1,path2"/>

For example:

<entry key="secretPaths" value="data.data.data,data.path1"/>

For more information on SailPoint's REST APIs, refer to Best Practices: REST API Authentication and REST API - Update Source (Partial) in the SailPoint Developer Community.