← Back to Security & Compliance
SEC-014 Security & Compliance 20 min read For: Compliance Managers & Solution Architects

SOC 2 and Salesforce: What Compliance Means for Your Implementation

Aligning Salesforce configuration, deployment processes, and access governance policies to pass independent Trust Services Criteria audits.

VS

Vishal Sharma

Salesforce Architecture Specialist · Updated May 2026

What you will learn in this tutorial
  • Demystify SOC 2 Type I and Type II audits and their applications to custom Salesforce configurations.
  • Map the AICPA Trust Services Criteria (Security, Confidentiality, Processing Integrity) directly to Salesforce settings.
  • Enforce strict identity governance utilising Single Sign-On (SSO), Multi-Factor Authentication (MFA), and automated reviews.
  • Establish secure Sandbox pipelines and auditable deployment workflows to satisfy change management requirements.
  • Implement continuous monitoring and proactive logging using Setup Audit Trail and Event Monitoring.
  • Vet and manage third-party AppExchange packages using secure lifecycle assessment frameworks.

1. Demystifying SOC 2 Audits for Salesforce Enterprise Implementations

Service Organisation Control (SOC) 2 is a voluntary compliance standard developed by the American Institute of CPAs (AICPA). It evaluates how technology companies manage customer data based on five Trust Services Criteria (TSC): Security, Availability, Processing Integrity, Confidentiality, and Privacy. For modern enterprise organisations, passing a SOC 2 audit is crucial for demonstrating operational credibility and secure data handling practices.

While Salesforce itself maintains a robust SOC 2 Type II report for its physical infrastructure and managed services, this does not mean your custom Salesforce implementation is SOC 2 compliant. An auditor evaluating your organisation's compliance will review how you have configured, managed, and monitored Salesforce. The onus is on the customer to prove that their custom configurations do not introduce security loopholes.

A SOC 2 Type I audit evaluates the design of your security controls at a single point in time, verifying that the appropriate policies are in place. A SOC 2 Type II audit, which is far more rigorous, evaluates the operational effectiveness of those controls over an extended period (typically six to twelve months). For enterprise architects, this means every policy, user access review, and metadata deployment must be consistently executed and meticulously documented. Developing a repeatable, automated compliance programme is the key to passing these audits with minimal friction.

2. Mapping Trust Services Criteria to Concrete Platform Configurations

To successfully pass a SOC 2 audit, architects must map the general Trust Services Criteria to specific Salesforce configurations. This mapping acts as the translation layer between high-level compliance goals and technical platform settings, making the audit process highly objective and transparent.

Here is how the key Trust Services Criteria align with concrete Salesforce features: - Security: Hardening the perimeter. This includes enforcing Multi-Factor Authentication (MFA), setting restrictive login IP ranges, and configuring session timeouts to prevent unauthorised access. - Confidentiality: Ensuring sensitive data is restricted to authorised personnel. This is governed by Organization-Wide Defaults (OWD), Role Hierarchies, sharing rules, and Field-Level Security (FLS). - Processing Integrity: Ensuring system inputs produce accurate, reliable outputs. In Salesforce, this is controlled by validation rules, Apex triggers, automated regression testing, and robust error-handling mechanisms.

By aligning your Salesforce configuration backlog with these criteria, you build a compliance-first architecture that naturally generates the evidence your auditors require. For example, setting up standard data validation rules and automated trigger tests proves to auditors that your system is designed to prevent data corruption. Regularly auditing these configurations ensuring they remain active and correctly tuned is a core responsibility of the architecture team.

3. User Access Governance: Hardening Authentication and Permission Set Hygiene

Identity and Access Management (IAM) is the first area auditors will scrutinise during a SOC 2 assessment. They will ask for evidence that you enforce the principle of least privilege, audit user access regularly, and securely manage high-privilege credentials.

First, standardise on Single Sign-On (SSO) backed by an enterprise identity provider (like Okta or Azure AD). This allows you to centralise access termination. If an employee leaves the company, disabling their account in your identity provider must instantly revoke their Salesforce access. Second, enforce Multi-Factor Authentication (MFA). Salesforce mandates MFA, but your SSO configuration must also be verified to ensure MFA is required at the identity provider level.

Third, eliminate the "Admin Creep" phenomenon. Having too many System Administrators is a major security risk. Restrict the System Administrator profile only to core platform owners. For everyone else, assign the standard "Minimum Access - Salesforce" profile and grant permissions incrementally using Permission Sets and Permission Set Groups. Let us see an administrative best practice: rather than granting the broad "Modify All Data" permission, write modular Apex or flow designs that execute system processes in system mode, keeping user permissions strictly defined:

// SECURE PATTERN: Enforce least privilege by restricting user DML capabilities 
// and executing system-level actions strictly within controlled service classes
public class OrderProcessingService {
    public void processOrder(Id orderId) {
        // Step 1: Verify the current user has permission to read the Order
        List orders = [SELECT Id, Status FROM Order WHERE Id = :orderId WITH USER_MODE];
        if (orders.isEmpty()) {
            throw new SecurityException('Unauthorised access or invalid Order ID.');
        }
        
        // Step 2: Perform the privileged update in a system-controlled manner
        // without granting 'Modify All Data' to the user
        SystemOrderProcessor.markAsProcessed(orderId);
    }
    
