PLAT-ARCH-204 practice question 3 of 10

Northern Trail Outfitters is creating a distributable Salesforce package. The package needs to call into a Custom Apex REST endpoint in the central org. The security team wants to ensure a specific integration account is used in the central org that they will authorize after installation. Which item should an architect recommend?

Full set: 129 questions
Answer options
A: Contact Salesforce Support and create a case to temporarily enable API access for managed packages.
B: Use an encrypted field to store the password that the security team enters.
C: Create an authentication provider in the package and set the consumer key and consumer secret of the connected app in the central org. Correct answer
Correct Answer:
C. Create an authentication provider in the package and set the consumer key and consumer secret of the connected app in the central org.
Explanation

The most secure and maintainable solution is to use Salesforce's built-in framework for authenticated callouts. The package should include the definition for an Authentication Provider. After installation, the subscriber's security team can create a Named Credential that uses this provider. They will then configure it with the Consumer Key and Consumer Secret from a Connected App in the central org. Apex code within the package can then reference the Named Credential by name, and Salesforce will manage the entire OAuth 2.0 authentication flow, including token storage and refresh, securely and transparently.

Why Incorrect

A. Contacting Salesforce Support is not required for standard API access or for implementing secure authentication in a managed package.
B. Using an encrypted field is a less secure and less robust method than Named Credentials, as it requires manual credential management and does not handle token refresh.

References

1. Salesforce Help, "Create an Authentication Provider". This document explains how Auth. Providers can be created and configured, noting they can be included in packages.

2. ISVforce Guide, "Create and Register a Package", Section: "Components Available in Managed Packages". This guide confirms that AuthProvider is a packageable component.

3. Apex Developer Guide, "Authenticated Callouts Using Named Credentials". This section highlights Named Credentials as the recommended best practice, abstracting authentication details from the code.

Scroll to Top