Can developers rotate their Okta DCR credentials?
Yes, developers can create multiple Okta DCR credentials and revoke old ones as needed. See Managing credentials for more information.
You can use Dynamic Client Registration to automatically create Dev Portal applications in Okta. First, create scopes and claims in Okta and copy your Issuer URL. Then, create a new DCR provider in your Dev Portal settings and create a new auth strategy for DCR.
This tutorial requires a Konnect Plus account. If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.
To use this tutorial, you need the following Kong Konnect roles:
For this tutorial, you’ll need a Dev Portal and some Dev Portal settings, like a published API, pre-configured. These settings are essential for Dev Portal to function but configuring them isn’t the focus of this guide. If you don’t have these settings already configured, follow these steps to pre-configure them:
Using your Okta credentials, log in to the Okta portal and click Security > API in the sidebar. The default Issuer URI should be displayed in the Authorization Servers tab. If you are using an authorization server that you configured, copy the issuer URL for that authorization server.
Click Security > API in the sidebar.
From the Tokens tab, click the Create token button.
Enter a name for your token, and then copy the token value.
Important: Store the token in a secure location you can reference later, as it will only be visible as a hashed value after this step.
Click Security > API in the sidebar.
Select the authorization server that you want to configure.
Click the Scopes tab, and click Add Scope.
Configure the scope as needed.
To map an application from the Dev Portal to Okta, you have to create a claim.
Click Security > API in the sidebar.
Select the authorization server that you want to configure.
Click the Claims tab, and then click Add Claim.
Enter a name for this claim, and enter app.clientId for Value. You can leave the Value type as “Expression”, and include it in any scope.
After configuring Okta, you can integrate it with the Dev Portal for Dynamic Client Registration (DCR). This process involves two main steps: first, creating the DCR provider, and second, establishing the authentication strategy. DCR providers are designed to be reusable configurations. This means once you’ve configured the Okta DCR provider, it can be used across multiple authentication strategies without needing to be set up again.
This tutorial uses the Konnect UI to configure DCR, but you can also use the Application Registration API.
Log in to Konnect and select Dev Portal from the menu.
Navigate to Application Auth to see the authentication strategies for your APIs.
Click the DCR Provider tab to see all existing DCR providers.
Navigate to the Auth Strategy tab, then click New Auth Strategy to create an auth strategy that uses the DCR provider:
Enter the names of the Scopes and Claims as comma-separated values in their corresponding fields. The values should match the scopes or claims that were created in Okta.
Note: Avoid using the
openidscope with client credentials as it restricts the use. If no scopes are specified,openidwill be the default.
client_credentials, bearer, session), and click Save.Now that the application auth strategy is configured, you can apply it to an API.
Navigate to your Dev Portal in Konnect and click the Published APIs tab.
Click Publish API, select the API you want to publish, and select your Okta auth strategy for the Authentication strategy.
Click Publish API.
Now that DCR is configured, you can create an application with Dynamic Client Registration by using a developer account.
Navigate to your Dev Portal URL and log in with your developer account.
Select an API and click Use this API.
Complete the Create New Application modal with your application name, authentication strategy, and description.
After the application is created, the Client ID and Client Secret will be displayed.
Make sure to store these values, as they will only be shown once.
After the application is created, it will appear in your IdP. From your IdP organization, select Applications from the sidebar. You will see the application created in the Dev Portal, along with its corresponding Client ID.
For developers to authorize requests, they must attach the client ID and secret pair obtained previously in the header. They can do this by using any API client, such as Insomnia, or directly using the command line:
curl "$KONNECT_PROXY_URL/$ROUTE_PATH" \
--no-progress-meter --fail-with-body \
-H "Authorization: Basic $CLIENT_ID:$CLIENT_SECRET" \
-H "Content-Type: application/json"If you created a new control plane and want to conserve your free trial credits or avoid unnecessary charges, delete the new control plane used in this tutorial.
Can developers rotate their Okta DCR credentials?
Yes, developers can create multiple Okta DCR credentials and revoke old ones as needed. See Managing credentials for more information.