Configure Auth0 for agent IAM
Enterprise
Appropriate Vault Enterprise license or HCP Vault Dedicated cluster required.
Configure users and OIDC applications in Auth0 to use with Vault Enterprise agentic IAM.
Before you start
You must have an Auth0 tenant with an Auth0 Enterprise plan (or better) to enable and remove Rich Authorization Request (RAR) and Pushed Authorization Requests (PAR).
You must have sufficient permission for your Auth0 tenant. You must have permissoion to create resources (applications, APIs, users) and configure RAR/PAR features.
You must have the
oauth2cCLI installed and in your systemPATHto interact with OAuth 2.0 authorization servers.
Step 1: Enable pushed authorization requests
Enable Pushed Authorization Requests (PAR) tenant-wide. You need PAR support (RFC 9126) to attach RAR claims. Standard authorization requests cannot carry complex JSON structures.
Log in to your Auth0 dashboard.
Navigate to Settings > Advanced.
Toggle the Allow Pushed Authorization Requests (PAR) setting to ON.
Step 2: Create a custom API
Navigate to Applications > APIs.
Click Create API.
In the Name field, enter a name value (for example,
vault-api).In the Identifier field, provide the API address of you Vault cluster. The identifier value eventually becomes the JWT
audclaim.For JSON Web Token (JWT) Profile, select RFC 9068.
Scroll down and click Create.
Click the Settings.
Scroll down to RBAC Settings.
Click the toggle to switch on Enable RBAC.
Click the toggle to switch on Add Permissions in the Access Token.
Click Save.
Step 3: Create an Auth0 application
Navigate to Applications > Applications, then click Create Application.
Enter a custom name for the Name field.
Select an appropriate application type.
Click Create.
Open the Settings page and note the Client ID, Domain, and Client Secret for your application.
Scroll to Application URIs section.
Add the default callback for
oauth2to the Allowed Callback URLs list,http://localhost:9876/callbackso you can test the token exchange later.Scroll to the Authorization Requests section.
Toggle Require Pushed Authorization Requests (PAR) to ON to make PAR mandatory for your application.
Click Advanced Settings.
Click OAuth.
In the Allowed APPs/APIs field, enter your Vault API address (for example,
https://<vault-addr>:8200/v1).Open the Grant Types tab and check Authorization Code.
Open the Endpoints tab and record both the OAuth Authorization URL and the JSON Web Key Set URL values for use later.
Click Save.
Step 4: Register the RAR authorization details type
Rich Authorization Requests (RAR) require Auth0 to recognize the custom
authorization details type that Vault expects (vault:path_access). With PAR
enabled, register an authorization details type named vault:path_access for
your tenant.
Navigate to Auth0 Dashboard > Applications > APIs.
Select the API you created.
Click Permissions.
Under Add an Authorization Details type in the Type field, enter
vault:path_access.Click + Add to automatically save the authorization details type settings.
Step 5: Grant application access
With the API and application both created, you need to grant client access from the API to the application.
Navigate to Auth0 Dashboard > Applications > APIs.
Select the API you created.
Click Application Access.
Find your application, and click Edit.
Click Grant Access.
Click the Always grant all permissions checkbox.
Click Save.
Step 6: Allow the application to request the RAR type
The Always grant all permissions checkbox does not configure whether
applications can request the vault:path_access authorization details (RAR) type.
Auth0 controls whether an application may request a registered
authorization_details type through the User-Delegated Access policy associated
with the API.
| Type | Key | Config location | Description |
|---|---|---|---|
| All apps allowed | allow_all | Dashboard | Applications can request any type registered on the API. |
| Per-app authorization | require_client_grant | Auth0 Management API | Applications can request types configured in their client grant. |
To set the policy to All apps allowed:
Navigate to Applications > APIs and click vault-api.
Click the Settings tab and scroll to Application Access Policy.
Set User-Delegated Access to All apps allowed.
Click Save.
Step 7: Create an agent user
Navigate to User Management > Users.
Click Create User.
Select Create via UI or Create via JSON.
Enter the appropriate information for Email and Password.
Click Create.
On the user page, click Edit next to Email, and mark the email as verified.
Step 8: Capture a baseline token
Export the Auth0 values you recorded, then run oauth2c to confirm the trust
and to capture the iss and sub claims you need for the Vault profile and
entity aliases.
Save the Auth0 configuration values as environment variables. Replace the placeholders with your actual values from the Auth0 application settings:
$ export \ APP_AUTH_URL="https://<your_tenant>.us.auth0.com/authorize" \ APP_DOMAIN="<application_domain>" \ APP_ID="<application_client_id>" \ SECRET_VALUE="<application_client_secret>" \ JWKS_URI="https://<your_tenant>.us.auth0.com/.well-known/jwks.json"Save the Vault server address as
AUDIENCE_ADDRso you can easily request the correct audience in the access token:$ export AUDIENCE_ADDR=${VAULT_ADDR}/v1Request an access token using the OAuth 2.0 authorization code flow with PKCE and PAR:
$ oauth2c "${APP_AUTH_URL}" \ --pkce \ --par \ --client-id "${APP_ID}" \ --client-secret "${SECRET_VALUE}" \ --response-types code \ --response-mode query \ --grant-type authorization_code \ --audience ${AUDIENCE_ADDR} \ --auth-method client_secret_basicWhen
oauth2copens a browser, sign in with the email address and password you set for the agent user. After a successful sign-in, the terminal prints a success message along with a JSON object with the decoded access token. For example:{ "aud": "https://localhost:8200/v1", "client_id": "EBYeLHzuLqSeyUYLY7EC3hqRgvaiS9Dv", "exp": 1782402664, "iat": 1782316264, "iss": "https://hashicups-dev.us.auth0.com/", "jti": "baFC3mowpruhSr1JdDRhbJ", "permissions": [], "sub": "auth0|c0ff33a2dc1f8e9de0dd95d7" }Save the
issandsubvalues to environment variables. Thesubvalue contains a pipe character, so make sure wrap to wrap the string in quotes:$ export \ ISSUER="https://hashicups-dev.us.auth0.com/" \ EXTERNAL_ID='auth0|c0ff33a2dc1f8e9de0dd95d7'
Step 9: Save your provider information
Confirm your subject and actor details from Auth0. To configure agentic IAM, you must have the following information:
| Value | Environmental variable | Description |
|---|---|---|
| Authorization URL | APP_AUTH_URL | Authorization URL of the application |
| Domain address | APP_DOMAIN | Domain of the application you registered in Auth0 |
| Auth0 client ID | APP_ID | Client ID of the application you registered in Auth0 |
| Issuer URL | ISSUER | iss URL for your application |
| JWT subject ID | EXTERNAL_ID | JWT claim for the agent user from your application (sub) |
| Key endpoint | JWKS_URI | URL where clients can download public keys (JWKS) from your application |
| Client secret value | SECRET_VALUE | Client secret associated with your application |
| Audience address | AUDIENCE_ADDR | Vault cluster address including the API version, /v1 |
If you have not already, we recommend setting the following environment variables to make Vault configuration more convenient:
$ export \
VAULT_ADDR="<your_vault_server_url>" \
APP_AUTH_URL="<app_auth_url>" \
APP_DOMAIN="<app_domain>" \
APP_ID="<app_client_id>" \
ISSUER="<app_iss_url>" \
EXTERNAL_ID="<app_jwt_sub>" \
JWKS_URI="<app_jwks_url>" \
SECRET_VALUE="<app_client_secret>" \
AUDIENCE_ADDR="<aud_address>"
For example:
$ export \
VAULT_ADDR="https://127.0.0.1:8200" \
APP_AUTH_URL="https://abc-123if67e.us.auth0.com/authorize" \
APP_DOMAIN="abc-123if67e.auth0.com" \
APP_ID="ABCD...abc" \
ISSUER="https://hashicups-dev.us.auth0.com/" \
EXTERNAL_ID="auth0|c0ff33a2dc1f8e9de0dd95d7" \
JWKS_URI="https://abc-123if67e.us.auth0.com/.well-known/jwks.json" \
SECRET_VALUE="000000...000000" \
AUDIENCE_ADDR="https://127.0.0.1:8200/v1"
Next steps
- Configure Vault to secure agentic workflows
- Configure Vault to secure OBO workflows
- Configure additional identity providers and authentication servers: