` with the address of your Vault cluster as a URL and port, such as `https://192.0.2.255:8300`.
| Option | Details |
| :---------------- | :------------------------------------------------------ |
| `-d`, `--dry-run` | Only print the commands |
| `--help` | Output usage information |
| `-y` | Don't prompt for user input before running each command |
The script also provides environment variables you can set to authenticate with your HashiCorp instance and customize your OIDC identity provider:
| Environment variable | Details |
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VAULT_TOKEN` | **Required** An [authentication token](https://developer.hashicorp.com/vault/docs/concepts/tokens) with permission to create an OIDC client application, OIDC provider, auth method, policy, and role. Learn more about the [minimum permissions required to set up an OIDC identity provider](#permissions-to-set-up-an-oidc-identity-provider). |
| `VAULT_ADDR` | **Required** If your HashiCorp Vault instance is managed in HashiCorp Cloud Platform, the value must be the public cluster URL. If it's self-managed, the value must be the address of your Vault cluster as a URL and port, such as `https://192.0.2.255:8300`. |
| `VAULT_NAMESPACE` | The namespace where you want your users to manage their sensitive data. If you're already using namespaces, Postman recommends creating a new namespace for this integration. Default: `""` |
| `OIDC_CLIENT_NAME` | The name of the OIDC client application. Default: `postman-integration-client` |
| `REDIRECT_URI` | The redirect URIs for the OIDC client application. Don't change the default value. Default: `http://127.0.0.1:10545/,http://127.0.0.1:10534/` |
| `JWT_AUTH_PATH` | The path for the new JWT auth method. Default: `postman-jwt` |
| `OIDC_ROLE` | The name of the role with permission to authenticate using the new JWT auth method. Default: `postman` |
| `OIDC_POLICY_NAME` | The name of the HashiCorp Vault policy that's attached to the `postman` role. Default: `postman-integration-policy`
The default policy allows all users with the `postman` role to read secrets from all secrets engines in HashiCorp Vault. Depending on your organization, you might want to specify which secrets engines users can access.
|
The HashiCorp Vault setup script doesn't give you the option to create a new scope with a custom claim.
You can update the policy (`POLICY_CONTENT`) specified in the script to restrict the `postman` role from accessing specific secrets engines. At a minimum, the policy must allow the `postman` role to access the secrets engine that stores secrets you'll retrieve in Postman.
## Integrate with HashiCorp Vault
As a Postman Team or Super Admin, you can integrate Postman Vault with HashiCorp Vault for your team.
To integrate with HashiCorp Vault, do the following:
1. As a Postman Team or Super Admin, open your Postman Vault, then select
**Settings**.
2. From the **Settings** tab, select **Set Up Integration** next to **HashiCorp Vault**.
3. Enter the following on the **Set up HashiCorp Integration** window:
* **OIDC Provider URL** - Enter the OIDC provider URL of the client application.
* **JWT Auth Path** - Enter the JWT auth path. If you used the recommended JWT auth path, enter **postman-jwt**.
* **Client Id** - Enter the OIDC client application's ID.
* **Role** - Enter the role name. If you used the recommended role name, enter **postman**.
* **Scope** - Optionally, if you created and configured a new scope with a custom claim, enter the scope's name. This is the scope with the user claim you'd like to identify users when they sign in to HashiCorp Vault with Postman.
* **Namespace (optional)** - Optionally, enter the [namespace](https://developer.hashicorp.com/vault/docs/enterprise/namespaces) where you want users to manage their sensitive data. If you're already using namespaces, Postman recommends creating a new namespace for this integration.
4. Select **Set Up HashiCorp**.
Postman Team and Super Admins can edit the HashiCorp Vault integration later. Select
**Settings**, then select **Edit details** next to **HashiCorp Vault** from the **Settings** tab.
Once you create the HashiCorp Vault integration, team members can [authenticate with HashiCorp](#authenticate-with-your-hashicorp-account), then [link vault secrets with HashiCorp Vault](#link-vault-secrets-with-hashicorp-vault).
## Authenticate with your HashiCorp account
After a Postman Admin creates the integration, you must authorize Postman to access and retrieve secrets from HashiCorp Vault.
Postman uses the JSON Web Token (JWT) configured in the [OIDC identity provider](#set-up-an-oidc-identity-provider) to authenticate with HashiCorp. The token is valid in Postman for a specified amount of time set up in HashiCorp Vault.
You'll need to [reauthenticate with HashiCorp](/docs/sending-requests/postman-vault/manage-postman-vault-integrations/#reauthenticate-with-an-external-vault) each time you open Postman, or when the JWT expires in Postman.
To authenticate with your HashiCorp account, do the following:
1. Open your Postman Vault.
2. If you haven't created an integration with an external vault, select
**Set up external vault** in the top right of your Postman Vault. Otherwise, select
**Use from existing vault**. Then select **HashiCorp Vault**.
Optionally, you can select
**Settings** in the top right of your Postman Vault. From the **Settings** tab, select **Connect** next to **HashiCorp Vault**.
Your computer must be able to access your HashiCorp instance.
1. You'll be prompted to authorize Postman to access your HashiCorp account. After you grant access, you can close the browser tab and return to Postman.
Don't sign in to HashiCorp Vault using the **Token** auth method because Postman won't be able to retrieve your secrets. You can use any other auth method to sign in, such as **Username** or **Okta**.
## Link vault secrets with HashiCorp Vault
Link a vault secret's value with a secret stored in HashiCorp Vault. This enables you to retrieve a secret stored in HashiCorp Vault directly from Postman. Once you link a vault secret's value, [reference the vault secret](/docs/sending-requests/postman-vault/manage-vault-secrets/#use-vault-secrets) in your Postman team. The secret is retrieved from HashiCorp Vault when you send the HTTP request that references the vault secret.
Secrets retrieved from HashiCorp Vault aren't stored in your local instance of Postman or the Postman cloud. Learn more about [Postman Vault integrations](/docs/sending-requests/postman-vault/postman-vault-integrations/#about-postman-vault-integrations).
Vault secrets are deleted from your Postman Vault after signing out of Postman. Your vault secrets can't be recovered with your vault key. When you sign in to Postman and open your Postman Vault, you can [reauthenticate with HashiCorp](#authenticate-with-your-hashicorp-account) and link a vault secret's value.
To link a vault secret's value with HashiCorp Vault, do the following:
1. In Postman, enter a name for the vault secret, hover over the **Value** cell, click
**Link Vault**, then select **HashiCorp Vault**.
If you've already integrated with an external vault, you can link a secret from a different external vault provider. Click
**Add new vault**, then select an external vault.
2. You can use [HashiCorp Cloud Platform](https://developer.hashicorp.com/hcp/docs/hcp) (HCP) to get the details for linking a secret in Postman:
1. In HCP, select **Secrets engines** in the left sidebar to view a list of your secrets engines.
2. Copy the name of the KV secrets engine and enter it as the **Secret Engine** in Postman.
3. Click the KV secrets engine.
4. Check the version number tag next to the secrets engine name at the top. Choose this version as the **Secret Engine Version** in Postman.
5. Click through the secrets engine until you reach the secret you want to link. Copy the path to the secret at the top and enter it as the **Secret Path** in Postman.
6. Copy the key name for the secret you want to link and enter it as the **Secret Key** in Postman.
3. In Postman, click **Use** to link the secret.

To view details about a secret you've linked from HashiCorp Vault, click
**Configure vault** next to a secret.

You can also [use scripts to access vault secrets](/docs/tests-and-scripts/write-scripts/postman-sandbox-reference/pm-vault/) linked with HashiCorp Vault. Postman doesn't support setting the value of vault secrets linked with external vaults.
Make sure you enable scripts to access your vault secrets. Otherwise, you'll receive an error in the Postman Console.
## Next steps
After integrating Postman Vault with HashiCorp Vault, you can reference vault secrets and manage your integrations:
* To learn how to reference vault secrets in Postman, see [Use vault secrets](/docs/sending-requests/postman-vault/manage-vault-secrets/#use-vault-secrets).
* To learn how to troubleshoot vault secrets, see [Troubleshoot vault secrets](/docs/sending-requests/postman-vault/troubleshoot-vault-secrets/).
* To learn how to manage your integrations, see [Manage Postman Vault integrations](/docs/sending-requests/postman-vault/manage-postman-vault-integrations/).