FAQ-001239 - Mobile Application Security / Data Storage and Encryption

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
What are the correct encryption and storage practices for sensitive data in mobile applications integrated with Salesforce?
Answer
For sensitive data in mobile applications integrated with Salesforce, follow these encryption and storage practices: 1. **Encryption Standards**: Use AES-128 or higher encryption for sensitive data, and ensure encryption keys are securely protected and stored. 2. **Storage Practices**: - **Client Applications**: Store credentials in vendor-provided keychains, keystores, or DP APIs. Avoid storing secrets in pure Java applications without native code unless secured by a user-provided secret. - **Server Applications**: Encrypt secrets and store the encryption key in a property file inaccessible to the database process. The application layer should directly access the key. 3. **Browser Applications**: Do not store secrets in browser apps. Instead, use password managers provided by browser vendors, operating systems, or trusted third parties. 4. **Debug Logs**: Avoid writing sensitive data, such as API tokens or cryptographic keys, to debug logs. 5. **Salesforce Storage**: - Use protected custom metadata API fields or protected custom settings for sensitive data. - Alternatively, encrypt the data and store the encryption key in a protected custom setting or hidden custom metadata API field. 6. **Authentication Data**: Do not store authentication data (e.g., passwords or API tokens) in encrypted fields. Use named credentials or protected custom settings instead. These practices align with Salesforce's security guidelines to ensure secure handling and storage of sensitive data. Let me know if you need further clarification!
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexBadCryptoApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarDeclsAvoidHardcodedCredentialsInVarAssignProtectSensitiveData
Question
What are the correct encryption and storage practices for sensitive data in mobile applications integrated with Salesforce?
Recommended Answer Update
For sensitive data in mobile applications integrated with Salesforce, follow these encryption and storage practices: 1. **Encryption Standards**: Use AES-256 or higher encryption for sensitive data, and ensure encryption keys are securely protected and stored. 2. **Storage Practices**: - **Client Applications**: Store credentials in vendor-provided keychains, keystores, or secure APIs. Avoid storing secrets in pure Java applications without native code unless secured by a user-provided secret. - **Server Applications**: Encrypt secrets and store the encryption key in a property file inaccessible to the database process. The application layer should directly access the key. 3. **Browser Applications**: Don't store secrets in browser apps. Instead, use password managers provided by browser vendors, operating systems, or trusted third parties. 4. **Debug Logs**: Avoid writing sensitive data, such as API tokens or cryptographic keys, to debug logs. 5. **Salesforce Storage**: - Use protected custom metadata API fields or protected custom settings for sensitive data. - Alternatively, encrypt the data and store the encryption key in a protected custom setting or hidden custom metadata API field. 6. **Authentication Data**: Don't store authentication data (passwords or API tokens) in encrypted fields. Use named credentials or protected custom settings instead. These practices align with Salesforce's security guidelines to ensure secure handling and storage of sensitive data.
Reasoning
Made minor improvements to enhance clarity and tone consistency: changed 'Do not' to 'Don't' for better conversational tone, updated AES-128 to AES-256 for stronger security standards, and changed 'DP APIs' to 'secure APIs' for clearer terminology. All security rules selected relate directly to the FAQ content: ApexBadCrypto relates to the encryption standards discussion; ApexSuggestUsingNamedCred relates to the recommendation for using named credentials; AvoidHardcodedCredentialsInFieldDecls, AvoidHardcodedCredentialsInVarDecls, and AvoidHardcodedCredentialsInVarAssign all relate to the guidance about not storing authentication data and secrets in various contexts; ProtectSensitiveData relates to the overall theme of securely handling sensitive information in mobile applications.
Reasoning References