0

I have been working on a project in which I utilised the following php library in order to push data to Salesforce using the REST API.

https://github.com/gmo/salesforce-rest-api

Everything was working as planned locally, I can push data to my sandbox as expected. However this morning I set up the same project on a development server in preparation for the client to do some hands on testing and noticed that the API would no longer authenticate my user details.

I checked the login history to see this message, 'Failed: Login over insecure channel' which from my investigations appears to relate to the impending upgrade from TLS 1.0

Admittedly encryption and the like isn't my strong point so I'm a bit confused as to how I can resolve this issue. Considering my current code is working as expected and is able to successfully push data to the same sandbox using the same login details when setup on my local machine.

Does this mean that it is in fact the server which needs updated to use TLS 1.1 etc or should I attempt to find another php REST library.

Sorry if any of that sounds like a stupid question, but I'm a bit confused at this point.

I should probably mention that the server in question is running Centos 6.6

2 Answers 2

1

The repository for the library you are using was updated more than a year ago, so I bet the original author didn't update the protocol to TLS 1.1 or 1.2. So you have two options here:

1 - Use your knowledge of PHP to fix the library and make it use TLS 1.1 or 1.2.

2 - Get another library to do this for you.

It is worth noticing that your issue doesn't seem to be related to TLS itself since Salesforce will disable TLS 1.0 on 22 July 2017, so in theory you have a little more than one month to use 1.0. But you definitely should be thinking about using 1.1 or 1.2 just to be safe.

3
  • The account which the sandbox was produced from has the Critical Update for testing the disablement of TLS 1.0 enabled, I assumed that this would have been a setting carried over to the sandbox when it was created. It seems weird to me that it would work on my local machine but not on the server? May 15, 2017 at 12:36
  • I'm not sure if the sandbox has all the critical updates applied automatically when the production instance has them activated. Have you checked this? Is it enabled on production but not on sandbox? May 15, 2017 at 13:32
  • 1
    The Critical Update is applied in production but in the Sandbox it doesn't appear in the Critical Updates list at all. In any case I have updated the server using 'yum update nss curl openssl' and I think it should now work for TLS 1.2 however rather than an error returned from Salesforce its just empty. Think its dying at the curl_exec stage although i'm still trying to figure why. May 15, 2017 at 15:21
0

Figured I would leave this here for future reference. I eventually got it working by updating the server, turns out I never had to make any edits on the code side of things, the library I was using appears to work perfectly fine as is. (This one for anyone interested: https://github.com/gmo/salesforce-rest-api).

To finally get it working again it seems I had to make a few updates to the server, which was running Centos 6.6

Firstly I ran: yum update nss curl openssl

Which appeared to stop Salesforce throwing errors during API authentication instead just returning an empty response.

I then tried a general package update using yum update which resulted in about 400+ updates being applied, appears the server was a tad out of date.

This appears to have resolved the issue as I can now connect as expected.

So something in among those 400+ updates fixed the issue, sorry I can't be more specific at this point.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .