DuoKey logotype

Salesforce BYOK Encryption: Secure Your CRM Data with External Key Management

DuoKey Security Team15 January 2026
Salesforce BYOK Encryption: Secure Your CRM Data with External Key Management

Salesforce BYOK Encryption: Secure Your CRM Data with External Key Management

Table of Contents

  1. Why Salesforce Native Encryption Falls Short
  2. BYOK vs Cache-Only Key: Which Model Fits Your Needs
  3. Salesforce Shield Platform Encryption Explained
  4. Integrating External Key Management with Salesforce
  5. Meeting GDPR Requirements with Salesforce BYOK
  6. Performance Impact and User Experience
  7. Key Rotation and Lifecycle Management in Salesforce
  8. Conclusion
  9. References and Further Reading

For enterprises storing sensitive customer data in Salesforce, the question of encryption key ownership has become a critical compliance and security concern. Salesforce encryption BYOK (Bring Your Own Key) offers organizations the ability to maintain cryptographic control over their CRM data—even when that data resides in Salesforce's multi-tenant cloud infrastructure. This capability has moved from a security luxury to a regulatory necessity, particularly for organizations operating under GDPR, DORA, NIS2, or industry-specific frameworks like HIPAA and TISAX.

The fundamental challenge is straightforward: when your encryption keys are generated, stored, and managed by your cloud provider, you've effectively delegated the security of your most sensitive data to a third party. For regulated industries—financial services, healthcare, automotive, and government—this delegation creates audit gaps, compliance risks, and potential exposure to foreign jurisdiction data access requests. Salesforce external key management addresses this gap by allowing enterprises to retain ultimate authority over the cryptographic keys protecting their CRM data.

This guide examines the technical architecture, compliance implications, and operational considerations for implementing BYOK and Cache-Only Key solutions within Salesforce Shield Platform Encryption. We'll provide the technical depth that CISOs and security architects need to make informed decisions about their CRM data sovereignty strategy.

Why Salesforce Native Encryption Falls Short

Salesforce provides encryption capabilities out of the box, but the default implementation leaves significant security and compliance gaps that enterprise security teams cannot ignore.

The Provider-Managed Key Problem

Salesforce's standard encryption uses keys that are generated and stored within Salesforce's infrastructure. While this provides protection against certain threat vectors—such as physical theft of storage media—it does not address the fundamental concern of provider access. Salesforce administrators, support personnel, and potentially law enforcement in Salesforce's operating jurisdictions can theoretically access the encryption keys protecting your data.

For organizations subject to European data protection regulations, this creates a direct conflict with the principle of data sovereignty. The Schrems II ruling invalidated the Privacy Shield framework precisely because US-based providers could be compelled to provide access to data under the CLOUD Act—regardless of where that data is physically stored.

Compliance Audit Failures

When auditors examine your Salesforce security posture, they will ask a critical question: "Who controls the encryption keys?" If the answer is "Salesforce," you face several problems:

  • GDPR Article 32 requires appropriate technical measures to ensure data security—measures you control
  • DORA Article 9 mandates that financial entities maintain control over their ICT security functions
  • NIS2 Directive requires organizations to implement cryptographic controls with documented key management procedures
  • HIPAA Security Rule necessitates access controls that you can independently verify and audit

With provider-managed keys, you cannot demonstrate independent control. Your security posture is only as strong as Salesforce's internal access controls—controls you cannot audit or verify.

The Insider Threat Vector

Salesforce employs thousands of personnel globally. While the company maintains robust security practices, insider threats remain a statistical reality in any large organization. A 2024 Verizon Data Breach Investigations Report found that insider threats accounted for 19% of breaches, with privileged access abuse being a primary vector.

When Salesforce holds your encryption keys, a compromised insider at Salesforce becomes a threat to your data. External key management eliminates this risk by ensuring that Salesforce personnel—regardless of their access level—cannot decrypt your data without your explicit participation.

Jurisdictional Data Access Risks

The extraterritorial reach of the US CLOUD Act means that a US court order can compel Salesforce to produce data stored on servers anywhere in the world. For European enterprises, this creates an irreconcilable conflict with GDPR's data protection requirements.

With Salesforce BYOK encryption properly implemented, even if Salesforce is compelled to hand over encrypted data, they cannot provide the keys to decrypt it. This creates a technical safeguard that complements legal and contractual protections.

BYOK vs Cache-Only Key: Which Model Fits Your Needs

Salesforce offers two distinct approaches to customer-controlled encryption: Bring Your Own Key (BYOK) and Cache-Only Key. Understanding the differences is essential for selecting the right model for your security requirements.

Bring Your Own Key (BYOK) Architecture

In the BYOK model, you generate your tenant secret outside of Salesforce and upload it to the platform. Salesforce combines your tenant secret with a Salesforce-generated master secret to create the data encryption key that protects your information.

Key characteristics of BYOK:

