Secure Your B2C Commerce Solution

All B2C Commerce Cartridges and Headless Integrations listed on AgentExchange must adhere to these requirements.

Protect data at rest using strong encryption schemes, and protect the encryption keys.

See Encryption and Cryptography and Secret Storage.

Before processing requests that carry privileged actions, authenticate and authorize the requests. Also enforce authentication and authorization when reading or writing confidential objects such as Order, Customer, and PaymentInstrument.

See Authentication and Authorization.

Follow the principle of least privilege for OCAPI and SCAPI permissions. Provide users with the minimum set of permissions required to perform a task. Document the permissions, and share them with your customers.

See OCAPI Settings and Authorization for SCAPI.

Sensitive data is any information that must be protected against unauthorized access. Different regulations classify information as sensitive data and can include payment instruments, protected health information, personally identifiable information, access tokens, and encryption keys. Document and disclose to customers a list of sensitive data stored or processed by your solution. Redact sensitive data in B2C Commerce log files.

See Storing Sensitive Data.

Use supported cryptography APIs such as dw.crypto. Don’t implement custom cryptography.

Include and serve all client-side scripts statically from the B2C Commerce cartridge. Avoid dynamically loading third-party scripts from content delivery networks (CDNs) or other third parties.

Don’t interpret any input data as script. Statically include all source code.

Ensure that user input is exactly the kind of data that your solution expects. Validate all user input before processing.

See Data Validation.

Escape all user-provided content before rendering it in any context including HTML and JavaScript.

See Template Best Practices.

Include CSRF protection in all state-changing controllers.

See Cross-Site Request Forgery.

Open redirects are used in phishing attacks to redirect users to any URL. Never redirect users based on untrusted data. Follow the practices in Open Redirect Attacks.

Document and share your Content Security Policy with customers when applicable.

To simplify installation of patches and upgrades, direct customers to use separate cartridges for customizations whenever possible.

Follow the B2C Commerce security guidelines as you set up, administer, and develop your Salesforce B2C Commerce environments.