Skip to content

Shield & Encryption Quick Reference

Fast-track reference for Salesforce Shield — Platform Encryption, Event Monitoring, and Field Audit Trail. Read this if you have 2 hours before a mock board and need to know what breaks, what each key option means, and how to map compliance regs to Salesforce controls.

Shield at a Glance

ComponentWhat It DoesWhen to Recommend
Platform EncryptionEncrypts data at rest with customer-controlled keysRegulatory requirement for data-at-rest encryption (HIPAA, PCI, GDPR)
Event MonitoringCaptures 74+ event types; real-time threat detectionNeed forensics, data exfiltration detection, or automated policy enforcement
Field Audit Trail60 fields/object, up to 10-year retentionSOX/HIPAA audit requirements beyond 18-month standard tracking

Shield Is Expensive

Shield is priced per-org at ~30-50% of base platform license cost. Never recommend it unless the scenario explicitly requires regulatory compliance, customer-controlled key management, or long-term audit trails. If no compliance driver exists, standard encryption + sharing model is sufficient.

Encryption Scheme Comparison

DimensionDeterministicProbabilistic
How it worksStatic IV — same plaintext produces same ciphertext per field/orgRandom IV — same plaintext produces different ciphertext each time
SOQL WHERE (exact match)YesNo
SOQL LIKE / CONTAINSNoNo
SOQL ORDER BYLimitedNo
Report filtersExact match onlyNo
List view filtersExact match onlyNo
Duplicate rulesExact matchNo
Uniqueness enforcementYesNo
Auto-complete / typeaheadNoNo
Aggregate functions (SUM, AVG)NoNo
Security levelHighMaximum
Best forEmail, Phone, SSN — fields users must filter onNotes, Descriptions, PHI narrative fields — no search needed

Board Script

“I recommend deterministic encryption for the Email field because users need to filter cases by patient email. I accept the trade-off of exact-match-only search. For clinical notes, I use probabilistic because no one filters on narrative text and it provides maximum security.”

Key Management Options

OptionKey LocationWho RotatesAvailability RiskComplexityWhen to Use
Salesforce-managedSalesforce infrastructureSalesforceNoneLowStandard compliance; no regulatory key-control mandate
BYOKCustomer HSM, uploaded via APICustomerLow (key persisted in SF tenant secret)MediumRegulation requires customer-controlled keys (PCI-DSS, HIPAA)
Cache-onlyCustomer infrastructure only; never persisted in SFCustomerHigh — key service outage = data inaccessibleHighMaximum control; “kill switch” requirement; highly regulated industries

Cache-Only Availability Trap

Cache-only keys create a hard dependency on the customer’s key service. If that service is down, Salesforce cannot decrypt any data. Architect for HA/DR on the key service itself. The board will ask: “What happens if your key service goes down?”

What Breaks When You Encrypt

CapabilityImpactMitigation
SOQL LIKE / CONTAINSBroken (both schemes)Use unencrypted masked formula field for partial display
Aggregate queries (SUM, AVG, COUNT)Broken (both schemes)Pre-aggregate in unencrypted rollup fields or external analytics
Formula fields referencing encrypted fieldLimited functions onlyEncrypt the source, not the formula; redesign formula logic
Auto-complete / typeaheadBroken (both schemes)Accept UX trade-off or use external search
Flows / Process Builder filtersCannot filter on encrypted valuesUse Apex triggers or unencrypted criteria fields
Validation rulesLimitedTest each rule; some operators fail silently
Skinny tablesEncrypted fields excludedDo not encrypt fields critical to skinny table performance
Change Data CaptureEncrypted values in CDC eventsDecrypt in subscriber; adds integration complexity

Never Encrypt These

  • Lookup / Master-Detail fields — breaks relationships entirely
  • Auto-Number fields — platform-generated, not encryptable
  • Picklist fields — not supported; use sharing rules for picklist-based access
  • Fields used in skinny tables — defeats LDV performance optimization
  • Foreign keys or External IDs used in integrations — breaks matching/upsert logic

Encryption Decision Flowchart

flowchart TD
    Start{"Does a regulation require\ndata-at-rest encryption?"} -->|No| NoShield["Use standard platform\nencryption (TLS + AES-256)\nDo NOT recommend Shield"]
    Start -->|Yes| FieldQ{"Which fields\ncontain regulated data?"}
    FieldQ --> SchemeQ{"Do users need to\nfilter/search this field?"}
    SchemeQ -->|Yes| Det["Deterministic\n(exact-match filter preserved)"]
    SchemeQ -->|No| Prob["Probabilistic\n(maximum security)"]
    Det --> KeyQ{"Does regulation require\ncustomer key control?"}
    Prob --> KeyQ
    KeyQ -->|No| SFKey["Salesforce-managed keys"]
    KeyQ -->|"Yes, with persistence OK"| BYOK["BYOK\n(customer HSM, key persisted in SF)"]
    KeyQ -->|"Yes, zero persistence"| Cache["Cache-only keys\n(key never stored in SF)"]
    Cache --> HA["Architect HA/DR\nfor key service"]

    style NoShield fill:#2e7d32,color:#fff
    style Det fill:#1565c0,color:#fff
    style Prob fill:#1565c0,color:#fff
    style Cache fill:#c62828,color:#fff

