Skip to content

Shield Platform Encryption, Event Monitoring & Field Audit Trail

Salesforce Shield is a suite of three products that address enterprise compliance, audit, and data protection requirements. For CTA scenarios, Shield comes up whenever the customer has regulatory requirements (HIPAA, GDPR, PCI-DSS, SOX) or needs enhanced data protection beyond standard platform security.

Shield Components Overview

flowchart LR
    subgraph "Salesforce Shield"
        PE["Platform Encryption\n(Data at rest)"]
        EM["Event Monitoring\n(Who did what)"]
        FAT["Field Audit Trail\n(Data change history)"]
    end

    PE --> RegCompliance["Regulatory Compliance\n(HIPAA, GDPR, PCI)"]
    EM --> ThreatDetection["Threat Detection\n& Forensics"]
    FAT --> AuditCompliance["Audit Trail\n& Data Recovery"]

    style PE fill:#1565c0,color:#fff
    style EM fill:#2e7d32,color:#fff
    style FAT fill:#e65100,color:#fff

Platform Encryption

Platform Encryption encrypts data at rest in the Salesforce database. It sits on top of the standard encryption that protects data in transit (TLS) and at rest (AES-256 for all Salesforce data).

Standard Encryption vs Platform Encryption

FeatureStandard Salesforce EncryptionPlatform Encryption (Shield)
Data in transitTLS 1.2+TLS 1.2+
Data at restAES-256 (Salesforce manages)AES-256 with customer-controlled keys
Key managementSalesforce onlyCustomer can manage keys (BYOK, cache-only)
Field-level controlNoYes — choose which fields to encrypt
Compliance certificationsSOC 2HIPAA, PCI-DSS, GDPR, SOX
Functionality impactNoneSome — see trade-offs below

Encryption Schemes

SchemeSearchabilityFilter/SortUniquenessUse Case
DeterministicYes (exact match)Yes (limited)Can enforceFields that need filtering: Email, Phone, SSN
ProbabilisticNoNoCannot enforceMaximum security: Description, Notes, custom text areas
flowchart TD
    Q1{"Does the field need to\nbe searchable/filterable?"} -->|Yes| Q2{"Exact match\nor substring?"}
    Q1 -->|No| Prob["Use Probabilistic\n(Maximum security)"]
    Q2 -->|"Exact match"| Det["Use Deterministic\n(Searchable)"]
    Q2 -->|"Substring/LIKE"| Q3{"Can you use a\nmasked field instead?"}
    Q3 -->|Yes| Mask["Create unencrypted\nmasked formula field +\nEncrypt source field"]
    Q3 -->|No| DetLimited["Use Deterministic\n(Accept exact-match-only limitation)"]

    style Prob fill:#1565c0,color:#fff
    style Det fill:#2e7d32,color:#fff
    style Mask fill:#e65100,color:#fff

Deterministic Is Not Fully Searchable

Deterministic encryption only supports exact-match searches — you cannot use LIKE, CONTAINS, or wildcards. If users need to search for “John%” across encrypted Name fields, deterministic encryption will not work. Plan for this limitation in your architecture.

What Can Be Encrypted

EncryptableExamplesNotes
Standard fieldsName (First/Last), Email, Phone, Description, Address fieldsNot all standard fields are encryptable
Custom fieldsText, Text Area, Long Text Area, Email, Phone, URL, Date, Date/TimeNumber and Currency supported in some editions
Files & AttachmentsFiles, Attachments, ContentEntire body is encrypted
Search IndexThe search index itselfAdditional protection for search data
ChatterPosts, commentsEnterprise-grade Chatter security

What CANNOT Be Encrypted

Not EncryptableWhy
Formula fieldsDerived from other fields — encrypt the source field instead
Auto-Number fieldsPlatform-generated sequences
Lookup/Master-Detail fieldsRelationship fields (IDs)
Picklist fieldsLimited data type; use sharing rules instead
Standard Name fields on some objectsPlatform limitations per object

Encryption Trade-offs

This is where CTA candidates are tested — not on whether to encrypt, but on understanding the cost of encryption.

CapabilityWithout EncryptionWith DeterministicWith Probabilistic
SOQL WHERE clauseFull supportExact match onlyNot supported
SOQL ORDER BYFull supportLimitedNot supported
SOQL LIKEFull supportNot supportedNot supported
Aggregate functionsFull supportNot supportedNot supported
Workflow field updatesFull supportFull supportFull support
Validation rulesFull supportLimitedLimited
Duplicate rulesFull supportExact match onlyNot supported
Formula fields referencingFull supportLimited functionsLimited functions
Report filtersFull supportExact match onlyNot supported
Auto-complete/typeaheadFull supportNot supportedNot supported

