Create a new application for the API Experience Hub portal in the identity provider using OpenID Connect.
-
In Okta, create an OpenID Connect Web application. For more information, see Create OIDC app integrations.
-
From the General Settings section, complete these fields:
Field Value App integration name
Enter a name for the app.
Grant type
Select Authorization Code.
Assignments
Select Limit access to selected groups.
Selected group(s)
Enter the name of the group who must have access to the application.
-
Verify that your identity provider sends the expected claims listed in the Required Claims and Attributes.
-
Configure the claims that the application sends.
For example, for OpenID Connect for Okta, configure the groups claim using these steps:
-
From the Sign On tab, click Edit from the OpenID Connect ID Token section.
-
From Groups claim type, select Filter.
-
From Groups claim filter, enter
groups
. -
Select Matches regex for the expression then enter
.*
for wildcard.
-
-
Configure an authentication provider for Salesforce using OpenID Connect.
You set up the auth provider or SSO settings in Salesforce with the identity provider application information.
-
From the OpenID Connect application, get these configuration values:
-
Client ID
-
Client Secret
-
Authorize Endpoint URL
-
Token Endpoint URL
-
User Info Endpoint URL
-
-
In Salesforce, go to Setup.
-
In the Quick Find box, enter
Auth
, and then select Auth. Providers. -
Click New and select OpenID Connect for the Provider Type.
-
Complete these fields:
Field Value Provider Type
OpenID Connect
Name
Enter a name for the provider.
Consumer Key
Enter the client ID from the identity provider.
Consumer Secret
Enter the client secret from the identity provider.
Authorize Endpoint URL
Token Endpoint URL
User Info Endpoint URL
Default Scopes
profile openid email groups
Registration handler
AEHPortalRegistrationHandler
Execute Registration As
Select an administrator user.
-
Click Save.
-
-
Configure the redirect URIs for the portal.
To configure the redirects, use your 15 digit organization ID and 18 digits org ID and add a URL for each organization ID.
-
In the Okta application, select the General tab. Add the following URLs for Sign-in redirect URIs:
-
https://${domain}.my.site.com/aeh/services/authcallback/${authProviderURLSuffix}
To find the URLs:
-
For salesforceOrganizationId, go to Setup > Company Information.
-
For authProviderURLSuffix, go to Setup > Auth Providers, click your auth provider, and select URL Suffix.
-
For domain, go to Setup > My Domain > Current My Domain URL.
-
Map the Application to the Identity Provider for Anypoint Platform NOTE: Skip this step if you’re configuring a new identity provider for Anypoint Platform. Go to Step 2: Add Salesforce Identity Providers.
If there’s an existing identity provider already configured for Anypoint Platform, you must map the identity provider ID with the anypoint_idp_id by adding and configuring a new custom attribute called anypoint_idp_id.
If usernames for the portal and Anypoint Platform don’t match, add another custom attribute called anypoint_username to force an update for existing identity provider users to match the identity in the portal to the users in Anypoint Platform.
To map anypoint_idp_id to with the Anypoint Platform identity provider ID for OKTA:
-
In the Okta application, go to Directory > Profile Editor and select the portal application that you just configured.
-
Click Add Attributes to create a new attribute called anypoint_idp_id.
-
Complete these fields:
Field Value Display name
anypoint_idp_id
Value name
anypoint_idp_id
-
Save your changes.
-
Go to Access Management > Identity Providers and click the identity provider.
-
From the browser URL, copy the 32 digit ID.
-
Go to Okta > Directory > Profile Editor and click Mappings
-
Paste the ID into the empty field for the new anypoint_idp_id attribute. The ID must be in quotes.
-
From the yellow arrow drop-down menu, select Apply mapping on user create and update.
-
Save your changes.
-
Apply the mappings to all users in the profile.
If the user already exists and logs in to the portal before the anypoint_idp_id is set, the default identity provider AEH Users - ${salesforceOrganizationId} is used. To prevent the user from being duplicated, the user isn’t added to the new identity provider specified in the anypoint_idp_id field.
If the user already exists in Salesforce and uses SSO to log in to the portal, the API Experience Hub Member User permission set is assigned to that user (if no permission set is already assigned).
-
To reconcile the usernames assignment for a single identity in the portal and Anypoint Platform:
-
In the Okta application, go to Directory > Profile Editor and select the portal application that you just configured.
-
Click Add Attributes to create a new attribute called anypoint_username.
-
Complete these fields:
Field Value Display name
anypoint_username
Value name
anypoint_username
-
Save your changes.
-
Click Mappings.
-
In the empty field of the new anypoint_username attribute, enter
String.substringBefore(user.login, "@")
. Since Okta usernames are email-based, this expression removes the email domain.
-
-
From the yellow arrow drop-down menu, select Apply mapping on user create and update.
-
Save your changes.
-