Salesforce
You can configure Salesforce to use IDaaS for multi-factor authentication.
Before you begin, create a domain on Salesforce. Consult the Salesforce documentation for instructions.
Integrate Salesforce OIDC with IDaaS
To integrate Salesforce with IDaaS, complete the following steps:
- Step 1: Create custom user attributes for Salesforce OIDC
- Step 2: Add Salesforce OIDC to IDaaS
- Step 3: Configure claims
- Step 4: Configure customizations
- Step 5: Add a resource rule
- Step 6: Optional. Add a resource server
- Step 7: Modify the Auth. Provider settings in Salesforce
- Step 8: Modify the Salesforce OIDC settings in IDaaS
- Step 9: Test the integration
- Step 10: Add IDaaS to the Salesforce Logon page
Step 1: Create custom user attributes for Salesforce OIDC
To use this configuration, the email system user attribute must be configured as mandatory. See Create custom user attributes for instructions.
To create a custom user attribute:
- Click > Members > Attributes. The User Attributes List page appears.
- Under Custom User Attributes, click . The Add User Attribute dialog box appears.
- Enter a User Attribute Name for the custom user attribute.
- Optional: Check Required to make the user attribute mandatory.
- Click Add to create the attribute. The attribute now appears in the list of Custom User Attributes.
Step 2: Add Salesforce OIDC to IDaaS
-
Log in to IDaaS.
-
Click > Security > Applications. The Applications List page appears.
-
Click Add. The Select an Application Template page appears.
-
Do one of the following:
- Click OIDC and select Salesforce OIDC from the list of OpenID Connect and OAuth Cloud Applications.
- In the Search bar, enter a search option to filter for the application you want to add to IDaaS.
-
Click Salesforce OIDC. The Add Salesforce OIDC page appears.
-
If required, modify the following App Settings:
- Application Name
- Application Description
-
Configure the OIDC Settings. Settings not described here can be left at the default values.
-
Make note of the Client ID value. You enter this value as the Consumer Key during Step 7: Modify the Auth. Provider settings in Salesforce.
-
Select Client Secret Basic from the Client Authentication Method drop-down list. When using the token, PAR, or revocation endpoints, clients use this authentication method to authenticate to the Authorization Server.
-
Do one of the following:
-
Copy (or update and copy) the Client Secret value. You can then paste the Client Secret value into the required field of your client OIDC application account settings.
-
Optional. Set and copy the Client Secret (Alternative) value as an alternative option to support client secret rollover. You can then paste the Client Secret (Alternative) value into the required field of your client OIDC application account settings.
noteYou can define your own Client Secret values. However, Entrust recommends that you use the strong secret value provided. You can also optionally view or regenerate a new client secret.
-
-
Set the Reauthentication Time (Max Authentication Age) to the maximum amount of time that can elapse before a user must reauthenticate to log in. This feature is disabled if the field is left blank.
-
Select the OIDC Signing Certificate used to connect to the Salesforce OIDC.
-
From the ID Token Signing Algorithm drop-down list, select RS256 as the signing algorithm used to sign with ID Token during authentication.
-
From the UserInfo Signing Algorithm, select none.
-
In the Add Login Redirect URI field,
- Enter
https://todo.com. - Click OK.
- Enter
-
Select Require Consent to require that users respond to a consent prompt for each request.
-
Optional. Enter a Consent Message to include a message to users when consent is requested.
-
Under Grant Types, select Authorization Code. The Grant Type tells IDaaS what flow to use for returning authorization responses.
-
From the Authorization Code PKCE Code Challenge Method drop-down list*, select None as the method used with PKCE during authentication.
-
Do not modify the current setting for the Subject ID Attribute that is included in the ID token and access token to identify the user being authenticated.
-
Optional. Enter a Custom Consent Message to include a message to users when consent is requested.
-
The authorization request uses Supported Scopes to establish a connection between IDaaS and the Salesforce OIDC application. Supported Scopes are selected by default. If you disable Your unique identifier, the Salesforce OIDC application strictly uses an access token to access a resource server API on behalf of a user.
noteClick the arrow next to each scope to see the list of Implied Claims included in the scope. The list of Implied Claims is defined by OpenID Connect and cannot be modified. Every Implied Claim included in the scopes you select under Supported Scopes should have an associated IDaaS user attribute so that the attribute is returned as part of the OIDC tokens sent back to the client. For example, if you select Address as a Supported Scope, then you must define an IDaaS user attribute for each Implied Claim associated with Address. See Create and manage user attributes for instructions to create user attributes.
-
Do not modify any of the Supported Claims selected settings.
-
Copy the Registration Handler Script.
-
-
Click Save.
-
Proceed to Step 3: Configure claims.
Step 3: Configure claims
-
Click the Claims tab. The Claims page appears.
-
If required, add additional Supported Claims to map OIDC claims to IDaaS user attributes.
The supported claims define the claims that are requested by the client during an authorization request. A claim is an IDaaS user attribute, for example,
first name. The user attribute must be included if that claim is requested by the client during an authorization request. The required claims depend on the OIDC application that you are configuring on IDaaS.You can group claims, for example, the default claim, name, includes the user attribute
First Name, a text-based value of a space and the user attribute value ofLast Nameso that the claim returned to the client is First Name<space>Last Name, for exampleAlice Gray. -
To add a claim:
-
Ensure that you have already created the required User Attributes in IDaaS (see Create and manage user attributes).
-
Click . The Add Claim dialog box appears.
-
In the Claim Name field, do one of the following:
- Select the Claim Name from the drop-down list.
- Type a Claim Name to create a new custom claim.
-
In the Enter the Claim value expected by the Service Provider field, enter the following, as required:
- User Attribute Value. An IDaaS user attribute (see Create and manage user attributes).
- Text Based Value. A text based value. For example, to add a space between two claims or add text information.
- Related Value. Include user group or authenticator attributes. See Configure OIDC claim to include user authenticators or groups.
Example:
some text <first Name> <Last Name> [Groups] -
Select Always Return with User Info to always return the user information with the claim.
-
Select Always Return with ID Token to always return the ID Token with the claim.
-
Click Add.
infoIf required, click next to the claim and make the required changes. Click to delete a claim.
-
-
Click Save.
-
Proceed to Step 4: Configure customizations.
Step 4: Configure customizations
- Click the Customization tab. The Customization page appears.
- Deselect Enable Go Back Button if you do not want users to be able to go back to the application login page to log in.
- Optional: Select Respond Immediately for Unsuccessful Responses to return to the application immediately after a login failure, rather than allow the user to try again with a different user ID.
- Optional: Deselect Show Login Redirect URL in My Profile to hide the application from a user's profile.
- Optional. Add a custom application logo, as follows:
- Click next to Application Logo. The Upload Logo dialog box appears.
- Click to select an image file to upload.
- Browse to select your file and click Open. The Upload Logo dialog box displays your selected image.
- If required, resize your image.
- Click OK.
- Select the Login Options that appear to users during login. You must select at least one. For details on each login option and requirements, see Manage login options.
- Click Save.
- Proceed to Step 5: Add a resource rule.
Step 5: Add a resource rule
Step 6: Optional. Add a resource server
- Click the Resource Servers tab.
- Click Add Resource Server.
- Follow the instructions in Add an API/URL resource server.
Step 7: Modify the Auth. Provider settings in Salesforce
To complete this procedure, you need to have IDaaS open as you copy and paste information from IDaaS into Salesforce.
-
Log in to your Salesforce administrator account.
-
Click the cogwheel () and click Service Setup.
-
In the Navigation pane, click Identity > Auth Providers. The Auth Providers page appears.
-
Click New. The Auth. Provider Edit page appears.
-
From the Provider Type drop-down list, select Open ID Connect.
-
In the Name text box, enter IDaaS. The URL Suffix is auto-populated with the same value.
-
In IDaaS, go to > Resources > Applications. The Applications page appears.
-
Click Salesforce OIDC and click Next on the Edit Salesforce OIDC page. The Salesforce OIDC Settings page appears.
-
Copy the Client ID from the Salesforce OIDC settings in IDaaS and paste it in the Consumer Key text box on the Salesforce Auth. Provider page.
-
Copy the Client Secret value from the Salesforce OIDC settings in IDaaS and paste it in the Consumer Secret text box on the Salesforce Auth. Provider page.
-
In IDaaS, go to > Resources > Applications. The Applications page appears.
-
Click OIDC Configuration. The OIDC Configuration page appears.
-
Use the information on the IDaaS OIDC Configuration page as reference for the next steps.
-
On the Salesforce Auth. Provider page, enter the following:
-
In the Authorize Endpoint URL text box, enter
<IDaaS_account_URL>/api/oidc/authorize -
In the Token Endpoint URL text box, enter
<IDaaS_account_URL>/api/oidc/token -
In the User info Endpoint URL text box, enter
<IDaaS_account_URL>/api/oidc/userinfo -
In the Token Issuer text box, enter
<IDaaS_account_URL>/api/oidc -
Optional: In the Custom Error URL text box, you can leave it blank or enter
<IDaaS_account_URL>/api/oidc/errors -
Optional: In the Custom Logout URL text box, enter
<IDaaS_account_URL>/api/oidc/endsessionWhen set, the user is logged out of IDaaS when they log out of Salesforce. You can also leave this field blank.
infoThis will not log you out of IDaaS when you log out of Salesforce but will redirect you back to IDaaS.
-
-
Check Send access token in header.
-
In the Default Scopes text box, enter openid email profile. (Do not include commas. The scopes must be entered separated by spaces.)
-
Select Send client credentials in header. This setting confirms that the client credentials are sent properly to the OIDC Provider.
-
Click Automatically create a registration handler template as the Registration Handler.
-
Click the Execute Registration search icon and select your Salesforce account user name.
-
Set an Icon URL, as follows:
- Enter the URL of a custom icon.
- Click Choose one of our sample icons and select an icon. A URL appears. Copy and paste that URL into the Icon URL text box.
-
Click Save. The Auth. Provider is created. The Salesforce Configuration details appears.
Leave this page open. You need to reference the Salesforce Configuration URLs in the next procedure, Step 8: Modify the Salesforce OIDC settings in IDaaS.
Step 8: Modify the Salesforce OIDC settings in IDaaS
-
You need to reference the Salesforce Auth. Provider settings to complete this procedure.
-
Log in to an IDaaS account with a role assigned that allows the configuration of applications on IDaaS.
-
Click > Resources > Applications. The Applications page appears.
-
Click the name of the Salesforce application you configured for OIDC and then click Next. The Settings page appears.
-
In the Initiate Logon URI text box, enter the Single Sign-On Initialization URL. The URL is listed in the Salesforce Configuration list on the Salesforce Auth Providers page.
-
In the Login Redirect URIs field, click , enter the Callback URL, and then click Add. The URL is listed in the Salesforce Configuration list on the Salesforce Auth Providers page.
noteThe login redirect URI hostname is added as a valid CORS origin for OIDC processing.
-
Scroll down to the Registration Handler Script.
-
Click Copy To Clipboard to copy the registration handler script.
-
Return to the Auth. Provider page of your Salesforce account.
-
Click the Registration Handler link, for example,
AutocreatedRegHandler12345678. The Apex Classes page appears with the Registration Handler code. -
Click Edit.
-
Delete all of the code.
-
Paste the IDaaS Registration Handler Script that you copied to the clipboard in Step 8.
-
Click Save.
Step 9: Test the integration
Test the integration between your Salesforce and IDaaS accounts to confirm that your settings have been configured correctly.
- Log in to your Salesforce administrator account.
- Click Settings > Identity > Auth Providers. The Auth Providers page appears.
- Click the name of your Auth. Provider configuration. The configuration settings appear.
- Copy and paste the Test-Only Initialization URL into a new web browser address bar. You are directed to IDaaS for authentication if your settings are correct.
- Enter the User ID of the IDaaS user that needs OIDC access, and click Next. IDaaS presents the challenge. By default, you are prompted to authenticate using your highest ranking active authenticator.
- Respond to the authentication challenge.
- Click Login if required. You are asked to allow access to the information included in the scopes or claims. You set these set the scopes when you configured IDaaS with Salesforce.
- Click Allow. You can now access your Salesforce account through IDaaS.
Step 10: Add IDaaS to the Salesforce Logon page
- Log in to your Salesforce administrator account.
- In the navigation pane, go to Settings >My Company > My Domain. The My Domain page appears.
- Under Authentication Configuration, click Edit and change the value entered in Your domain name to the domain name of your Salesforce account configured for IDaaS authentication.
- Click Save.
- Under Authentication Configuration, click Edit and select the name of your authentication service as an Authentication Service.
- Deselect Login Page as an Authentication Service.
- Click Save.
- Test logging in to Salesforce from your IDaaS account to confirm that the configuration was successful.