[resolved] tSalesforceConnection secured connection

[resolved] tSalesforceConnection secured connection

Hi,
I use tSalesforceConnection with login type "Basic". 
I have to secure the connection between my talend jobs and Salesforce using a certificate, but the connector does not offer this possibilty.  What is the way to do this? 
Thanks and Regards,
Benoît

Accepted Solutions

Re: [resolved] tSalesforceConnection secured connection

Hi,
Mutual Authentication through certificate between Talend and Salesforce run. The issue is caused by URL back from Salesforce login. This URL has no port, but api call with mutual authentication requiert specific port 8443.
So the solution is to modify endpoint URL to add port in a tJava componant after the tSalesforceConnection.
Regards,
Benoît

All Replies
Moderator

Re: [resolved] tSalesforceConnection secured connection

Hi,
What's kind of certification do you want to use? Here is a component tsetkeystore which submits authentication data of a truststore with or without keystore to validation for the SSL connection.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: [resolved] tSalesforceConnection secured connection

Hi Sabrina,
I already use tsetkeystore component with twebservice, but I did not know that this component was used with the Salesforce connector.
I want a solution to establish a secure connection between Talend and Salesforce type :
- Mutual authentication (tsetkeystore purpose ?);
- OAuth2 JWT Bearer flow
- SAML Assertion flow

How the tSalesforceConnection component knows to use the certificate defined by the tsetkeystore  for mutual authentication ?

Thanks a lot for reply.
Regards,
Benoît
Moderator

Re: [resolved] tSalesforceConnection secured connection

Hi,
Why don't you use "OAuth2" login type in tSaleforceConnection instead of "Basic"?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: [resolved] tSalesforceConnection secured connection

Hi,
The oauth2 connection implemented in the Salesforce connector requires a step of manual authentication (copy / paste a url to enter login and password). This type of step can not be used in an industrial process. Furthermore it does not use the certificate.
Regards,
Benoît

Re: [resolved] tSalesforceConnection secured connection

Hi,
I'm back with more information.
I have tested tSetKeystore + tSalesforceConnection, but when connection is configured with a salesforce user API only and Enforce SSL/TLS Mutual Authentication, I encountered this error :
Exception in component tSalesforceInput_3
com.salesforce.soap.partner.UnexpectedErrorFault: MUTUAL_AUTHENTICATION_FAILED: This session could not be mutually authenticated for use with the API
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.salesforce.soap.partner.SforceServiceStub.query(SforceServiceStub.java:8099)
at org.talend.salesforce.SforceManagementImpl.query(SforceManagementImpl.java:920)
...

Mutual authentication is negociated for each API call, but tSalesforceConnection seems not do the job.
What is the way to change that ?
Best regards,
Benoît

Re: [resolved] tSalesforceConnection secured connection

Hi,
Mutual Authentication through certificate between Talend and Salesforce run. The issue is caused by URL back from Salesforce login. This URL has no port, but api call with mutual authentication requiert specific port 8443.
So the solution is to modify endpoint URL to add port in a tJava componant after the tSalesforceConnection.
Regards,
Benoît