You can connect your Salesforce instance with InsightIDR in order to monitor your Salesforce user accounts and authentication events. This integration relies on access to the Salesforce API in order to issue API calls and receive results in InsightIDR.
However, please make sure that you meet the following Salesforce requirements and best practices:
- You have Salesforce Enterprise Edition.
- The URL https://login.salesforce.com is open and available for the InsightIDR Collector.
- You have a Production instance of Salesforce. The InsightIDR Collector will not work with trial or developer instances.
It is best practice to use a dedicated read-only user with the “API Enabled” permission for this integration. This user must have at least read-only access to the
LoginHistory objects, as well as the
API Enabled permission.
Do not use a Salesforce admin user.
It is recommended that a Salesforce System Admin complete the instructions provided in this guide.
To successfully configure this event source:
Configure Salesforce API Permissions
You must provide a user with access to the API with a setting called “API Enabled.” You can grant this permission in two different ways:
User Profile Permissions
When you assign a certain profile to a user, that user inherits the permissions of the profile.
To add the “API Enabled” permission to a user via their Profile:
- Sign in to your Salesforce instance.
- Navigate to Setup > Administration > Users > Users and find the user you want to use for this integration. Alternately, you can search for the integration user.
- Click the Profile link provided.
- On the “Profile” page, click the Edit button at the top of the page.
- Under the “Administrative Permissions” section, make sure that the API Enabled box is checked. If it is not, check the box and click the Save button.
The user now has the “API Enabled” permission from their linked Profile permissions. Any user that shares this Profile can access the API as well.
The second way to grant a user the necessary API permissions is to create a Permission Set and assign the Permission Set to the user. Permission Sets are additive, which means that unlike profiles, users can have zero, one, or multiple Permission Sets.
To create a Permission Set for the “API Enabled” setting:
- Sign in to your Salesforce instance.
- Navigate to Setup > Administration > Users > Permission Sets.
- Search for an existing Permission Set or create a newPermission Set following these directions: https://help.salesforce.com/articleView?id=perm_sets_create.htm&type=5
- Search for “API Enabled” in the search bar, or find it under the “System Permissions” section.
- Make sure the “API Enabled” box is checked. If it is not, click the Edit button and check the box, and then click the Save button.
- At the top of the page, click the Manage Assignments button and find the designated user for this integration.
- Select the user’s name to assign this Permission Set.
This user can now access the API through the linked Permission Set.
Create a Salesforce Token
After the user has the proper API permissions, you must provide them with a security token.
To create a security token for this user:
- Sign in to Salesforce as the integration user.
- Expand the profile in the top right corner and select the Settings link.
- On the left menu, expand the My Personal Information page and select the Reset My Security Token page.
- Click the Reset Security Token button.
- The token will be emailed to the email address for the Integration user. Copy this for later use in InsightIDR.
Configure Salesforce for InsightIDR
In order to setup Salesforce in InsightIDR, you'll need the following information:
- Login URL
- Security Token
- User Account Refresh Rate (Days)
- User Login Info Refresh Rate (Hours)
To configure this event source:
- From your dashboard, select Data Collection on the left-hand menu.
- When the Data Collection page appears, click the Setup Event Source dropdown and choose Add Event Source.
- From the “Security Data” section, click the Cloud Services icon. The “Add Event Source” panel appears.
- Select your collector and Salesforce.com from the event source dropdown.
- Name your event source.
- Optionally choose to send unfiltered logs.
- Select your LDAP account attribution preference.
- In the "Login URL" field, provide the Login URL to your Salesforce account.
- Select your Salesforce credentials, or optionally create a new credential.
- In the "Security Token" field, provide the Security Token generated from your Salesforce account.
- In the "User Account Refresh Rate", enter the User Account Refresh Rate in days. This field indicates how often to gather a list of Salesforce Users from the application to map accounts to user identities.
- In the "User Login Info Refresh Rate" field, enter the User Login Info Refresh Rate in hours. This field indicates how often to gather login and ingress activity related to the Salesforce users.
- Click Save.
When this event source runs successfully, you will see ingress activity and disabled account incidents.
Salesforce uses OAuth, an open source authentication standard, to integrate with other applications. For more information, read this article: https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/code_sample_auth_oauth.htm.
If you are seeing the error code
[LoginFault [ApiFault exceptionCode='INVALID_LOGIN' exceptionMessage='Invalid username, password, security token; or user locked out.' ] ], then you must reset the Security Token.