Using ForgeRock Identity Cloud as an Identity Provider for Okta

Author:

Brad Tarisznyas

Created at:

Dec 2021

Updated at:

Sep 2022

In this article, we’ll configure ForgeRock Identity Cloud as an OpenID Connect Authorization server for Okta. This lets users log in to Okta via a ForgeRock Identity Cloud tenant, and optionally, dynamically provision the user on Okta.

https://backstage-community-prod.storage.googleapis.com/original/2X/0/013ffed30239d96de3f2d466efbbfede9057b00f

There are may reasons that you may want to configure this. Some organizations have multiple IAM platforms and need to integrate them—this was the case for a customer recently. Or, you may need to add more complex authentication journeys to your Okta deployment while still leveraging your existing Okta integrated SAAS applications. Whatever the reason, the integration can be configured solely through configuration, as ForgeRock Identity Cloud is fully standards-compliant.

We’ll be using a development Okta tenant attained by signing up for an Okta developer account (Okta Developer). Note that although we are using ForgeRock Identity Cloud; this also works with a standalone ForgeRock Access Management deployment. Firstly, we’ll configure ForgeRock Identity Cloud with an OAuth2 client for Okta

  1. Access your ForgeRock Identity Cloud tenant and login as an administrator.

  2. In the Alpha realm, access Applications, and click Add Application.

    https://backstage-community-prod.storage.googleapis.com/original/1X/7bdae384f1f2cc3e4d735758a0f8d77fc5c70897

  3. Select Web, and Next.

https://backstage-community-prod.storage.googleapis.com/original/1X/4b3cefc3489f5b836dbc7a07d5c7aa96336a0783

  1. Enter a client ID and secret, choose a secure value for the secret and store it securely:

https://backstage-community-prod.storage.googleapis.com/original/1X/488f0a9c6c5b7c94f58a879960b353d5873629b4

  1. Configure the Okta client. You’ll need your Okta tenant ID, as it forms part of the URL for the redirect URI.

https://backstage-community-prod.storage.googleapis.com/original/1X/7a20e1949fc534a1f23b39b099f6728d841f01fc

It should look something like this.

https://backstage-community-prod.storage.googleapis.com/original/1X/cec3eb7d7e9eda526c6aef5cdce5a7239c486350

Under Advanced settings, ensure you change the Token Endpoint Authentication method from client_secret_basic to client_secret_post; otherwise, Okta won’t be able to authenticate correctly to the token endpoint, and you will receive a 400 Bad Request from Okta.

https://backstage-community-prod.storage.googleapis.com/original/1X/23ec55b57f8c77ed913f828fe4e32e66f7bf9dda
Advanced settings, correctly set.

https://backstage-community-prod.storage.googleapis.com/original/1X/98e987e67fbfef45ab2662295f6e4d17c44c7adc

Once that is complete, let’s move on to the Okta configuration.

  1. In the Okta configuration, admin interface (https://dev-<tenant_id>-admin.okta.com/) select Security >Identity Providers and click Add Identity Provider.

https://backstage-community-prod.storage.googleapis.com/original/1X/76ff318f803289b644bafa43dffe3bcef124faa02. Create the Identity Provider using the following as a guide.

https://backstage-community-prod.storage.googleapis.com/original/1X/e3f56a5c21cc3a9efc6ab31ae50e523921ec80a4

Note that including the port number in the endpoints is critical, and omitting these will fail validation for the issuer.

https://backstage-community-prod.storage.googleapis.com/original/1X/476deb64a5c374c4323149113d19e636578bec36
To have Okta create the user Just In Time (JIT) if they don’t exist in Okta, under the Show Advanced Settings set If no match found to ‘create new user (JIT). To have Okta update the user’s profile attributes during a login if they have changed in ForgeRock Identity Cloud, set Profile Source > Update attributes for existing users.

In the below configuration, the email is used as the Okta username.

https://backstage-community-prod.storage.googleapis.com/original/1X/853876ede0ddadc819b41c6481068c570d78d045

To change the mapping of attributes from ForgeRock Identity Cloud to Okta, under Directory > Profile Editor’ select ForgeRock Identity Cloud User > Mappings. Here you will be able to update how Okta maps profile attributes.

https://backstage-community-prod.storage.googleapis.com/original/1X/e57dcc553ea0bf8f7830329773c01b69c796290a

I’m just using the defaults for this example, but it’s likely in a real world scenario that you’ll need to update these settings.

  1. To enable the identity provider, you can enable it for the whole tenant, or for a subset of users based on specific route logic (such as a regex on the login). In the example below, all users are redirected to ForgeRock Identity Cloud for authentication. More on Okta routing rules here.

If enabled for the whole tenant, admins will also be redirected to ForgeRock Identity Cloud for authentication, so you should have an account representing your Okta admin user in ForgeRock Identity Cloud using the same email.

https://backstage-community-prod.storage.googleapis.com/original/1X/ec01edefc581be478e18a321f342077e73737593
That completes the configuration…we’re ready to test!

  1. Access you Okta dev tenant at https://dev-<tenant_id>.okta.com

  2. You’ll be redirected to ForgeRock Identity Cloud for authentication

  3. Login with a user that exists in ForgeRock Identity Cloud (in my case I’m using user.10 with an email of user.10@example.com). Note if your test user doesn’t exist in Okta it will be dynamically provisioned based on the response from the userinfo endpoint.

https://backstage-community-prod.storage.googleapis.com/original/1X/92166ec0bb63071d5b9024480de6101845c27c78

You may be prompted to set your preferences, click ‘Next’:

https://backstage-community-prod.storage.googleapis.com/original/1X/95eaaf54b49166201bba87a5d6511db0eeb563d6
Once authenticated, you’ll be prompted for consent, click Allow.

https://backstage-community-prod.storage.googleapis.com/original/1X/771eaf9e3b765b8c5a1d4d1c744bb8f1520789b2

Once consent is granted, you’ll see you are logged into the Okta UI, signifying a successful integration! If you used an admin account, you’ll see the Okta admin interface.

https://backstage-community-prod.storage.googleapis.com/original/1X/e0c1e0f4a66c98e94ebea6051c834446705bb822

From here, you can add the additional step for signing into Okta integrated SAAS applications. For this, you’ll need to use the Authorize URL listed under your ForgeRock Identity Cloud IDP in the Okta admin console.

Happy integrating!