Install the Salesforce Commerce Cloud Enforcer
If your organization uses Salesforce Commerce Cloud, you can use HUMAN’s Salesforce Commerce Cloud Enforcer to protect against malicious behavior. The SFCC Enforcer is installed using Salesforce cartridges and is deployed to your content delivery network (CDN). The Enforcer dictates how traffic should be handled per your organization’s standards.
You can learn how to install the SFCC Enforcer with this article.
Prerequisites
- A Salesforce Commerce Cloud account with admin access to the Business Manager.
- HUMAN’s SFCC cartridge ZIP file. Contact HUMAN support directly to get this file.
- A method to deploy cartridges to your Salesforce Commerce Cloud instance. The following guide uses Eclipse with Salesforce UX Studio, but you can use other methods such as Visual Studio Code, a CLI, or Business Manager Code Deployment.
- Your unique HUMAN information:
- Your Application ID. You can find this in Platform Settings > Applications > Overview in the HUMAN console. If you have multiple environments, you will also have multiple Application IDs, so be sure to choose the correct ID for the environment you want to install on.
- Your Server Token. You can find this in Platform Settings > Applications, then selecting an application and navigating to Application settings > Server token.
- Your Risk Cookie Key. You can find this in Sightline Cyberfraud Defense > Policies > Traffic Policy Settings, then clicking the key icon and selecting Copy value. If you don’t see this option, click Generate new first.
Installation
Import the cartridge
- Unzip the HUMAN SFCC cartridge ZIP file to a local directory.
- In Eclipse with Salesforce UX Studio, click File > Import.
- In the General tab, select Existing Project into Workspace and click Next.
- With Select root directory selected, click Browse and navigate to the unzipped HUMAN SFCC cartridge folder.
- Ensure the projects are displayed and selected in the Projects area, then click Finish.
- Upload the cartridges to an active code version on your instance.
If your team already deploys cartridges with Visual Studio Code, a CLI, or Business Manager Code Deployment, upload the same unzipped cartridge folders to a code version using that method instead.
Register the cartridge
- In Salesforce Business Manager, select Administration > Sites > Manage Sites.
- Select the Storefront site that you want to add the HUMAN SFCC Cartridge to from the list available sites.
- Click the Settings tab.
- Under the Effective Cartridge Path section, add
int_perimeterx:to the beginning of the list. - Add the storefront cartridge that matches your site’s architecture to the beginning of the list:
- If your site uses Storefront Reference Architecture (SFRA), add
int_perimeterx_SFRAto the beginning of the list. - If your site uses SiteGenesis JavaScript Controllers (SGJC), add
int_perimeterx_SGJCto the beginning of the list.
- If your site uses Storefront Reference Architecture (SFRA), add
The storefront cartridges attach to Salesforce’s onRequest hook and evaluate every storefront route. To skip specific paths, add them to Path Whitelist.
- Depending on the API you use, add the following:
- If you use the Salesforce Commerce API (SCAPI), add
int_perimeterx_SCAPIto the beginning of the list. SCAPI Protection Considerations covers header limitations and how to pass original request headers. - If you use the Open Commerce API (OCAPI), add
int_perimeterx_OCAPIto the beginning of the list. This cartridge enforces a predefined set of authentication, product, and payment hooks, not every OCAPI endpoint. Blocked OCAPI clients receive an Advanced Blocking Response instead of the HTML challenge page, so your OCAPI app must handle that JSON response.
- If you use the Salesforce Commerce API (SCAPI), add
- Click Apply to save the new settings.
Import metadata & services
- In Salesforce Business Manager, select Administration > Site Development > Site Import & Export.
- Under Import, click Choose File, select the
metadata.zipfile from cartridge directory’smetadatadirectory, then click Upload. - After the upload finishes, select
metadata.zipin the import file list and click Import to apply the metadata and services.
Configure the cartridge
- In Salesforce Business Manager, select Merchant Tools > Site Preferences > Custom Preferences.
- Under Custom Site Preference Groups, select PXConfig.
- Select your current Instance Type.
- Complete the following fields:
- Authentication token: Your HUMAN Server Token.
- AppID: Your HUMAN Application ID.
- Cookie Key: Your HUMAN Risk Cookie Key.
- SGJC Cartridge Name: If you use SGJC, enter your SGJC controllers cartridge name. Otherwise, leave this blank.
- Any other optional configurations you want to set.
- Click Save.
Set up first party
If you chose to use a first party Sensor integration, then you must complete these steps. If you chose third party, you can skip to Deploy.
- In Salesforce Business Manager, select Merchant Tools > Site URLs > Dynamic Mapping.
- Add the following above the catch-all rule:
- Navigate to Merchant Tools > Site Preferences > Custom Preferences.
- In Custom Site Preference Groups, select PXConfig.
- Select your current Instance Type.
- Navigate to the First Party Enabled property and change its value to True.
- Click Save.
The SFCC Enforcer is now deployed to your Storefront.