Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Hardware Security Module (HSM) entry
How-to guide

Provision an HSM for Shield BYOK or Cache-Only Keys

Provisioning an HSM for use with Salesforce Shield is a coordinated effort between the customer's security team, the HSM vendor, and the Salesforce architecture team. The steps below cover the path for a cloud HSM integration.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 19, 2026

Provisioning an HSM for use with Salesforce Shield is a coordinated effort between the customer's security team, the HSM vendor, and the Salesforce architecture team. The steps below cover the path for a cloud HSM integration.

  1. Pick the HSM service

    Choose AWS CloudHSM, Azure Dedicated HSM, GCP Cloud KMS HSM, or an on-prem appliance. Most customers default to the cloud HSM of their primary cloud provider.

  2. Provision the HSM cluster

    Follow the cloud provider documentation to provision an HSM cluster. Configure two HSMs minimum for high availability; single-HSM deployments fail when the device needs maintenance.

  3. Generate the tenant secret

    Inside the HSM, generate the master key material for the Salesforce tenant secret. The key never leaves the HSM in cleartext; only wrapped versions can be exported.

  4. Configure connectivity to Salesforce

    For Cache-Only Key Service, configure the HSM as a callable endpoint Salesforce can reach through the documented key wrapping protocol. For BYOK, export the wrapped key for upload.

  5. Configure Salesforce side

    Setup > Encryption Settings > Key Management. For BYOK, upload the wrapped key. For Cache-Only Key Service, configure the endpoint and authentication.

  6. Test key operations

    Encrypt a test field and confirm encryption succeeds. For Cache-Only, monitor the HSM logs to confirm Salesforce is making the expected calls.

  7. Set up monitoring and DR

    Monitor HSM availability, key operation rate, and failure events. Define disaster recovery: how do you restore key access if the primary HSM cluster fails?

Key options
AWS CloudHSMremember

Cloud HSM service in AWS. Common choice for AWS-centric customers.

Azure Dedicated HSMremember

Cloud HSM service in Azure. Common choice for Azure-centric customers.

GCP Cloud KMS HSMremember

Google Cloud HSM-backed Key Management Service.

On-prem applianceremember

Self-operated HSM in customer data center. Use when regulations require physical custody.

FIPS 140-2 Level 3remember

Standard certification level for enterprise HSMs. Sufficient for most compliance frameworks.

Gotchas
  • HSM single-instance deployments fail during maintenance. Always provision at least two HSMs in a cluster; single-instance is not production-grade.
  • Cache-Only Key Service adds latency on every encrypted-field operation. Heavy reports filtering encrypted fields can run noticeably slower; benchmark before production.
  • HSM backup is non-trivial. Keys cannot be exported in cleartext; restore requires another HSM that can unwrap the backup. Plan disaster recovery carefully.
  • On-prem HSMs require deliberate operational discipline. Most customers find cloud HSMs simpler; reserve on-prem for cases where physical custody is mandated.
  • Network connectivity to the HSM is a critical dependency. Outage of the HSM connectivity halts decryption on Cache-Only; design network paths for high availability.

See the full Hardware Security Module (HSM) entry

Hardware Security Module (HSM) includes the definition, worked example, deep dive, related terms, and a quiz.