    private without sharing class SystemOrderProcessor {
        private static void markAsProcessed(Id orderId) {
            Order o = new Order(Id = orderId, Status = 'Processed');
            update o;
        }
    }
}

Enforcing this separation of duties programmatic pattern ensures that standard users can perform necessary operations without requiring elevated platform permissions. Regularly review permission assignments and de-provision inactive users to maintain a clean security posture.

4. Secure Change Management: Sandboxes, Pipelines, and Auditable Deployments

Change management is the engine of SOC 2 compliance. Auditors want to verify that no developer can write code in a sandbox and push it directly to production without oversight. They seek to prevent unauthorised, untested, or malicious changes from entering your production environment.

To satisfy this criterion, your organisation must implement a structured, auditable DevOps pipeline. The standard workflow dictates: 1. Isolation: Development occurs in Developer or Developer Pro Sandboxes. No development is ever performed directly in Production. 2. Testing: Code is merged into a Full or Partial Copy Sandbox (UAT/Staging) where business users perform user acceptance testing. 3. Peer Review: Metadata changes are stored in a Git-based version control system. All merges into major branches must require peer review via Pull Requests. 4. Automated Testing: CI/CD pipelines must execute all Apex tests and run static analysis tools (like PMD and ESLint) before deployment. 5. Separation of Duties: The person who wrote the code must not be the person who authorises and executes the deployment to Production.

Every deployment must be logged, showing a direct link between a business ticket (e.g., Jira), the pull request, and the deployment log. This end-to-end traceability proves to auditors that your production environment is strictly controlled. Avoid manual hotfixes in production at all costs; they bypass change management controls and represent a severe SOC 2 violation that is difficult to justify during an audit.

5. Continuous Monitoring, Incident Response, and Setup Audit Trail Forensics

A key aspect of SOC 2 Type II is continuous monitoring. You must be able to detect security incidents, policy violations, and administrative changes in real time, and demonstrate that your team responds to alerts swiftly and effectively.

The Setup Audit Trail tracks administrative changes made in your Salesforce org. Auditors will routinely ask for logs from this trail to verify that no unauthorised metadata changes were made directly in Production. By regularly querying and reviewing these logs, you ensure the integrity of your system configuration. Let us look at how to monitor critical administrative changes using SOQL queries against the SetupAuditTrail object:

public class SetupAuditMonitor {
    public List getRecentCriticalChanges() {
        // Query Setup Audit Trail to log critical administrative actions
        return [
            SELECT Id, Action, Section, CreatedBy.Username, CreatedDate, Display 
            FROM SetupAuditTrail 
            WHERE Action IN ('manageIpRanges', 'passwordPolicyUpdated', 'securitySettingsUpdated')
            ORDER BY CreatedDate DESC 
            LIMIT 50
        ];
    }
}

Additionally, you should implement Event Monitoring to capture system-level logs, such as API usage, login history, and report exports. These logs should be streamed to an enterprise Security Information and Event Management (SIEM) system (like Splunk or Datadog) where they can be correlated with other enterprise logs. If an incident occurs (such as an administrative account being compromised), your Incident Response Plan must detail the exact steps to isolate the org, rotate integration secrets, terminate active sessions, and restore data integrity. Documenting this incident response loop is essential for demonstrating operational resilience to your SOC 2 auditors.

Key Takeaways

  • Salesforce's infrastructure SOC 2 report does not cover your custom implementation; you must prove your configurations and processes are compliant.
  • The Trust Services Criteria (Security, Confidentiality, Processing Integrity) must be mapped to native Salesforce settings like OWDs, MFA, and Validation Rules.
  • Enforce strict least privilege by using SSO, MFA, de-provisioning inactive users, and replacing administrative profile access with Permission Sets.
  • Change management audits require a strict, sandbox-isolated DevOps pipeline with peer reviews, automated CI/CD testing, and separation of duties.
  • Setup Audit Trail and Event Monitoring must be utilised to continuously log administrative changes and track potential data exfiltration vectors.
  • Production hotfixes should be strictly forbidden, ensuring all metadata alterations go through the approved, auditable deployment pipeline.

Checkpoint: Test Your Understanding

What is the difference between a SOC 2 Type I and a SOC 2 Type II audit?

A. Type I evaluates security at a single point in time, while Type II evaluates operational effectiveness over a period of months
B. Type I evaluates physical infrastructure, while Type II evaluates application software configuration security
C. Type I is mandatory for cloud software providers, while Type II is completely optional and self-assessed
D. Type I is performed by internal security staff, while Type II must be performed by the AICPA Board of CPAs

To enforce the SOC 2 principle of least privilege, what is the best practice for granting elevated user permissions?

A. Creating multiple custom administrator profiles and assigning them to different departments
B. Utilising the Minimum Access profile and assigning modular Permission Sets dynamically
C. Enabling 'Modify All Data' on standard profiles to simplify workflow processes
D. Allowing developers to temporarily use production login access to execute system changes

How can an architect prove to a SOC 2 auditor that only authorised changes have been deployed to production?

A. By showing that all developers have access to the production system settings
B. By providing a verbal confirmation that the team follows agile scrum principles
C. By presenting a Git change-log showing code reviews, CI/CD runs, and linked business tracking tickets
D. By running a monthly backup of the production database metadata

Discussion & Feedback