Home / security / salesforce-shield-deployment
salesforce-shield-deployment
Roll out Shield (Platform Encryption + Event Monitoring + Field Audit Trail) end-to-end, sequencing feature enablement to avoid data lockout. NOT for Classic Encryption or general PE design — use architect/salesforce-shield-architecture.
Open the skill folder on GitHub
Salesforce Shield Deployment
Shield is three separately-operated capabilities sold under one name:
"Salesforce Shield is a trio of security tools that helps you build extra levels of trust, compliance, and governance right into your business-critical apps. It includes Shield Platform Encryption, Event Monitoring, and Field Audit Trail." — Salesforce Security Guide
They share nothing else. Different enablement paths, different permissions, different failure modes, different rollback stories. Field Audit Trail is not even self-service: "For information about enabling Field Audit Trail, contact your Salesforce representative."
Deploying "Shield" as one project is the root cause of most bad Shield rollouts, because each capability then interferes with the diagnosis of the others.
Before Starting
- Confirm which of the three the compliance requirement actually needs. They
answer different questions: encryption at rest, forensic history, and detection. A programme that needs one and buys three still has to operate three.
- Validate the field scope against what can be tracked and encrypted. Formula,
roll-up, auto-number, long text, and multi-select fields cannot be history-tracked at all. Encryption has its own eligibility list. A scope written from a data dictionary will contain fields neither capability can cover.
- Establish the retention obligation's direction. A minimum ("retain for
seven years") is nearly free with Field Audit Trail. A maximum ("do not retain beyond seven years") requires a deletion process you build and schedule, because nothing deletes on your behalf.
- Name the log destination and the analyst. Event Monitoring without a consumer
and a person with the right permissions is a cost, not a capability.
Core Concepts
The three phases and why the order is what it is
PHASE 1 Field Audit Trail lowest risk; value is TIME-DEPENDENT
PHASE 2 Event Monitoring read-only; the instrument for phase 3
PHASE 3 Platform Encryption one object at a time; changes behaviour
FAT first because history not collected today cannot be bought later. Event Monitoring second because it shows you what phase three changed. Encryption last because it is the only capability that alters query semantics.
Field Audit Trail retention is a mechanism, not a number
| Without FAT | With FAT |
|---|---|
| "retains field history data for up to 18 months, and up to 24 months via the API" | "retains archived field history data until you delete it" |
| 20 tracked fields per object | 200 tracked fields per object |
The policy is Metadata API, not Setup:
<historyRetentionPolicy>
<archiveAfterMonths>18</archiveAfterMonths> <!-- min 1, max 18, default 18 -->
<archiveRetentionYears>7</archiveRetentionYears> <!-- a REMINDER; deletes nothing -->
<gracePeriodDays>30</gracePeriodDays> <!-- first archive only -->
<description>Owner and requirement</description>
</historyRetentionPolicy>
Requires the RetainFieldHistory permission. Defaults when you deploy nothing: 18 months in production, one month in sandboxes, retained until deleted — and "Salesforce doesn't include the default retention policy when you retrieve the object's definition through Metadata API," so an empty retrieve is not evidence of no policy.
Storage: "Field history tracking data and Field Audit Trail data don't count against your data storage limits."
The monitoring surfaces are not interchangeable
| Surface | Shape | Permission (login example) |
|---|---|---|
| Event Log File | CSV per event type per day | View Event Log Files |
| Event Log Objects | SOQL-queryable | View Real-Time Event Monitoring Data |
| Real-Time Event Monitoring | Streaming (LoginEvent, …) | View Real-Time Event Monitoring Data |
| Login History | Setup page and object | Manage Users |
| Enhanced Transaction Security | Policies with actions | — |
Three different permissions for the same question. An analyst granted one cannot use the others.
Encryption is not retroactive
Enabling a policy encrypts subsequent writes. Existing records stay in plaintext until a re-encryption job runs and completes. Verify per object on Encryption Statistics.
The cross-capability interaction
"If you turn on Platform Encryption, the previously archived data remains unencrypted." History archived between phase one and phase three is permanently unencrypted. State that position; do not let it be discovered.
Common Patterns
Pattern A — three phases, three gates
Each phase closes on evidence, not on enablement. FAT closes when FieldHistoryArchive is populating and the policy is deployed; Event Monitoring closes when an incident rehearsal has produced a timeline; encryption closes per object when the query snapshot diff is clean.
Pattern B — the incident rehearsal
A scripted investigation — "user X may have exported customer data at 02:00 last Tuesday" — run end to end, recording how long each step took and what was missing. The list of what was missing is the deliverable. Full script in