FAQ-000476 - Custom Settings and Configuration Security / Post-Installation Configuration and Customer Setup

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
How should I securely store client credentials in custom metadata while maintaining admin configurability?
Answer
To securely store client credentials in custom metadata while maintaining admin configurability, follow these recommendations: 1. **Use Protected Custom Metadata**: This ensures sensitive data like client credentials is stored securely and is not accessible to unauthorized users. 2. **Create a Custom UI**: Build a custom interface using Visualforce, Aura, or Lightning Web Components (LWC) to allow administrators to input and manage the credentials. 3. **Secure Data Handling**: The custom UI should pass the data to an Apex class within the managed package, which securely stores it in the protected custom metadata. 4. **Configure Permissions**: Ensure permissions are correctly set to restrict access to fields containing sensitive data. This approach balances security with admin configurability effectively.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarAssignAvoidHardcodedCredentialsInVarDeclsProtectSensitiveData
Question
How should I securely store client credentials in custom metadata while maintaining admin configurability?
Recommended Answer Update
To securely store client credentials in custom metadata while maintaining admin configurability, follow these recommendations: 1. **Use Protected Custom Metadata**: This ensures sensitive data like client credentials is stored securely and isn't accessible to unauthorized users. 2. **Create a Custom UI**: Build a custom interface using Visualforce, Aura, or Lightning Web Components (LWC) to allow administrators to input and manage the credentials. 3. **Secure Data Handling**: The custom UI should pass the data to an Apex class within the managed package, which securely stores it in the protected custom metadata. 4. **Configure Permissions**: Ensure permissions are correctly set to restrict access to fields containing sensitive data. This approach balances security with admin configurability effectively.
Reasoning
The FAQ content is generally solid and doesn't contain outdated information. I made minor improvements to enhance clarity and flow: 1. Changed 'is not accessible' to 'isn't accessible' for more conversational tone per brand guidelines 2. Kept all original content and structure intact as it provides accurate security guidance Regarding security rules selected: - **ApexSuggestUsingNamedCred**: This rule is relevant because the FAQ discusses storing client credentials, and Named Credentials are Salesforce's recommended approach for managing external system credentials securely - **AvoidHardcodedCredentialsInFieldDecls**: Directly relates to the FAQ's discussion of storing credentials in custom metadata fields rather than hardcoding them - **AvoidHardcodedCredentialsInVarAssign**: Connected to the FAQ's guidance on secure data handling through Apex classes, avoiding hardcoded credential assignments - **AvoidHardcodedCredentialsInVarDecls**: Relates to the FAQ's emphasis on using protected custom metadata instead of hardcoded credential declarations - **ProtectSensitiveData**: Directly applicable to the entire FAQ topic of securely storing client credentials and the recommendation to use protected custom metadata for sensitive data
Reasoning References