You are browsing documentation for an outdated version.
See the latest documentation here.
OIDC Authenticated Group Mapping
Using Kong’s OpenID Connect plugin (OIDC), you can map identity provider (IdP)
groups to Kong roles. Adding a user to Kong in this way gives them access to
Kong based on their group in the IdP.
Admin accounts are now created automatically
when you map your identity provider (IdP) groups to Kong roles. You do
not need to create the users, groups, and roles separately. These users then accept invitations to join
Kong Manager and log in with their IdP credentials.
Important: In v2.7.x, the
admin_claim parameter replaces the
consumer_claim parameter required by
If an admin’s group changes in the IdP, their Kong admin account’s associated
role also changes in Kong Gateway the next time they log in to Kong
Manager. The mapping removes the task of manually managing access in
Kong Gateway, because it makes the IdP the system of record.
Apply OIDC auth mapping to Kong Gateway
Review important values
In the following examples, you specify the
to identify which admin value and role name to map from the IdP to Kong Gateway, as well as
admin_auto_create_rbac_token_disabled to specify whether an RBAC token is created for admins in Kong.
admin_claim value specifies which IdP username value should map to Kong Manager.
The username and password are required for the user to log into the IdP.
authenticated_groups_claim value specifies which IdP claim should be used to assign Kong Gateway roles to the
specified Kong Gateway admin.
This value depends on your IdP – for example, Okta configures claims for
groups, and another IdP might configure them as
In the IdP, the group claim value must follow the format
For example, if
"authenticated_groups_claim": ["groups"] is specified, and in the IdP
groups:["default:super-admin"] is specified, the administrators specified in
admin_claim are assigned to the super-admin role in the default Kong Gateway workspace.
If the mapping does not work as expected, decode the JWT that’s created by your IdP, and make sure that the admin ID token includes the key:value pair
groups:["default:super-admin"] for the case of this example, or the appropriate claim name and claim value as set in your IdP.
admin_auto_create_rbac_token_disabled boolean enables or disables RBAC token
creation when automatically creating admins with OpenID Connect. The default is
- Set to
true to disable automatic token creation for admins
- Set to
false to enable automatic token creation for admins
admin_auto_create boolean enables or disables admin auto-creation
with OpenID Connect. The default is
- Set to
true to enable automatic admin creation
- Set to
false to disable automatic admin creation
Set up mapping