This is the API documentation for configuring, acquiring, and validating vault issued identity tokens.
---
## Configure the Identity Tokens Backend
This endpoint updates configurations for OIDC-compliant identity tokens issued by Vault.
| Method | Path |
| :------------------ | :----------------------|
| `POST` | `identity/oidc/config` |
### Parameters
-`issuer``(string: "")`– Issuer URL to be used in the iss claim of the token. If not set, Vault's api_addr will be used. The issuer is a case sensitive URL using the https scheme that contains scheme, host, and optionally, port number and path components, but no query or fragment components.
### Sample Payload
```json
{
"issuer": "https://example.com:1234"
}
```
### Sample Request
```
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data @payload.json \
http://127.0.0.1:8200/v1/identity/oidc/config
```
### Sample Response
```json
{
"data": null,
"warnings": [
"If \"issuer\" is set explicitly, all tokens must be validated against that address, including those issued by secondary clusters. Setting issuer to \"\" will restore the default behavior of using the cluster's api_addr as the issuer."
],
}
```
## Read Configurations for the Identity Tokens Backend
This endpoint queries vault identity tokens configurations.
| Method | Path |
| :------------------ | :----------------------|
| `GET` | `identity/oidc/config` |
### Sample Request
```
$ curl \
--header "X-Vault-Token: ..." \
--request GET \
http://127.0.0.1:8200/v1/identity/oidc/config
```
### Sample Response
```json
{
"data": {
"issuer": "https://example.com:1234"
},
}
```
## Create a Named Key
This endpoint creates or updates a named key which is used by a role to sign tokens.
| Method | Path |
| :------------------ | :----------------------|
| `POST` | `identity/oidc/key/:name` |
### Parameters
-`name``(string)`– Name of the named key.
-`rotation_period``(int or time string: "24h")` - How often to generate a new signing key. Can be specified as a number of seconds or as a time string like "30m" or "6h".
-`verification_ttl``(int or time string: "24h")` - Controls how long the public portion of a signing key will be available for verification after being rotated.
-`allowed_client_ids``(list: [])` - Array of role client ids allowed to use this key for signing. If empty, no roles are allowed. If "*", all roles are allowed.
-`verification_ttl``(string: <optional>)` - Controls how long the public portion of the key will be available for verification after being rotated. Setting verification_ttl here will override the verification_ttl set on the key.
Create or update a role. ID tokens are generated against a role and signed against a named key.
| Method | Path |
| :------------------ | :----------------------|
| `POST` | `identity/oidc/role/:name` |
### Parameters
-`name``(string)`– Name of the role.
-`key``(string)`– A configured named key, the key must already exist.
-`template``(string: <optional>)` - The template string to use for generating tokens. This may be in string-ified JSON or base64 format.
-`ttl``(int or time string: "24h")` - TTL of the tokens generated against the role. Can be specified as a number of seconds or as a time string like "30m" or "6h".
Query this path to retrieve a set of claims about the identity tokens' configuration. The response is a compliant [OpenID Provider Configuration Response](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).