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 an optional port number.
Sample Payload
Sample Request
Sample Response
Read Configurations for the Identity Tokens Backend
This endpoint queries vault identity tokens configurations.
Method | Path |
---|---|
GET | identity/oidc/config |
Sample Request
Sample Response
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.algorithm
(string: "RS256")
- Signing algorithm to use. Allowed values are: RS256 (default), RS384, RS512, ES256, ES384, ES512, EdDSA.
Sample Payload
Sample Request
Read a Named Key
This endpoint queries a named key and returns its configurations.
Method | Path |
---|---|
GET | identity/oidc/key/:name |
Parameters
name
(string)
– Name of the key.
Sample Request
Sample Response
Delete a Named Key
This endpoint deletes a named key.
Method | Path |
---|---|
DELETE | identity/oidc/key/:name |
Parameters
name
(string)
– Name of the key.
Sample Request
List Named Keys
This endpoint will List all named keys.
Method | Path |
---|---|
LIST | identity/oidc/key |
Sample Request
Sample Response
Rotate a Named Key
This endpoint rotates a named key.
Method | Path |
---|---|
POST | identity/oidc/key/:name/rotate |
Parameters
name
(string)
– Name of the key to be rotated.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.
Sample Payload
Sample Request
Create or Update a Role
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.client_id
(string: <optional>)
- Optional client ID. A random ID will be generated if left unset.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".
Sample Payload
Sample Request
Read a Role
This endpoint queries a role and returs its configuration.
Method | Path |
---|---|
GET | identity/oidc/role/:name |
Parameters
name
(string)
– Name of the role.
Sample Request
Sample Response
Delete a Role
This endpoint deletes a role.
Method | Path |
---|---|
DELETE | identity/oidc/role/:name |
Parameters
name
(string)
– Name of the role.
Sample Request
List Roles
This endpoint will list all signing keys.
Method | Path |
---|---|
LIST | identity/oidc/role |
Sample Request
Sample Response
Generate a Signed ID Token
Use this endpoint to generate a signed ID (OIDC) token.
Method | Path |
---|---|
GET | identity/oidc/token/:name |
Parameters
name
(string: "")
– The name of the role against which to generate a signed ID token
Sample Request
Sample Response
Introspect a signed ID Token
This endpoint can verify the authenticity and active state of a signed ID token.
Method | Path |
---|---|
POST | identity/oidc/introspect |
Parameters
token
(string)
– A signed OIDC compliant ID tokenclient_id
(string: <optional>)
- Specifying the client ID additionally requires the token to contain a matchingaud
claim
Sample Payload
Sample Request
Sample Response
Read .well-known Configurations
Query this path to retrieve a set of claims about the identity tokens' configuration. The response is a compliant OpenID Provider Configuration Response.
Method | Path |
---|---|
GET | identity/oidc/.well-known/openid-configuration |
Sample Request
Sample Response
Read Active Public Keys
Query this path to retrieve the public portion of named keys. Clients can use this to validate the authenticity of an identity token.
Sample Request
Sample Response