
OpenID Connect
Configuration
Hide Child Parameters
An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a 4xx
HTTP status code. This value must refer to the consumer id
or username
attribute, and not its custom_id
.
Types of credentials/grants to enable.
Allowed values:authorization_codebearerclient_credentialsintrospectionkong_oauth2passwordrefresh_tokensessionuserinfo
Default:authorization_code, bearer, client_credentials, introspection, kong_oauth2, password, refresh_token, session, userinfo
The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.
Where to look for the bearer token: - header
: search the Authorization
, access-token
, and x-access-token
HTTP headers - query
: search the URL’s query string - body
: search the HTTP request body - cookie
: search the HTTP request cookies specified with config.bearer_token_cookie_name
.
Allowed values:bodycookieheaderquery
Default:body, header, query
The default OpenID Connect client authentication method is ‘client_secret_basic’ (using ‘Authorization: Basic’ header), ‘client_secret_post’ (credentials in body), ‘client_secret_jwt’ (signed client assertion in body), ‘private_key_jwt’ (private key-signed assertion), ‘tls_client_auth’ (client certificate), ‘self_signed_tls_client_auth’ (self-signed client certificate), and ‘none’ (no authentication).
Allowed values:client_secret_basicclient_secret_jwtclient_secret_postnoneprivate_key_jwtself_signed_tls_client_authtls_client_auth
This field is referenceable.
Hide Child Parameters
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is encrypted.
This field is referenceable.
This field is referenceable.
Hide Child Parameters
Cluster addresses to use for Redis connections when the redis
strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.
>= 1 characters
Hide Child Parameters
Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return nil
. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than keepalive_pool_size
. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than keepalive_pool_size
.
>= 0<= 2147483646
The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither keepalive_pool_size
nor keepalive_backlog
is specified, no pool is created. If keepalive_pool_size
isn’t specified but keepalive_backlog
is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.
Default:256
>= 1<= 2147483646
Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.
This field is referenceable.
This field is encrypted.
Sentinel node addresses to use for Redis connections when the redis
strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.
>= 1 characters
Hide Child Parameters
Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.
This field is referenceable.
This field is encrypted.
Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won’t be performed. This requires Redis v6.2.0+.
This field is referenceable.
If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate
in kong.conf
to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth
accordingly.
Default:false
Username to use for Redis connections. If undefined, ACL authentication won’t be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to default
.
This field is referenceable.
A string representing a URL, such as https://example.com/path/to/resource?q=search.
A string representing a URL, such as https://example.com/path/to/resource?q=search.
Skip the token signature verification on certain grants: - password
: OAuth password grant - client_credentials
: OAuth client credentials grant - authorization_code
: authorization code flow - refresh_token
: OAuth refresh token grant - session
: session cookie authentication - introspection
: OAuth introspection - userinfo
: OpenID Connect user info endpoint authentication.
Allowed values:authorization_codeclient_credentialsintrospectionpasswordrefresh_tokensessionuserinfo
Default:[]
The value of Accept
header for introspection requests: - application/json
: introspection response as JSON - application/token-introspection+jwt
: introspection response as JWT (from the current IETF draft document) - application/jwt
: introspection response as JWT (from the obsolete IETF draft document).
Allowed values:application/jsonapplication/jwtapplication/token-introspection+jwt
Default:application/json
The introspection endpoint authentication method: : client_secret_basic
, client_secret_post
, client_secret_jwt
, private_key_jwt
, tls_client_auth
, self_signed_tls_client_auth
, or none
: do not authenticate
Allowed values:client_secret_basicclient_secret_jwtclient_secret_postnoneprivate_key_jwtself_signed_tls_client_authtls_client_auth
This field is referenceable.
A string representing a URL, such as https://example.com/path/to/resource?q=search.
This field is referenceable.
What tokens to include in response
body or redirect
query string or fragment: - id_token
: include id token - access_token
: include access token - refresh_token
: include refresh token - tokens
: include the full token endpoint response - introspection
: include introspection response.
Allowed values:access_tokenid_tokenintrospectionrefresh_tokentokens
Default:id_token
A string representing a URL, such as https://example.com/path/to/resource?q=search.
This field is referenceable.
If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.
Default:true
Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP’s key are verified with the proof.
Allowed values:offoptionalstrict
Default:off
Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.
Allowed values:offoptionalstrict
Default:off
A string representing a URL, such as https://example.com/path/to/resource?q=search.
Hide Child Parameters
Cluster addresses to use for Redis connections when the redis
strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.
>= 1 characters
Hide Child Parameters
Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return nil
. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than keepalive_pool_size
. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than keepalive_pool_size
.
>= 0<= 2147483646
The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither keepalive_pool_size
nor keepalive_backlog
is specified, no pool is created. If keepalive_pool_size
isn’t specified but keepalive_backlog
is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.
Default:256
>= 1<= 2147483646
Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.
This field is encrypted.
This field is referenceable.
Sentinel node addresses to use for Redis connections when the redis
strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.
>= 1 characters
Hide Child Parameters
Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.
This field is encrypted.
This field is referenceable.
Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won’t be performed. This requires Redis v6.2.0+.
This field is referenceable.
If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate
in kong.conf
to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth
accordingly.
Default:false
Username to use for Redis connections. If undefined, ACL authentication won’t be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to default
.
This field is referenceable.
Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of code_challenge_methods_supported
, and enabled automatically (in case the code_challenge_methods_supported
is missing, the PKCE will not be enabled).
Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of require_signed_request_object
, and enabled automatically (in case the require_signed_request_object
is missing, the feature will not be enabled).
Response mode passed to the authorization endpoint: - query
: for parameters in query string - form_post
: for parameters in request body - fragment
: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - query.jwt
, form_post.jwt
, fragment.jwt
: similar to query
, form_post
and fragment
but the parameters are encoded in a JWT - jwt
: shortcut that indicates the default encoding for the requested response type.
Allowed values:form_postform_post.jwtfragmentfragment.jwtjwtqueryquery.jwt
Default:query
The revocation endpoint authentication method: : client_secret_basic
, client_secret_post
, client_secret_jwt
, private_key_jwt
, tls_client_auth
, self_signed_tls_client_auth
, or none
: do not authenticate
Allowed values:client_secret_basicclient_secret_jwtclient_secret_postnoneprivate_key_jwtself_signed_tls_client_authtls_client_auth
Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. [ "id", "timeout" ]
will set Session-Id and Session-Timeout request headers.
Allowed values:absolute-timeoutaudienceididling-timeoutrolling-timeoutsubjecttimeout
Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. [ "id", "timeout" ]
will set Session-Id and Session-Timeout response headers.
Allowed values:absolute-timeoutaudienceididling-timeoutrolling-timeoutsubjecttimeout
The session secret.
This field is encrypted.
This field is referenceable.
The session storage for session data: - cookie
: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn’t require a database) - memcache
: stores session data in memcached - redis
: stores session data in Redis.
Allowed values:cookiememcachememcachedredis
Default:cookie
The token endpoint authentication method: client_secret_basic
, client_secret_post
, client_secret_jwt
, private_key_jwt
, tls_client_auth
, self_signed_tls_client_auth
, or none
: do not authenticate
Allowed values:client_secret_basicclient_secret_jwtclient_secret_postnoneprivate_key_jwtself_signed_tls_client_authtls_client_auth
Enable the sending of the token endpoint response headers only with certain grants: - password
: with OAuth password grant - client_credentials
: with OAuth client credentials grant - authorization_code
: with authorization code flow - refresh_token
with refresh token grant.
Allowed values:authorization_codeclient_credentialspasswordrefresh_token
Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with scope
values, like this: config.token_post_args_client=scope
In this case, the token would take the scope
value from the query parameter or from the request body or from the header and send it to the token endpoint.
A string representing a URL, such as https://example.com/path/to/resource?q=search.
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.