Home / security / shield-kms-byok-setup
shield-kms-byok-setup
Configure Shield Platform Encryption with customer-supplied (BYOK) or customer-held (Cache-Only Key Service) tenant secrets, rotate them, and recover. NOT for Classic Encryption or field masking — use security/platform-encryption.
Open the skill folder on GitHub
Shield Platform Encryption — BYOK / KMS Setup
Shield Platform Encryption derives a data encryption key from a tenant secret. This skill is about where that tenant secret comes from, what each option obliges you to operate, and how to rotate, destroy, and recover it.
| Model | Key material lives | Runtime dependency on your KMS |
|---|---|---|
| Salesforce-managed | Derived inside Salesforce | No |
| BYOK | You generate and wrap it; Salesforce holds the uploaded material | No |
| Cache-Only Key Service | Your key service; fetched on demand. "Salesforce doesn't retain or persist your cache-only keys in any system of record or backups." | Yes |
Field-level encryption itself is fixed regardless of model: "FLE uses the Advanced Encryption Standard (AES) with 256-bit keys by using Cipher Block Chaining (CBC) mode and a random initialization vector (IV)."
The framing that matters: these are not tiers. Each answers a different compliance sentence and carries a different operational obligation. Most orgs that reach for Cache-Only Keys should be on BYOK.
For the encryption policy itself — which fields, deterministic versus probabilistic, what breaks — see security/platform-encryption. This skill assumes that decision is made.
Before Starting
- Cite the requirement. Which specific clause drives the choice? "Encrypted at
rest," "customer must originate the key material," and "key material must never persist in the vendor's systems" are three different requirements with three different answers.
- If Cache-Only is being considered, get an availability commitment. Your key
service becomes a hard dependency of reading encrypted data, on a refresh schedule Salesforce controls. Who operates it, to what SLO, with what on-call?
- Measure one re-encryption. Rotation cadence should be set against the
measured duration of re-encrypting your largest encrypted object, not against a policy template.
- Separate the access-control workstream now. The key model does not change who
can read a field. If need-to-know is also a requirement, that is an FLS matrix and it is a different piece of work.
Core Concepts
Rotation applies to subsequent writes
Uploading a customer-supplied tenant secret changes only subsequent encryption — quoted, with what that means for already-encrypted data, in