FAQ-000538 - Custom Settings and Configuration Security / Security Review and Compliance

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
How can I validate my approach for storing sensitive information in protected custom settings?
Answer
To validate your approach for storing sensitive information in protected custom settings for the AppExchange Security Review: 1. **Use Protected Custom Settings or Metadata**: Store sensitive data like secrets or tokens in protected custom settings or metadata to prevent unauthorized access. 2. **Handle Data Exceeding Limits**: For data exceeding the 255-character limit, encrypt it using an encryption key stored in protected settings or metadata, and store the encrypted data in a custom object. 3. **Configure Permissions**: Ensure permissions are correctly set for fields containing encrypted secrets, and use Apex Crypto calls for encryption instead of relying solely on encrypted fields. 4. **Secure Data Transmission**: Avoid transmitting sensitive data outside Salesforce, and ensure all callback URLs use HTTPS. 5. **Test and Document**: Perform end-to-end testing and document your implementation to demonstrate compliance with security best practices. These steps align with the AppExchange Security Review requirements and help protect sensitive information.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexBadCryptoApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarDeclsAvoidHardcodedCredentialsInVarAssignApexInsecureEndpointProtectSensitiveData
Question
How can I validate my approach for storing sensitive information in protected custom settings?
Recommended Answer Update
To validate your approach for storing sensitive information in protected custom settings for the AppExchange Security Review: 1. **Use Protected Custom Settings or Metadata**: Store sensitive data like secrets or tokens in protected custom settings or metadata to prevent unauthorized access. 2. **Handle Data Exceeding Limits**: For data exceeding the 255-character limit, encrypt it using an encryption key stored in protected settings or metadata, and store the encrypted data in a custom object. 3. **Configure Permissions**: Ensure permissions are correctly set for fields containing encrypted secrets, and use Apex Crypto calls for encryption instead of relying solely on encrypted fields. 4. **Secure Data Transmission**: Avoid transmitting sensitive data outside Salesforce, and ensure all callback URLs use HTTPS. 5. **Test and Document**: Perform end-to-end testing and document your implementation to demonstrate compliance with security best practices. These steps align with the AppExchange Security Review requirements and help protect sensitive information.
Reasoning
The FAQ content is accurate and well-structured, so no changes to the answer are needed. The content directly addresses secure storage of sensitive information and aligns well with security best practices. For security rules selection: - **ApexBadCrypto**: Selected because the FAQ discusses using "Apex Crypto calls for encryption" in step 3, which directly relates to proper cryptographic implementation - **ApexSuggestUsingNamedCred**: Selected because the FAQ covers storing "secrets or tokens" and secure approaches for sensitive credentials, which Named Credentials help address - **AvoidHardcodedCredentialsInFieldDecls**: Selected because the FAQ teaches about storing sensitive data in protected settings instead of hardcoding, directly addressing this rule's concern about hardcoded credentials in field declarations - **AvoidHardcodedCredentialsInVarDecls**: Selected because the FAQ's guidance on using protected custom settings prevents hardcoding credentials in variable declarations - **AvoidHardcodedCredentialsInVarAssign**: Selected because the FAQ's approach of storing credentials in protected settings prevents hardcoded credential assignments - **ApexInsecureEndpoint**: Selected because step 4 explicitly mentions "ensure all callback URLs use HTTPS" which directly relates to secure endpoint usage - **ProtectSensitiveData**: Selected because the entire FAQ is focused on protecting sensitive information through proper storage mechanisms and encryption
Reasoning References