Skip to main content
Opal’s integration with HashiCorp Vault allows you to manage access to Vault KV secrets and identity groups.

Supported resources

Requirements

Before you begin, you must:
  • Be an Opal Admin
  • Be on version 1.1263.0 or later, if you self-host Opal
  • Have the AppRole auth method enabled at its default approle path in Vault
  • To grant access to secrets, have the OIDC auth method enabled at its default oidc path, with your identity provider as the OIDC provider

1. Create an AppRole for Opal

In Opal, go to Inventory > + App and select HashiCorp Vault. The form shows the Vault policy Opal needs. Copy it and create it in Vault as the AppRole’s policy, for example opal-approle:
  • Replace secret-kv2 and secret-kv1 with the mount paths of the KV secret engines you want Opal to sync.
  • Replace opal-approle with the name of your policy. The policy gives the AppRole only read on its own policy. If the AppRole can change its own policy, Opal flags it as a privilege escalation risk when you save the app.
Then create an AppRole with that policy, and copy its role ID and a secret ID.

2. Create the HashiCorp Vault app in Opal

Back in the Opal form, fill in the following fields: Select Read-only (do not push membership or secret grants) to sync without changing anything in Vault. Opal then checks only the read capabilities it needs. When you save the app, Opal checks the AppRole’s capabilities. A missing read capability is critical. A missing write capability only affects granting and revoking access.

3. Import assets

After you save the app, import the secrets and identity groups you want to manage from the app’s Assets tab by selecting Import assets, and turn on requests for them.

How Opal matches users

Opal matches each Vault identity entity to an Opal user by email. It uses the first of these that is a valid email address:
  1. The entity’s email metadata
  2. The entity’s name
  3. The name or email metadata of one of the entity’s aliases

How secret access works

When Opal grants a user access to a secret, it creates an opal--prefixed policy for that user and secret path, and an opal--prefixed OIDC role bound to the user’s email addresses. The user signs in to Vault with OIDC using that role. When access ends, Opal deletes the policy, which also invalidates sessions that use it, and then deletes the role.
Last modified on November 23, 2026