Encryption Breaks Things

Platform Encryption is not free. It breaks functionality that your users depend on — SOQL filtering, sorting, LIKE queries, auto-complete, and aggregate reporting. You must do a thorough impact analysis before recommending encryption for any field. The CTA board will ask “what breaks when you encrypt this?”

Key Management

Key OptionWho ManagesKey LocationRotationUse Case
Salesforce-managedSalesforceSalesforce infrastructureSalesforce rotatesStandard compliance; simplest
Customer-managed (BYOK)CustomerHSM (via API upload)Customer controlsHigh-security; regulatory requirement for key control
Cache-only keysCustomerCustomer infrastructure (never persisted in SF)Customer controlsMaximum control — key only exists in SF cache

BYOK (Bring Your Own Key)

flowchart LR
    Customer["Customer HSM\n(Key generation)"] -->|"Upload via API"| SF["Salesforce\n(Key stored in\ntenant secret)"]
    SF -->|"Uses key for\nencrypt/decrypt"| Data["Encrypted Data\n(At rest)"]
    Customer -->|"Can revoke/rotate"| SF

    style Customer fill:#1565c0,color:#fff
    style SF fill:#2e7d32,color:#fff
    style Data fill:#e65100,color:#fff

Key Management Architecture

Understanding the full key management decision flow helps CTA candidates select the right approach for a given compliance scenario.

flowchart TD
    Start["Encryption key\nmanagement requirement"] --> Q1{"Does the customer\nrequire key control?"}
    Q1 -->|No| SFManaged["Salesforce-Managed Keys\n- Simplest option\n- SF handles rotation\n- Meets most compliance"]
    Q1 -->|Yes| Q2{"Must the key NEVER\nbe stored in Salesforce\ninfrastructure?"}
    Q2 -->|No| BYOK["BYOK\n- Customer generates key\n- Uploads via API\n- Stored as tenant secret\n- Customer controls rotation"]
    Q2 -->|Yes| Cache["Cache-Only Keys\n- Key sent on-demand\n- Only exists in RAM\n- Customer infra dependency\n- Maximum control"]

    SFManaged --> Deploy["Deploy to Production\n(sandbox testing first)"]
    BYOK --> Deploy
    Cache --> Avail{"Can you accept\navailability dependency\non customer key service?"}
    Avail -->|Yes| Deploy
    Avail -->|No| BYOK

    style SFManaged fill:#2e7d32,color:#fff
    style BYOK fill:#1565c0,color:#fff
    style Cache fill:#c62828,color:#fff

Cache-Only Keys

Cache-only keys provide the highest level of customer control. The key is sent to Salesforce on-demand and only exists in memory — it is never persisted.

AspectBYOKCache-Only Keys
Key persistence in SFYes (encrypted tenant secret)No — only in RAM cache
Data access if key revokedData remains encrypted; can re-provide keyData inaccessible until key re-provided
Availability riskLow — key persistedHigher — key service must be available
Control levelHighMaximum
ComplexityMediumHigh

Cache-Only Key Availability

With cache-only keys, if the customer’s key service is unavailable, Salesforce cannot decrypt the data. This creates an availability dependency on the customer’s infrastructure. Architects must evaluate whether this trade-off is acceptable for the use case.

Event Monitoring

Event Monitoring captures detailed user activity logs across the Salesforce platform. It answers “who did what, when, and from where?”

Event Types

CategoryEvents TrackedUse Case
Login eventsLogin attempts, login geography, login statusDetect unauthorized access, credential stuffing
API eventsAPI calls, object access, query patternsDetect data exfiltration, API abuse
Report/Dashboard eventsReport runs, dashboard views, export eventsDetect mass data export attempts
URI eventsPage views, record viewsUser behavior analysis
Lightning eventsLWC/Aura component interactionsApplication usage analytics
Apex eventsApex execution, governor limit usagePerformance monitoring
Content eventsFile downloads, content accessDetect sensitive document access

Event Monitoring Architecture

