Newer Version Available
Using Certificates
To use two-way SSL authentication, send a certificate with your callout that was either generated in Salesforce or signed by a certificate authority (CA). Sending a certificate enhances security because the target of the callout receives the certificate and can use it to authenticate the request against its keystore.
To enable two-way SSL authentication for a callout:
- Generate a certificate.
- Integrate the certificate with your code. See Using Certificates with SOAP Services and Using Certificates with HTTP Requests.
- If you’re connecting to a third party and using a self-signed certificate, share the Salesforce certificate with them so that they can add the certificate to their keystore. If you’re connecting to another application, generate and integrate the certificate with your code, and then ensure that the Web or application server is configured to accept the certificate. This process depends on the type of Web or application server you use.
- Configure the remote site settings for
the callout. Before any Apex callout can call an external site, that site must be
registered in the Remote Site Settings page, or the callout fails.
If the callout specifies a named credential as the endpoint, you don’t need to configure remote site settings. To set up named credentials, see Named Credentials and External Credentials in Salesforce Help.