FAQ-000498 - Custom Settings and Configuration Security / Protected Custom Settings Security Requirements and Best Practices

Current Status:VALID_RESPONSEErrorUnable to AnswerSuggests Case

Current FAQ

Question
Are there additional security controls required when storing credentials in Protected Custom Settings?
Answer
Yes, additional security controls are required when storing credentials in Protected Custom Settings: 1. Ensure the application writes all code to update these settings, as they lack built-in GUI interfaces for management. 2. Use the `transient` keyword to prevent storage of the settings in the viewstate. 3. Configure permissions correctly to restrict access. 4. Avoid writing sensitive data to logs or exposing it in any way.
Enhancing FAQ...

Enhancing FAQ with AI recommendations...

AI Recommended Enhancement

Related Security Rules (click to view)
ApexSuggestUsingNamedCredAvoidHardcodedCredentialsInFieldDeclsAvoidHardcodedCredentialsInVarDeclsAvoidHardcodedCredentialsInVarAssignProtectSensitiveData
Question
Are there additional security controls required when storing credentials in Protected Custom Settings?
Recommended Answer Update
Yes, additional security controls are required when storing credentials in Protected Custom Settings: 1. Ensure the application writes all code to update these settings, as they lack built-in GUI interfaces for management. 2. Use the `transient` keyword to prevent storage of the settings in the view state. 3. Configure permissions correctly to restrict access. 4. Avoid writing sensitive data to logs or exposing it in any way.
Reasoning
The FAQ content is accurate and comprehensive, but contains one minor technical correction. The term 'viewstate' should be 'view state' for proper technical terminology. This small correction improves clarity and technical accuracy without changing the meaning or substance of the answer. Security rule associations: - ApexSuggestUsingNamedCred: This rule directly relates to the FAQ's discussion of storing credentials, as it suggests using Named Credentials instead of hardcoded credentials, which is relevant when discussing secure credential storage alternatives. - AvoidHardcodedCredentialsInFieldDecls: Relates to the FAQ's point about avoiding exposing sensitive data, as Protected Custom Settings are an alternative to hardcoded credential fields. - AvoidHardcodedCredentialsInVarDecls: Connected to the FAQ's guidance on secure credential storage practices as an alternative to hardcoded variables. - AvoidHardcodedCredentialsInVarAssign: Relates to the FAQ's emphasis on proper credential handling and storage security controls. - ProtectSensitiveData: Directly applies to the FAQ's points about configuring permissions correctly, using transient keyword, and avoiding exposure of sensitive data in logs - all of which are protective measures for sensitive credential data.
Reasoning References