You can configure Salesforce to use Identity as a Service for multi-factor authentication.
Note: Before you begin, create a domain on Salesforce. Consult the Salesforce documentation for instructions.
To integrate Salesforce with Identity as a Service, complete the following steps:
For this integration, you must ensure that the email system user attribute is set to mandatory.
Create a custom user attribute
1. Click
> Members > Attributes.
The User Attributes List page appears.
2. Under
Custom User Attributes, click . The Add User Attribute
dialog box appears.
3. Enter a User Attribute Name for the custom user attribute.
4. Optional: Check Required to make the user attribute mandatory.
5. Click Add to create the attribute. The attribute now appears in the list of Custom User Attributes.
1. Log in to Identity as a Service.
2. Click
> Security > Applications. The Applications
List page appears.
3. Click Add. The Select an Application Template page appears.
4. Under OpenID Connect and OAuth Cloud Integrations, click Salesforce OIDC. The Add Salesforce OIDC page appears.
5. Modify the Application Name and Application Description, if required.
6. Optional. Add a custom application logo, as follows:
a. Click next
to Application Logo. The Upload
Logo dialog box appears.
b. Click
to select an image file to upload.
c. Browse to select your file and click Open. The Upload Logo dialog box reappears showing your selected image.
d. If required, resize your image.
e. Click OK.
7. Select the Authentication Flow that appears to users during login.
8. Click Next. The General Settings and Authentication Settings page appears.
9. In the General Settings, do the following:
Attention: Identity as a Service generates the Client ID, Client Secret, and Registration Handler Script automatically. You will copy and paste these values into the required settings of your Salesforce OIDC application account in Step 4:Modify the Auth. Provider settings in Salesforce.
a. Select the OIDC Signing Certificate used to connect to the Salesforce OIDC.
b. Optional: Deselect Show Login Redirect URL in My Profile to hide the application from a user's profile.
c. Click Add next to Login Redirect URIs.
d. In the Add Login Redirect URI field, enter https://todo.com and then click OK.
e. Deselect Enable Go Back Button if you do not want users to be able to go back to the Salesforce OIDC login page to log in.
f. Accept the defaults for the remaining General Settings.
10. In the Authentication Settings, do the following:
a. Select Require Content to require that users respond to a consent prompt for each request.
b. Optional. Enter a Consent Message to include a message to users when consent is requested.
c. Set Max Authentication Age (seconds) to the maximum amount of time that can elapse before a user must re-authenticate to log in. This feature is disabled if the field is left blank.
d. Under Grant Types, select Authorization Code. The Grant Type tells Identity as a Service what flow to use for returning authorization responses.
e. From the Authorization Code PKCE Code Challenge Method drop-down list, select None as the method used with PKCE during authentication.
f. Select Include Authentication Time to include the authentication time for all tokens.
g. From the ID Token Signing Algorithm drop-down list, select RS256 as the signing algorithm used to sign with ID Token during authentication.
h. From the User Info Signing Algorithm, select none.
11. The authorization request uses Supported Scopes to establish a connection between Identity as a Service 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.
Note: Click 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 Identity as a Service 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 Identity as a Service user attribute for each Implied Claim associated with Address. See Create and manage user attributes.
12. Do not modify any of the Supported Claims selected settings.
13. Copy the Registration Handler Script.
14. Click Submit. A success message appears.
15. Make note of the Client ID value. You enter this value as the Consumer Key during Step 4: Modify the Auth Provider Settings in Salesforce.
16. Click Submit.
Note: To use this configuration, the email system user attribute must be configured as mandatory. See Create custom user attributes for more information.
Create a resource rule to protect access to OIDC applications
1. Log in to your Identity as a Service administrator account.
2. Click
> Security
> Resource Rules. The Resource Rules List
page appears.
3. Click + next to the application you want to protect with a resource rule. The Add Resource Rules page appears.
4. Enter a Rule Name and Rule Description for the resource rule.
5. In the Groups list, select the group or groups of users restricted by the resource rule.
These are the groups to which the resource rule applies. If you do not select any groups, by default the resource rule applies to all groups.
6. Click Next. The Authentication Conditions Settings page appears.
7. Optional: Select Disable Single Sign-On for Application to force a user to re-authenticate whenever they attempt a new login.
8. If you do not Enable Advanced Risk Factors, do the following:
a. Select the Authentication Flow from the drop-down list. The Authentication Flow flowchart updates based on the selection.
b. Click Submit to save the Resource Rule.
9. If you want to Enable Advanced Risk Factors, complete the remaining steps in this procedure.
10. Select Enable Advanced Risk Factors to add additional risk factors to the resource rule.
11. Select Enable Strict Access for Application to set the resource rule to deny access regardless of the outcome from other resource rules. If this option is disabled for any resource rule that denies access, the user is allowed access if at least one resource rule allows access.
12. For each Advanced Risk Factor, click the Deny option to deny access to the application if the risk factor fails regardless of the results of the other risk factors.
13. Click Date/Time to set the conditions as follows:
a. Select one of the following:
– Allow Date/Time to set when a user can access the application.
– Deny Date/Time to set when the user cannot access the application.
The Date/Time Context Condition Settings appear.
b. Select the Condition Type:
– Specific Date Range Condition—Allows or denies access to the application during a select period of days.
– Time-of-day and/or Day of Week Recurring Conditions—Allows or denies access to the application on a specific time of day, day of the week, or both. Recurring times selected only apply to days not denied.
– Clear Selection—Clears existing Date and Time conditions.
c. Set the Condition Type settings, as follows:
i) Select Use local time zone to use the local time zone or deselect Use local time zone to use the local time zone and begin typing the time zone in the Begin Typing Timezone name field and select the time zone from the drop-down list.
ii) If you selected Specific Date Range Condition, click Start Date to select a start date from the pop-up calendar. Optionally, select the End Date.
iii) If you selected Time-of-Day and/or Day-of-Week, click Start Time and select the start time from the pop-up clock. Optionally set the End Time. You must also select the days of the week for the condition.
d. Click Save to return to the Authentication Conditions Settings page.
14. Click Geolocation to set the Location Condition Settings, as follows:
a. Select Allow or Deny to create an allowed or denied country list.
b. From the Selected Countries drop-down list, select the countries to add or deny access to the application. Repeat until you have added all the desired countries to the list.
c. Select Allow Anonymous IP Address to increase the risk of users authenticating from an anonymous IP.
d. Click Save to save to return to the Authentication Conditions Settings page.
15. Click Source IP Address. The IP Address Risk Setting dialog box appears. Do one of the following:
a. Select Custom and add the required IP Allowed Addresses and IP Denied Addresses.
b. Select IP List Address and select the IP List to allow or deny.
c. Select None to not restrict any IP addresses.
d. Click OK to return to the Authentication Conditions Settings.
16. Click Machine Authentication to set the Machine Authentication Condition Settings, as follows:
a. Set the Machine Authentication Risk is less than or equal to the value that the machine authenticator's total risk score must be less than during authentication to pass this condition.
The risk score is based on the attribute differences
between a user's Machine Authentication information and that recorded
on Identity as a Service before the condition fails. If an attribute does
not match, the attribute incurs the number of risk points shown in Non-Matching Risk Points for that attribute. The
Non-Matching Risk Points values of each non-matching
attribute are added together, resulting in a total risk score. This score
is normalized to be out of 100 as follows:
Total Risk Score = (Total Risk Points
of Failing Attributes / Maximum Risk Points of All Enabled Attributes)
* 100
The resource rule condition fails when the number of non-matching risk
points exceeds the Machine Authentication Risk value defined in this step.
A value of 0 means that a single attribute
difference causes the Device Fingerprint
condition to fail. The default value is 3.
The value between 0-50 can be entered.
The default value is defined by the Machine Risk Limit.
See Modify machine authenticator settings.
b. Click Save.
17. Define the Location History / Known Locations and Travel Velocity conditions. The Risk-Based Authentication (RBA) settings of your Identity as a Service account define the location history and travel velocity conditions. See Manage risk-based authentication settings for more information.
18. Set the Device Certificates risk factor to require the client to perform client-authenticated SSL with a certificate issued from a trusted CA to pass.
19. Set the risk score for application conditions to set the risk percentage a user receives if they fail to meet the condition, as follows:
● Click the dot next to the condition setting and slide the risk scale to the risk percentage
-or-
● Click the 0% and enter the risk points and then click OK.
The default setting is 0%. The Risk percentage determines the authentication requirements as set by the Authentication Decision. When a user attempts to authenticate to an application, the final risk percentage is the sum of all failed conditions.
20. Set the Authentication Decision risk level for Medium Risk and High Risk as follows:
a. Click the risk threshold percentage to the right of Medium Risk or High Risk. The Risk Threshold dialog box appears.
b. Enter the risk percentage.
c. Click OK.
21. Select the Authentication Flows for Low Risk, Medium Risk, and High Risk from the drop-down lists. The Authentication Flows flowchart updates based on your selections.
22. Click Submit to create the resource rule.
To complete this procedure, you need to have Identity as a Service open as you copy and paste information from Identity as a Service into Salesforce.
1. Log in to your Salesforce administrator account.
2. Click
the cogwheel () and click
Service Setup.
3. In the Navigation pane, click Identity > Auth Providers. The Auth Providers page appears.
4. Click New. The Auth. Provider Edit page appears.
5. From the Provider Type drop-down list, select Open ID Connect.
6. In the Name text box, enter Identity as a Service. The URL Suffix is auto-populated with the same value.
7. In Identity
as a Service,
go to >
Resources > Applications. The Applications
page appears.
8. Click Salesforce OIDC and click Next on the Edit Salesforce OIDC page. The Salesforce OIDC Settings page appears.
9. Copy the Client ID from the Salesforce OIDC settings in Identity as a Service and paste it in the Consumer Key text box on the Salesforce Auth. Provider page.
10. Copy the Client Secret value from the Salesforce OIDC settings in Identity as a Service and paste it in the Consumer Secret test box on the Salesforce Auth. Provider page.
11. In Identity
as a Service,
go to >
Resources > Applications. The Applications
page appears.
12. Click OIDC Configuration. The OIDC Configuration page appears.
13. Use the information on the Identity as a Service OIDC Configuration page as reference for the next steps.
14. On the Salesforce Auth. Provider page, enter the following:
a. In the Authorize Endpoint URL text box, enter
<Identity as a Service_account_url>/api/oidc/authorize
b. In the Token Endpoint URL text box, enter
<Identity as a Service_account_URL>/api/oidc/token
c. In the User info Endpoint URL text box, enter
<Identity as a Service_account_URL>/api/oidc/userinfo
d. In the Token Issuer text box, enter
<Identity as a Service_account_URL>/api/oidc
e. Optional: In the Custom Error URL text box, you can leave it blank or enter
<Identity as a Service_account_URL>/api/oidc/errors
f. Optional: In the Custom Logout URL text box, enter
<Identity as a Service_account_URL>/api/oidc/endsession
When set, the user is logged out of Identity as a Service when they log out of Salesforce. You can also leave this field blank.
Note: The URL of your Identity as a Service account can also be entered as the Custom Logout URL. This will not log you out of Identity as a Service when you log out of Salesforce but will redirect you back to Identity as a Service.
15. Check Send access token in header.
16. In the Default Scopes text box, enter openid email profile. (Do not include commas. The scopes must be entered separated by spaces.)
17. Select Send client credentials in header. This setting confirms that the client credentials are sent properly to the OIDC Provider.
18. Click Automatically create a registration handler template as the Registration Handler.
19. Click the Execute Registration search icon and select your Salesforce account user name.
20. Set an Icon URL, as follows:
● Enter the URL of a custom icon.
-or-
● 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.
21. Click Save. The Auth. Provider is created. The Salesforce Configuration details appears.
Attention: Leave this page open. You need to reference the Salesforce Configuration URLs in the next procedure, Step 5: Modify Salesforce OIDC applications settings in Identity as a Service.
You need to reference the Salesforce Auth. Provider settings to complete this procedure.
1. Log in to an Identity as a Service account with a role assigned that allows the configuration of applications on Identity as a Service.
2. Click
> Resources > Applications. The Applications
page appears.
3. Click the name of the Salesforce application you configured for OIDC and then click Next. The Settings page appears.
4. 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.
5. 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.
Note: The login redirect URI hostname is added as a valid CORS origin for OIDC processing.
6. Scroll down to the Registration Handler Script.
7. Click Copy To Clipboard to copy the registration handler script.
8. Return to the Auth. Provider page of your Salesforce account.
9. Click the Registration Handler link, for example, AutocreatedRegHandler12345678. The Apex Classes page appears with the Registration Handler code.
10. Click Edit.
11. Delete all of the code.
12. Paste the Identity as a Service Registration Handler Script that you copied to the clipboard in Step 7.
13. Click Save.
Test the integration between your Salesforce and Identity as a Service accounts to confirm that your settings have been configured correctly.
1. Log in to your Salesforce administrator account.
2. Click Settings > Identity > Auth Providers. The Auth Providers page appears.
3. Click the name of your Auth. Provider configuration. The configuration settings appear.
4. Copy and paste the Test-Only Initialization URL into a new Web browser address bar. You are directed to Identity as a Service for authentication if your settings.
5. Enter the User ID of the Identity as a Service user that needs OIDC access, and click Next. Identity as a Service presents the challenge. By default, you are prompted to authenticate using your highest ranking active authenticator.
6. Respond to the authentication challenge.
7. 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 Identity as a Service with Salesforce.
8. Click Allow. You can now access your Salesforce account through Identity as a Service.
1. Log in to your Salesforce administrator account.
2. In the navigation pane, go to Settings >My Company > My Domain. The My Domain page appears.
3. Under Authentication Configuration, click Edit and change the value entered in Your domain name to the domain name of your Salesforce account configured for Identity as a Service authentication.
4. Click Save.
5. Under Authentication Configuration, click Edit and select the name of the your authentication service as an Authentication Service.
6. Deselect Login Page as an Authentication Service.
7. Click Save.
8. Test logging in to Salesforce from your Identity as a Service account to confirm that the configuration was successful.