Event Monitoring Quick Reference

CapabilityWhat It DoesKey Use Cases
Login Event MonitoringTracks login attempts, geo, IP, status, deviceCredential stuffing detection, suspicious login alerts
API Event MonitoringAPI calls, objects accessed, query patternsData exfiltration detection, API abuse throttling
Report Export EventsReport runs, row counts, export actionsBlock mass data exports (>10K rows)
Real-Time EventsNear-real-time via Platform Events (vs 24h log delay)Active threat response, automated enforcement
Transaction Security PoliciesEvaluate events in real-time; block, require MFA, or notifyBlock large report exports, force MFA on unknown IP, alert on bulk API queries

Transaction Security Policy examples to know:

  • Block report export when row count > 10,000
  • Require MFA when login from unrecognized IP/device
  • Notify admin when user views > 500 records/hour
  • Block API session exceeding normal query volume

Field Audit Trail Quick Reference

DimensionStandard Field HistoryField Audit Trail (Shield)
Fields per object2060
Retention18 months (24 months via API)Up to 10 years (configurable policy)
StorageCounts against org storageBig Object (FieldHistoryArchive) — does NOT count
Query methodStandard SOQLStandard SOQL on FieldHistoryArchive Big Object, REST API, Salesforce CLI
CostFreeShield license required
Archive policyNoneConfigurable retention per object

FAT Architecture

Data flows: Field change —> Standard Field History Tracking (18 months) —> archived to FieldHistoryArchive Big Object (up to 10 years). Query archived data via standard SOQL on the FieldHistoryArchive Big Object, REST API, or Salesforce CLI. Plan for this in reporting architecture.

Compliance-to-Controls Mapping

RegulationKey RequirementSalesforce Shield Controls
HIPAAEncrypt PHI at rest; audit access to patient data; breach notification readinessPlatform Encryption on PHI fields (probabilistic for notes, deterministic for patient email/phone); Event Monitoring for access forensics; FAT on clinical fields
GDPRData subject access/erasure rights; lawful processing records; breach notification within 72hEncryption on PII; FAT for processing activity records; Event Monitoring for breach detection; Individual object for DSAR tracking
SOXFinancial data integrity; change audit trail; segregation of dutiesFAT on Opportunity Amount/Stage/Close Date (10-year retention); Event Monitoring for change tracking; Setup Audit Trail for config changes
PCI-DSSEncrypt cardholder data; restrict access; log access attempts; key management controlsPlatform Encryption (BYOK or cache-only for key control); Event Monitoring for access logging; never store full card numbers in Salesforce

PCI-DSS Scope Warning

Salesforce is NOT a PCI-compliant payment vault. Never store full credit card numbers (PAN) in Salesforce, even with Shield Encryption. Use a PCI-certified payment gateway and store only last-4 or tokenized references. The board will challenge you if you suggest storing card data in Salesforce.

Reverse-Engineered Use Case 1: Healthcare with PHI + SOX

Situation: Regional hospital system on Health Cloud. 3,000 users. Must comply with HIPAA (patient data) and SOX (financial reporting for the parent corporation). Mix of clinical staff, billing, and executive leadership.

What you’d present:

  • Platform Encryption: Probabilistic on clinical notes, care plan narratives (no filter needed). Deterministic on patient Email, Phone (care coordinators filter by these).
  • Key management: BYOK — hospital compliance mandates customer key control but accepts key persistence in Salesforce.
  • Field Audit Trail: 10-year retention on patient demographic fields (HIPAA), Opportunity Amount/Stage/Close Date (SOX). 60 fields tracked on the Patient (Contact) object.
  • Event Monitoring: Transaction Security policy blocks report exports > 5,000 patient records. Login monitoring flags access from outside hospital network.
  • What NOT to encrypt: Lookup fields to Account (breaks relationships), fields in skinny tables (LDV performance on appointment queries).

Reverse-Engineered Use Case 2: Financial Services + GDPR

Situation: European wealth management firm. 1,200 users across 8 countries. GDPR compliance mandatory. Client PII includes name, address, national ID, portfolio details. Must support right-to-erasure requests.

What you’d present:

  • Platform Encryption: Deterministic on client Email, National ID (advisors filter by these). Probabilistic on financial notes, advisor comments.
  • Key management: Cache-only keys — firm’s CISO requires zero key persistence in any third-party cloud. Architect HA key service across two EU data centers.
  • Field Audit Trail: Track consent fields, data processing basis, and PII modification history. 10-year retention for regulatory audit defense.
  • Event Monitoring: Alert on bulk data exports (GDPR breach risk). Transaction Security requires MFA for cross-border logins.
  • GDPR-specific: Individual object for DSAR tracking. Data retention policies aligned to lawful basis. Right-to-erasure workflow must handle encrypted field destruction + key rotation.

Deep Dive References

Sources