Salesforce-B2C-Commerce-Cloud-Developer Practice Test

Salesforce Spring 25 Release
202 Questions

A developer is asked to implementa simple call to an authentication - protected REST web service.
Which configuration is valid?

A. Add the authentication password to the service credentials

B. Configure the authentication username using a site preference

C. Insert the service'sendpoint in a .properties file

A.   Add the authentication password to the service credentials

Explanation:

Secure Configuration for Authenticated Web Services
When implementing an authenticated REST web service call in Salesforce B2C Commerce, the Service Framework relies on service credentials to manage sensitive data like usernames, passwords, tokens, and authentication headers.

Option A: Add the authentication password to the service credentials
Correct and secure
In Business Manager, under:
Administration > Operations > Services > Credentials

the developer configures:
Username
Password
Additional headers or tokens if needed
These credentials are linked to a service profile, which is then tied to the actual service.
Avoids hardcoding sensitive data in scripts or templates.

📌 This method ensures separation of concerns and keeps authentication flexible across environments (sandbox, staging, production).

❌ Option B: Configure authentication username using a site preference
Incorrect
Site preferences are meant for site-specific business settings, not authentication for external services.
Storing credentials here is not secure, not encrypted, and not intended for use in service logic.

❌ Option C: Insert the service’s endpoint in a .properties file
Partially relevant, but not the right answer for authentication
.properties files can contain endpoint URLs or configuration flags, but:
They’re not suitable for storing credentials
They don't participate in the secure credential flow for service invocations

🔗 Reference: “Credential information for authentication-protected services must be configured in the Credentials module and linked to the service profile.” — Salesforce B2C Commerce | Service Framework Guide 📖 Service and Credentials Setup

Salesforce-B2C-Commerce-Cloud-Developer Practice-Test - Home Previous
Page 28 out of 202 Pages