このページは、まだ日本語ではご利用いただけません。翻訳中です。
Configure SSO with Okta
Kong Konnect provides built-in authentication,
allowing you to setup users and teams
for Konnect authentication and authorization. Alternatively, you can set up single sign-on (SSO)
access to Konnect using OpenID Connect (OIDC) or Security Assertion Markup Language (SAML).
These authentication methods allow your users to log in to Konnect using IdP authorization,
without needing additional Konnect specific credentials. You can also configure a mapping
between Okta group claims and Kong Konnect teams, allowing for Konnect user team assignments
from within Okta.
This topic provides specific instructions for configuring SSO with Okta.
See Configure Generic SSO for general instructions on setting up SSO for other identity providers.
It is recommended to use a single authentication method, however, Konnect supports the ability to
combine built-in authentication with either OIDC or SAML based SSO. Combining both OIDC and SAML based SSO is not supported.
Keep built-in authentication enabled while you are testing IdP authentication and only disable it after successfully testing
your SSO configuration.
Prerequisites
- An Okta account with administrator access to configure Applications and Authorization Server settings.
- A non-public Kong Konnect Dev Portal created in your Konnect organization.
- From the Applications section of the Okta console, select Create App Integration
and choose OIDC - OpenID Connect
with Web Application for the Application type. Provide the following configuration details:
-
Grant type: Authorization Code
-
Sign-in redirect URIs:
https://cloud.konghq.com/login
-
Sign-out redirect URIs:
https://cloud.konghq.com/login
-
Optional: If you want to map Okta group claims to Konnect
Organization Teams,
modify the OpenID Connect ID Token claims
in the Application->Sign On section of the Okta configuration, setting the following values:
-
Group claims type:
Filter
-
Group claims filter: Enter
groups
for the claim name and enter Matches regex as the filter type and .*
for the filter value.
This claim specifies which user’s groups to include in the token, in this case the wildcard regex specifies that all groups will be included.
If the authorization server is retrieving additional groups from
third-party applications (for example, Google groups), the groups
claim
will not contain them. If it is desired to use these third-party groups, the Okta
administrator will need to duplicate them directly in Okta or use a custom token
to include them in the groups
claim.
-
Assign desired groups and users to the new Okta application.
-
Locate the following values in the Okta console, which will be used later for the
Konnect configuration.
-
Client ID: Located in your Application General -> Client Credentials settings.
-
Client Secret: Located in your Application General -> Client Secrets settings.
-
Issuer URI : The Issuer is typically found in the Security -> API -> Authorization Servers settings.
It should look like the following:
https://<okta-org-id>.okta.com/oauth2/default
- From the Applications section of the Okta console, select Create App Integration
and choose SAML 2.0.
Provide the following configuration details:
-
Give the application a name that signifies it is for Konnect SAML SSO.
-
Single Sign-On URL: https://global.api.konghq.com/v2/authenticate/login_path/saml/acs
-
Audience URI (SP Entity ID): https://cloud.konghq.com/sp/SP_ID
-
Optional: To include additional user attributes beyond authentication, add the following three attributes in the Attribute Statements:
Name |
Name format |
Value |
firstName |
Unspecified |
user.firstName |
lastName |
Unspecified |
user.lastName |
email |
Unspecified |
user.email |
-
Generate a signing certificate to use in Konnect.
-
Assign desired groups and users to the new Okta application.
Set up Konnect
-
In Konnect,
navigate to
Organization -> Settings and then
the Authentication Scheme tab.
-
Select the Configure option for OIDC.
-
Insert your Issuer URI, Client ID and Client Secret in the OIDC configuration fields.
-
In the Organization Login Path field, enter a value that uniquely identifies your organization. This
path value will be used by Konnect to route users to the correct organization login page.
Requirements:
- The path must be unique across all Konnect organizations.
If your desired path is already taken, you will be prompted to enter another one.
- The path can be any alphanumeric string.
- The path does not require a slash (
/
).
-
Under Advanced Settings, specify the Scopes Konnect requests from Okta.
The openid
scope is required for OIDC authentication. The profile
and email
scopes are recommended so Konnect
obtains the user’s name and email address in the token response.
-
In the Claim Mappings section, set the values of each field to their appropriate token response field name. Use the Okta Token Preview
feature to verify the response token field names will match what you enter in these mappings. The default values are as follows:
- Name:
name
- Email:
email
- Groups:
groups
-
Save the configuration and then select Enable OIDC.
-
In Kong Konnect, click
Organization > Settings, and then click the Authentication Scheme tab.
-
Click Configure for SAML.
-
In Okta, go to Sign On page in the Okta application created in the previous step and copy the
IDP Metadata URL under the Settings section. It should look like: https://<okta-org-id>.okta.com/app/exkgzjkl0kUZB06Ky5d7/sso/saml/metadata
-
In the Organization Login Path field, enter a value that uniquely identifies your organization. This
path value will be used by Konnect to route users to the correct organization login page.
Requirements:
- The path must be unique across all Konnect organizations.
If your desired path is already taken, you will be prompted to enter another one.
- The path can be any alphanumeric string.
- The path does not require a slash (
/
).
-
Save this configuration, Konnect will generate two new values. A Single Sign-On URL
and an Audience URI.
-
In the Okta console, update the previous placeholder Single Sign-On URL and Audience URI (SP Entity ID)
with the new values generated by Konnect.
-
In Konnect, close the configuration dialog and click Enable SAML from the context menu.
Okta users and mapping groups to Konnect teams
While it is not required, it is recommended to use Konnect’s Okta group to
team mapping feature. If you choose not to use this feature then approving new users will require a
two step process. First, the user will need to login to Konnect with their Okta credentials.
They will receive an access error but the new user will be visible to the Konnect administrator.
The administrator can now map the user to a valid Konnect team, which will give the user the required
access. The new user must now re-login to gain access.
Preferably the IdP group to team mapping feature is used to streamline this process. Use the following to enable this feature:
-
In Konnect, go to
Organization > Settings,
click the Team Mappings and enable the IdP Mapping feature.
Each Konnect team can be mapped to one Okta group.
For example, if you have a service_admin
group in Okta, you might map it
to the Service Admin
team in Konnect. You can hover
over the info (i
) icon beside each field to learn more about the team, or
see the teams reference
for more information.
You must have at least one group mapped to save configuration changes.
-
Click Save.
After mapping is set up:
- Okta users belonging to the mapped groups can log in to Konnect.
- When a user logs into Konnect with their Okta account
for the first time, Konnect automatically provisions an account with the
relevant roles.
- If your org already has non-admin Konnect users before
mapping, on their next login they will be mapped to the teams defined by their Okta group membership.
- An organization admin can view all registered users in
Konnect, but cannot edit their team membership from the Konnect side. To
manage automatically-created users, adjust user permissions through Okta, or adjust the team mapping.
Any changes to the mapped Okta groups on the Okta side are reflected in
Konnect. For example:
- Removing a user from a group in Okta also deactivates their
Konnect account.
- Moving a user from one group to another changes their team in Konnect
to align with the new group-to-team mapping.
Debug and test the configuration
The Okta console provides a Token Preview feature which will be useful in
verifying configuration values for these SSO configuration instructions. If you encounter issues configuring SSO with Okta, start by
checking the Token Preview for the Okta application you created.
Test the SSO configuration by navigating to the login URI based on the organization login path you set earlier.
For example, if you successfully configured a login path of examplepath
, navigate to https://cloud.konghq.com/login/examplepath
.
Attempt to login with an Okta user assigned to your new application. If authorization is successful and the
team configuration is correct, the user should be able to access the Konnect organization.
(Optional) Enable Kong Konnect as a dashboard app in Okta
If you want your users to have easy access to Kong Konnect
alongside their other apps,
you can add it to your Okta dashboard.
In Okta, navigate to the General Settings of your application and configure the application icon for users as needed.
Okta reference docs