Configuration
Hide Child Parameters
When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are id
, username
, and custom_id
.
Allowed values:custom_ididusername
Default:custom_id, username
When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.
Allowed values:custom_ididusername
Default:custom_id, username
If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (JSON
). If the key cannot be found, the plugin responds with 401 Unauthorized
. Also if the key is found but cannot be decoded as JWT, it also responds with 401 Unauthorized
.
Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (JSON
) exp
claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection expiry
verification altogether with config.verify_access_token_introspection_expiry
.
Default:0
Specify the claim/property in access token introspection results (JSON
) to be verified against values of config.access_token_introspection_scopes_required
. This supports nested claims. For example, with Keycloak you could use [ "realm_access", "roles" ]
, hich can be given as realm_access,roles
(form post). If the claim is not found in access token introspection results, and you have specified config.access_token_introspection_scopes_required
, the plugin responds with 403 Forbidden
.
Default:scope
Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the config.access_token_introspection_timeout
on access token introspection.
The client password that will be used to authenticate Kong if access_token_jwks_uri
is a uri that requires Basic Auth. Should be configured together with access_token_jwks_uri_client_username
This field is encrypted.
This field is referenceable.
The client username that will be used to authenticate Kong if access_token_jwks_uri
is a uri that requires Basic Auth. Should be configured together with access_token_jwks_uri_client_password
This field is referenceable.
The client password that will be used to authenticate Kong if access_token_keyset
is a uri that requires Basic Auth. Should be configured together with access_token_keyset_client_username
This field is encrypted.
This field is referenceable.
The client username that will be used to authenticate Kong if access_token_keyset
is a uri that requires Basic Auth. Should be configured together with access_token_keyset_client_password
This field is referenceable.
Adjusts clock skew between the token issuer and Kong. The value is added to the token’s exp
claim before checking token expiry against Kong servers’ current time in seconds. You can disable access token expiry
verification altogether with config.verify_access_token_expiry
.
Default:0
If an access token is not provided or no config.access_token_request_header
is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with 401 Unauthorized
(client didn’t send a token) or 500 Unexpected
(a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect
Default:false
When this plugin sets the upstream header as specified with config.access_token_upstream_header
, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The config.access_token_issuer
specifies which keyset
is used to sign the new token issued by Kong using the specified signing algorithm.
Allowed values:ES256ES384ES512EdDSAHS256HS384HS512PS256PS384PS512RS256RS512
Default:RS256
Removes the config.access_token_request_header
from the request after reading its value. With config.access_token_upstream_header
, you can specify the upstream header where the plugin adds the Kong signed token. If you don’t specify a value, such as use null
or ""
(empty string), the plugin does not even try to sign or re-sign the token.
Default:Authorization:Bearer
When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: id
, username
, and custom_id
.
Allowed values:custom_ididusername
Default:custom_id, username
When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an id
, a username
, and a custom_id
. If this parameter is enabled but the mapping fails, such as when there’s a non-existent Kong consumer, the plugin responds with 403 Forbidden
.
When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are id
, username
and custom_id
.
Allowed values:custom_ididusername
Default:custom_id, username
When you use opaque
access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns 401 Unauthorized
instead.
If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (JSON
), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.
You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (JSON
) exp
claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection expiry
verification altogether with config.verify_channel_token_introspection_expiry
.
Default:0
Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the config.access_token_introspection_timeout
on channel token introspection.
If you want to use config.verify_channel_token_signature
, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don’t specify a URI and you pass a JWT token to the plugin, then the plugin responds with 401 Unauthorized
.
The client password that will be used to authenticate Kong if channel_token_jwks_uri
is a uri that requires Basic Auth. Should be configured together with channel_token_jwks_uri_client_username
This field is encrypted.
This field is referenceable.
The client username that will be used to authenticate Kong if channel_token_jwks_uri
is a uri that requires Basic Auth. Should be configured together with channel_token_jwks_uri_client_password
This field is referenceable.
The client password that will be used to authenticate Kong if channel_token_keyset
is a uri that requires Basic Auth. Should be configured together with channel_token_keyset_client_username
This field is encrypted.
This field is referenceable.
The client username that will be used to authenticate Kong if channel_token_keyset
is a uri that requires Basic Auth. Should be configured together with channel_token_keyset_client_password
This field is referenceable.
Adjusts clock skew between the token issuer and Kong. The value will be added to token’s exp
claim before checking token expiry against Kong servers current time in seconds. You can disable channel token expiry
verification altogether with config.verify_channel_token_expiry
.
Default:0
If a channel token is not provided or no config.channel_token_request_header
is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with 401 Unauthorized
(client didn’t send a token) or 500 Unexpected
(a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect
Default:false
When this plugin sets the upstream header as specified with config.channel_token_upstream_header
, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.
Allowed values:ES256ES384ES512EdDSAHS256HS384HS512PS256PS384PS512RS256RS512
Default:RS256
Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload’s expiry or scopes aren’t checked.
Default:true
If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.