SfSkills Domains Docs GitHub

Home / integration / mutual-tls-callouts

mutual-tls-callouts

Configure mTLS for Apex callouts using Named Credentials with client certificate authentication. NOT for standard TLS or API key auth — use architect/integration-security-architecture.

Open the skill folder on GitHub


Mutual TLS Callouts

Mutual TLS requires both sides to present certificates. Salesforce supports mTLS callouts via a client certificate stored in Setup → Certificate and Key Management, referenced from a Named Credential. This skill sets up the cert, the Named Credential, and a minimal Apex caller that proves the connection before shipping.

Adoption Signals

Partner APIs that mandate mTLS (banks, healthcare EDI, some government systems).

  1. Generate a client keypair (or receive partner-signed cert) and import via Setup → Certificate and Key Management.
  2. Create Named Credential referencing the certificate; set endpoint + authentication protocol 'Per User' or 'Named Principal'.
  3. Write a small Apex probe: HttpRequest req; req.setEndpoint('callout:MyPartner/health'); new Http().send(req); and assert 200.
  4. Schedule a daily probe job with alerting; cert expiry surfaces 30+ days ahead.
  5. Rotate certificate annually or per partner policy.

Key Considerations

Worked Examples (see references/examples.md)

Common Gotchas (see references/gotchas.md)

Top LLM Anti-Patterns (full list in references/llm-anti-patterns.md)

Official Sources Used

Package files