function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vivek SubediVivek Subedi 

Mutual Authentication Timed out error on port 8443

Hi,
I am writing an application to ETL data from Salesforce using BULK API into our system. I am able to log in and do all the work without mutual authentication. Since mutual authentication is the added security, we want to implement it. However, I am keep getting time out error when i do the curl command with port 8443 and certificatie. Here is my command:

$ curl -k https://cs32.my.salesforce.com:8443/services/Soap/u/37.0 -H "Content-Type:text/xml;charset=UTF-8" -H "SOAPAction:login" -d @C:/apps/login.txt -v -e fullcert.pem:@C:/apps/pem_cer_cert/cert.cer

On the other hand, if i don't use port 8443 with above url, i able login successfully and get valid session ID. Suprisingly, I can't create any jobs from that session Id. I kept getting invalid session ID error when i try to create a job.

Help is really appriciated if anybody resolve this issue.

Thanks 
Vivek
 
Vasani ParthVasani Parth
Vivek,

AFAIK, You must follow these steps to upload a certificate otherwise you will be gettng error Client certificate error:No client certificate provided for port 8443.
  1. Click Upload Mutual Authentication Certificate.
  2. Give your certificate a label and name and click Choose File to locate the certificate.
  3. Click Save to finish the upload process.
  4. Enable the “Enforce SSL/TLS Mutual Authentication” user permission for an “API Only” user. This “API Only” user configures the API client to connect on port 8443 to present the signed client certificate.
Note that the client certificate must include any intermediate certificates in the certificate chain when contacting port 8443. A certificate chain is an hierarchical order of certificates where one certificate issues and signs another certificate lower in the hierarchy. Upload a certificate chain as a single PEM-encoded CA-signed certificate.

Please mark this as the best answer if this helps
Vivek SubediVivek Subedi
Hi Vasani,

Thanks for your quick response.

Everything is setup like you mentioned above. All the certificates are in hierarchical order. I have tried three kinds of certificate i.e. .pem, .cer, .p7b. I am able to connect and login if i don't provide port 8443 with all three kinds of certificate. As soon as i put port 8443 with my URL, i get timed out error. I am not getting any kind of certificate error. Here is the complete error message:

$ curl -k https://cs32.my.salesforce.com:8443/services/Soap/u/37.0 -H "Content-Type:text/xml;charset=UTF-8" -H "SOAPAction:login" -d @C:/apps/login.txt -v -e fullcert.pem:@C:/apps/pem_cer_cert/cert.pem
* STATE: INIT => CONNECT handle 0x600057810; line 1402 (connection #-5000)
* Added connection 0. The cache now contains 1 members
*   Trying 96.43.153.162...
* STATE: CONNECT => WAITCONNECT handle 0x600057810; line 1455 (connection #0)
* After 149926ms connect time, move on!
* connect to 96.43.153.162 port 8443 failed: Connection timed out
*   Trying 96.43.153.34...
* After 74848ms connect time, move on!
* connect to 96.43.153.34 port 8443 failed: Connection timed out
* Failed to connect to cs32.my.salesforce.com port 8443: Connection timed out
* Closing connection 0
* The cache now contains 0 members
curl: (7) Failed to connect to cs32.my.salesforce.com port 8443: Connection timed out


If i remove port 8443 from above curl command, i able to login get valid session ID but the session ID won't work to create a job. It seems like I need to hit port 8443 to use the session ID.
sravanthi bhavanamsravanthi bhavanam
Hi Vivek,
I am having the same issue as well. Were you able to get around it?
vijay chandra 37vijay chandra 37
HI VIvek,

Could you please try with the port 443