flowchart TD
    subgraph "User Activity"
        Login["Login Events"]
        API["API Events"]
        Report["Report Events"]
        Content["Content Events"]
    end

    subgraph "Event Capture"
        EL["Event Log Files\n(24-hour delay)"]
        RTE["Real-Time Events\n(Platform Events)"]
    end

    subgraph "Analysis & Response"
        ELAPI["Download via API\n(EventLogFile sObject)"]
        TS["Transaction Security\nPolicies (Real-time)"]
        CRM["CRM Analytics\n(Event Monitoring App)"]
    end

    subgraph "Actions"
        Block["Block Action"]
        MFAStep["Require MFA"]
        Notify["Notify Admin"]
        Forensics["Forensic Analysis"]
    end

    Login --> EL
    Login --> RTE
    API --> EL
    API --> RTE
    Report --> EL
    Content --> EL

    EL --> ELAPI --> Forensics
    EL --> CRM --> Forensics
    RTE --> TS
    TS --> Block
    TS --> MFAStep
    TS --> Notify

    style Block fill:#c62828,color:#fff
    style TS fill:#e65100,color:#fff
    style CRM fill:#1565c0,color:#fff

Real-Time Event Monitoring

FeatureStandard Event MonitoringReal-Time Event Monitoring
Log availability24-hour delay (log files)Near real-time (Platform Events)
Retention30 days (or 1 day for some types)Subscription-based
AutomationDownload and analyzeTransaction Security policies
Use caseHistorical analysis, forensicsActive threat detection, automated response

Transaction Security

Transaction Security policies evaluate events in real-time and can block, notify, or require MFA when conditions are met.

flowchart LR
    Event["User Action\n(e.g., Export Report)"] --> Policy["Transaction Security Policy\nEvaluate condition"]
    Policy -->|"Condition met"| Action{"What action?"}
    Action -->|Block| Blocked["Block the action\n+ Notify admin"]
    Action -->|MFA| MFA["Require MFA\nre-authentication"]
    Action -->|Notify| Notify["Allow action\n+ Send notification"]
    Policy -->|"Condition not met"| Allow["Allow action\n(No intervention)"]

    style Blocked fill:#c62828,color:#fff
    style MFA fill:#e65100,color:#fff
    style Allow fill:#2e7d32,color:#fff

Example policies:

  • Block report exports that contain more than 10,000 records
  • Require MFA when a user logs in from an unrecognized IP
  • Notify admin when a user views more than 500 records in an hour
  • Block API sessions that exceed normal query patterns

Field Audit Trail

Field Audit Trail (FAT) extends the standard field history tracking to support up to 10 years of data retention and up to 60 fields per object.

Standard History vs Field Audit Trail

FeatureStandard Field HistoryField Audit Trail
Fields per object2060
Retention18-24 monthsUp to 10 years
StorageStandard Salesforce storageBig Object (FieldHistoryArchive)
QueryableSOQLStandard SOQL on FieldHistoryArchive Big Object, or Salesforce CLI
CostFreeShield license
Data type supportMost field typesSame as standard
Archive policyN/AConfigurable retention per object

Field Audit Trail Architecture

flowchart LR
    Change["Field Value\nChange"] --> FHT["Field History\nTracking\n(Standard)"]
    FHT -->|"After retention\nperiod"| Archive["FieldHistoryArchive\n(Big Object)"]
    Archive --> Query["Query via:\n- Standard SOQL on Big Object\n- Salesforce CLI\n- REST API"]
    Archive --> Retention["Retention Policy\n(Up to 10 years)"]

    style FHT fill:#1565c0,color:#fff
    style Archive fill:#2e7d32,color:#fff

Field Audit Trail Use Cases

RegulationRequirementHow FAT Helps
SOXFinancial data change audit trailTrack changes to Amount, Stage, Close Date on Opportunities
HIPAAProtected health information access loggingTrack changes to patient fields on Health Cloud objects
GDPRData processing recordsTrack changes to consent fields, data subject attributes
PCI-DSSCardholder data access loggingTrack access to payment-related fields

Shield Licensing and Cost Considerations

Shield Costs

Shield is an add-on license that is priced per-org, not per-user. The cost is significant — typically 30-50% of the base platform license cost. CTA candidates must weigh the compliance benefit against the cost and recommend Shield only when regulatory requirements demand it. If the scenario does not mention compliance requirements, do not recommend Shield.

Decision FactorRecommend ShieldDo Not Recommend Shield
HIPAA/PCI/SOX complianceYesN/A
Regulatory audit requirementsYesN/A
Customer demands key managementYes (BYOK/cache-only)N/A
General “we want more security”Evaluate if standard features sufficeIf standard encryption + sharing model is adequate
Data breach concernIf need forensics + real-time detectionIf standard login tracking is sufficient

Sources