Limit Storefront Order Access

Unauthorized access to B2C Commerce storefront orders happens when someone accesses an order through a storefront session using a different customer ID than the one used to create it. This makes it possible for unauthorized users to view the order’s details.

To enhance the security of your storefront and prevent unauthorized access to orders, Salesforce recommends that you enable two specific preferences:

  • Limit Storefront Order Access = Yes
  • Allowlist = Storefront controllers and hooks allowed access to storefront orders

Business Manager alerts identify storefront controllers and hooks that can access storefront orders but aren't on the allowlist. Users with access to the Order Preferences module see the alerts and can review whether any of the controllers and hooks are required. You can copy and paste controllers and hooks that need access from the alert into the allowlist.

If you enable the preferences, Salesforce automatically blocks all sources not included on the allowlist for storefront order access. Salesforce recommends that you remove any other sources of storefront order access from the server to avoid unauthorized execution. To keep access to orders secure, maintain a concise allowlist of storefront controllers and implement ‌security checks in the custom code. For example, verification for a guest order lookup ‌can include this information to validate the access request:

  • Order number
  • Email address
  • Shipping information

See Also: