Configuring Okta for Dynamic Client Registration
Prerequisites
- Enterprise Konnect account.
- An Okta account.
Issuer URL
Using your Okta credentials, log in to the Okta portal and follow these steps:
-
Select Security from the menu.
-
Select Security > API. The default Issuer URL 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.
Create a token
-
Select Security from the menu.
-
Select Security > API.
-
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 place you can reference, because it will only be visible as a hash afterwards.
Add scopes
-
Select Security from the menu.
-
Select Security > API.
-
Select the authorization server that you want to configure.
-
Select the Scopes tab, and click the Add Scope button.
Add claim
In order to map an application from the Dev Portal to Okta, you have to create a claim.
-
Select Security from the menu.
-
Select Security > API.
-
Select the authorization server that you want to configure.
-
Select the Claims tab. and then click the Add Claim button.
-
Enter a name for this claim, and enter app.clientId for value. We can leave the value type as expression, and include it in any scope.
Configure the Dev Portal
Once you have Okta configured, you can set up the Dev Portal to use Okta for dynamic client registration (DCR).
-
Sign in to Konnect, then select
Dev Portal from the menu.
-
Click Settings to open the Dev Portal settings.
-
Click the Application Setup tab to open the DCR settings for your Dev Portal.
-
Enter the Issuer URL for your authorization server, and the Token that were created in Okta.
-
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: You can use any of the existing scopes besides
openid
, as using theopenid
scope prevents you from using client credentials. If the Scopes field is empty,openid
will be used. -
Click Save.
If you previously configured any DCR settings, this will overwrite them.
Create an application with DCR
From the My Apps page in the Dev Portal, follow these instructions:
-
Click the New App button.
-
Fill out the Create New Application form with your application name, redirect URI, and a description.
-
Click Create to save your application.
-
After your application has been created, you will see the Client ID and Client Secret. Please store these values, they will only be shown once.
Click Proceed to continue to the application’s details page.
-
Once your application is created, you will see it in Okta. From your Okta organization select Applications from the menu. You will see your application that was created in the Dev Portal, and its corresponding Client ID.
Make a successful request
In the previous steps, you obtained the Client ID and Client Secret. To authorize the request, you must attach this client secret pair in the header. You can do this by using any API product, such as Insomnia, or directly using the command line:
curl example.com/REGISTERED_ROUTE -H "Authorization: Basic CLIENT_ID:CLIENT_SECRET"
Where example.com
is the address of the data plane.