Accomplish two-way mutual authentication with Salesforce and Mulesoft.
Commands to generate private key and certificate signing request:
openssl genrsa -out private.pem 2048 openssl req -new -key private.pem -out mysignrequestfile.csr
The certificate that needs to be uploaded is your public PEM-encoded certificate chain.
Mule's mutual authentication requires a JKS file to be created. This will be the concatenation of the private key and public cert.
The following commands can be used to accomplish the task:
cat private.pem public.pem > clientCert.pem openssl pkcs12 -export -in clientCert.pem -out cert.p12 keytool -importkeystore -srckeystore cert.p12 -srcstoretype pkcs12 -destkeystore clientCert.jks
Import your JKS file into your resources folder, and use the following configuration for the Salesforce Connector. This should give a successful connection.
Salesforce Connector configuration:
<salesforce:sfdc-config name="Salesforce_Config" doc:name="Salesforce Config" doc:id="9e5566a2-f167-4a27-aba5-394ad7b8e8a9" > <salesforce:basic-connection username="auser@mulesoft.com" password="aPassword" securityToken="aSecToken" > <tls:context > <tls:key-store type="jks" path="clientCert.jks" alias="1" keyPassword="xxx" password="xxx" /> </tls:context> </salesforce:basic-connection> </salesforce:sfdc-config>
Refer to the Salesforce documentation.
Set Up Mutual Authentication Certificate
Configure Your API Client to Use Mutual Authentication
001115543

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.