IDENTITY-AND-ACCESS-MANAGEMENT-ARCHITECT practice question 4 of 30

Universal Containers (UC) wants to use Salesforce for sales orders and a legacy of system for order fulfillment. The legacy system must update the…

Full set: 248 questions
Universal Containers (UC) wants to use Salesforce for sales orders and a legacy of system for order fulfillment. The legacy system must update the status of orders in 65* Salesforce in real time as they are fulfilled. UC decides to use OAuth for connecting the legacy system to Salesforce. What OAuth flow should be considered that doesn't require storing credentials, client secret or refresh tokens?
Answer options
A: Web Server flow
B: JWT Bearer Token flow Correct answer
C: Username-Password flow
D: User Agent flow
Correct Answer:
B. JWT Bearer Token flow
Explanation

The JWT Bearer Token flow is designed for server-to-server integrations where the systems have a pre-established trust relationship. The client (legacy system) uses a previously configured certificate and private key to sign a JSON Web Token (JWT) assertion. This signed JWT is then posted to the Salesforce token endpoint to obtain an access token. This flow is ideal for the scenario because it does not require user interaction, nor does it necessitate storing a client secret or a refresh token on the client system, directly fulfilling the security constraints of the question.

Why Incorrect

A. Web Server flow: This flow requires the client to store a clientsecret to exchange the authorization code for an access token and typically uses a refreshtoken for long-term access.
C. Username-Password flow: This flow requires the client application to collect and store the user's literal username and password, which is explicitly prohibited by the requirement not to store credentials.
D. User Agent flow: This flow is designed for client-side applications (e.g., JavaScript in a browser) and is not suitable for a backend, server-to-server integration. ---
References:
1. Salesforce Developer Documentation, OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration: "The OAuth 2.0 JWT bearer token flow is ideal for server-to-server integrations because it doesn’t require explicit user interaction. However, it does require prior approval of the client app... In this flow, the client posts a JWT to the Salesforce OAuth token endpoint. Salesforce processes the JWT, which includes a digital signature, and issues an access token based on prior approval of the app." This documentation confirms the flow's purpose and mechanism, highlighting the absence of user interaction and stored secrets like refresh tokens.
2. Salesforce Architect Documentation, Salesforce Identity and Access Management Architecture Handbook, Section: "Choosing the Right Authentication Flow": This guide details the use cases for each OAuth flow. It specifies the JWT Bearer Flow for scenarios where "A server wants to access data from another server without a user being present." It contrasts this with the Web Server flow, which requires a clientsecret, and the Username-Password flow, which requires user credentials.
3. Internet Engineering Task Force (IETF), RFC 7523, JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants, Section 2.1: "This grant type is used by clients to request an access token by presenting a JWT assertion. The JWT is a compact, URL-safe means of representing claims to be transferred between two parties... The JWT is signed by the client, and the signature is used to authenticate the client." This official standard defines the underlying mechanism, confirming that authentication is based on a signed assertion rather than a shared secret or password.

Scroll to Top