AspectBYOK Behavior
Key GenerationCustomer-generated tenant secret
Key StorageTenant secret stored in Salesforce HSM
Key DerivationCombined with Salesforce master secret
RevocationDestroys tenant secret; requires Salesforce support for recovery
Offline AccessSalesforce can access encrypted data (with derived key)

BYOK provides significant improvement over purely Salesforce-managed encryption because you control the tenant secret generation process. However, because the derived data encryption key exists within Salesforce's infrastructure, Salesforce technically retains the ability to decrypt your data during normal operations.

Cache-Only Key Architecture

The Salesforce Cache-Only Key model goes further by ensuring that your key material never persists in Salesforce's infrastructure. Instead, your external key management system provides keys on demand, and Salesforce caches them in memory only for the duration of active use.

Key characteristics of Cache-Only Key:

AspectCache-Only Key Behavior
Key GenerationCustomer-generated and managed externally
Key StorageNever persisted in Salesforce; memory-only cache
Key DerivationKey material fetched from external KMS via callout
RevocationImmediate by revoking external key service access
Offline AccessSalesforce cannot access data without external key service

Cache-Only Key provides the strongest form of CRM data sovereignty available in Salesforce. If you revoke access to your external key service, Salesforce immediately loses the ability to decrypt your data—no support ticket required, no grace period.

Decision Framework

Choose BYOK when:

  • You need to satisfy basic compliance requirements for customer-controlled keys
  • Your threat model does not include Salesforce as a potential adversary
  • You require simpler implementation with fewer external dependencies
  • Business continuity concerns outweigh maximum security posture

Choose Cache-Only Key when:

  • Regulations require that you can immediately revoke cloud provider access
  • Your threat model includes jurisdictional data access concerns (CLOUD Act)
  • You require cryptographic proof that the provider cannot access data at rest
  • You have mature external key management infrastructure

For organizations in regulated industries—particularly European financial services, healthcare, and automotive—Cache-Only Key typically represents the appropriate choice for maximum data sovereignty.

Salesforce Shield Platform Encryption Explained

Salesforce Shield Platform Encryption is the enterprise encryption framework that enables both BYOK and Cache-Only Key implementations. Understanding its architecture is essential for proper deployment.

Shield Platform Encryption Components

Shield Platform Encryption operates on a hierarchical key structure:

  1. Master Secret — Generated and managed by Salesforce
  2. Tenant Secret — Generated by the customer (in BYOK) or fetched externally (in Cache-Only Key)
  3. Data Encryption Key — Derived from the combination of master and tenant secrets
  4. Per-Record Keys — Individual keys derived for specific data records

This hierarchy provides defense in depth. Compromising a single per-record key does not expose all encrypted data, and the separation between master and tenant secrets means neither party alone can derive the data encryption key.

Encryptable Data Types

Shield Platform Encryption supports encryption for:

  • Standard and custom field data — Text, text area, phone, email, URL fields
  • Files and attachments — Documents uploaded to Salesforce
  • Search index — Encrypted search maintains functionality while protecting data
  • Chatter — Posts and comments in the Salesforce collaboration platform
  • Platform Events — Event data in asynchronous processing

Not all field types support encryption. Formula fields, auto-number fields, and certain system fields cannot be encrypted. Your implementation team must map sensitive data fields to encryptable field types during the planning phase.

Probabilistic vs Deterministic Encryption

Salesforce Shield offers two encryption schemes:

Probabilistic Encryption provides maximum security by generating unique ciphertext for identical plaintext values. The same customer name encrypted twice produces different ciphertext. This prevents pattern analysis attacks but limits certain functionality—you cannot filter or group by encrypted fields.

Deterministic Encryption produces consistent ciphertext for identical plaintext values, enabling filtering, grouping, and case-insensitive matching on encrypted data. However, this consistency creates a theoretical vulnerability to frequency analysis on high-cardinality fields.

For most enterprise deployments, probabilistic encryption is appropriate for highly sensitive fields (social security numbers, financial data), while deterministic encryption suits fields requiring query functionality (email addresses for duplicate matching).

Licensing Requirements

Shield Platform Encryption requires the Salesforce Shield add-on license. This license also includes Event Monitoring and Field Audit Trail capabilities. For organizations implementing comprehensive security programs, these additional features often justify the Shield investment beyond encryption alone.

Cache-Only Key functionality requires Shield Platform Encryption plus additional configuration for external key service integration.

Integrating External Key Management with Salesforce

Implementing Salesforce external key management requires connecting your key management system (KMS) to Salesforce's encryption infrastructure. This integration follows a standardized architecture but demands careful planning.

External Key Management Architecture

The integration architecture for Cache-Only Key involves:

  1. Your External KMS — Generates, stores, and manages the actual encryption key material
  2. Key Broker Service — Handles authentication and communication protocol translation
  3. Salesforce Named Credential — Stores authentication information for the external service
  4. Salesforce Certificate — Enables mutual TLS authentication
  5. Cache-Only Key Connection — Salesforce configuration linking to your key service

When Salesforce needs to encrypt or decrypt data, it makes an authenticated callout to your key service, retrieves the key material, uses it for the cryptographic operation, and discards the key from memory when no longer needed.

Implementation Prerequisites

Before beginning implementation, ensure you have:

  • Shield Platform Encryption license activated in your Salesforce org
  • External KMS capable of serving keys via HTTPS with mutual TLS
  • Network connectivity between Salesforce and your KMS (firewall rules, proxy configuration)
  • Certificate infrastructure for mutual authentication
  • High availability for your key service (Salesforce requires consistent availability)

Step-by-Step Integration Process

Step 1: Configure Your External KMS

Your KMS must expose an HTTPS endpoint that accepts key fetch requests and returns key material in Salesforce's expected format. The response must include:

  • Key material (base64 encoded)
  • Key identifier
  • Key type indication

DuoKey's Salesforce integration provides a pre-built connector that handles this protocol, eliminating custom development requirements.

Step 2: Create Named Credential in Salesforce

Navigate to Setup > Security > Named Credentials and create a new credential:

  • URL: Your key service endpoint
  • Identity Type: Named Principal
  • Authentication Protocol: Certificate-based (for mutual TLS)

Step 3: Upload Certificates

Upload the client certificate that Salesforce will present to your KMS, and configure your KMS to trust Salesforce's certificate chain.

Step 4: Configure Cache-Only Key Service

In Setup > Security > Platform Encryption > Key Management:

  1. Select "Bring Your Own Key"
  2. Choose "Cache-Only Key Service"
  3. Specify your Named Credential
  4. Configure the key service callout parameters

Step 5: Test the Integration

Use Salesforce's built-in testing tools to verify:

  • Connectivity to your external key service
  • Successful key retrieval
  • Encryption and decryption operations

Step 6: Enable Encryption on Fields

Once the key service is operational, enable encryption on your sensitive fields through Setup > Security > Platform Encryption > Encryption Policy.

Availability and Latency Considerations

Cache-Only Key creates a runtime dependency on your external key service. If your KMS is unavailable, Salesforce cannot decrypt protected data. This has significant implications:

  • KMS uptime requirements — Your key service must meet or exceed Salesforce's own availability SLAs
  • Geographic distribution — Deploy KMS instances in regions close to your Salesforce data center
  • Circuit breaker patterns — Implement failure detection and failover mechanisms to prevent cascading outages

Meeting GDPR Requirements with Salesforce BYOK

Salesforce BYOK — and Cache-Only Key in particular — directly addresses several GDPR compliance concerns raised by the Schrems II ruling.

Demonstrating Data Sovereignty

With Cache-Only Key properly configured, you can demonstrate to regulators that:

  • Salesforce cannot decrypt your data without your key service
  • A CLOUD Act request to Salesforce produces only unusable ciphertext
  • You maintain exclusive control over the key material protecting European personal data

Compliance Documentation

Maintain the following documentation for GDPR audits:

  • Data flow architecture showing external key control
  • Key management policy with rotation and revocation procedures
  • Key access logs demonstrating your exclusive control
  • Data Protection Impact Assessments (DPIAs) for Salesforce processing activities

Performance Impact and User Experience

Encryption introduces latency into Salesforce operations. Understanding and managing this impact is essential for successful adoption.

Typical Latency Benchmarks

For Cache-Only Key, each encryption/decryption operation typically adds:

  • Initial record access: 50–150ms additional (key retrieval)
  • Subsequent operations: Minimal (key cached in memory)
  • List loading: 100–300ms additional depending on record volume

Optimisation Strategies

  • Caching: Tune key cache TTLs to balance security and performance
  • Chunking: Process bulk encryptions during off-peak hours
  • Regional architecture: Co-locate your KMS with your Salesforce instance region

Key Rotation and Lifecycle Management in Salesforce

Regular key rotation is a compliance requirement and a security best practice.

Recommended Rotation Frequencies

Data TypeRecommended Rotation Frequency
Highly sensitive data (financial, health)Quarterly
Standard personal dataAnnually
Less sensitive operational dataEvery 2 years

Key Rotation Process

  1. Generate a new key in your external KMS
  2. Declare the new key version in Salesforce via the key management interface
  3. Initiate re-encryption — Salesforce re-encrypts existing data with the new key
  4. Verify re-encryption — Confirm that all data has been migrated to the new key
  5. Archive the old key — Retain for decryption of older backups if needed

Key rotation does not cause service interruption in Salesforce — the platform manages the transition in the background while normal operations continue.

Conclusion

Salesforce BYOK encryption — and Cache-Only Key in particular — represents the most robust CRM data sovereignty architecture available on the platform. For European organisations subject to GDPR, DORA, or NIS2, it is increasingly not an option but a necessity to demonstrate adequate control over sensitive personal and financial data.

The key to success lies in choosing the right architecture (BYOK vs Cache-Only Key based on your threat model), implementing a high-availability external key management infrastructure, and rigorously documenting controls for audits. DuoKey provides a pre-built connector for Salesforce Cache-Only Key that significantly simplifies this deployment while satisfying the most stringent data sovereignty requirements of European regulators.

References and Further Reading