3 Replies Latest reply on Jun 19, 2017 1:18 PM by andey

    Proxy options don't work with Salesforce connector

    pranavk

      Hi,

      Just wanted to point out that using proxy options in the Salesforce connector does not work (most surely an underlying library issue though). Following is the way I am setting the options in question.

       

       

      managedConnectionFactory.setProxyURL(config.get(SALESFORCE_PROXY_URL).toString());

      managedConnectionFactory.setProxyUsername(config.get(SALESFORCE_PROXY_USERNAME).toString());

      managedConnectionFactory.setProxyPassword(config.get(SALESFORCE_PROXY_PASSWORD).toString());

       

      When we try to connect to a proxy which is secured by an authentication, I get this error: Caused by: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"

       

      However, this functionality works for the case when we disable the authentication on the proxy server. We have a case where we need to use the SF connector in a proxy configuration but see no way of going ahead. Have you heard of this issue/do you see a workaround by which SF connector would be able to support this?

       

      Thanks,

      Pranav

        • 1. Re: Proxy options don't work with Salesforce connector
          andey

          You have to edit the variables jdk.http.auth.tunneling.disabledSchemes and jdk.http.auth.proxying.disabledSchemes to blank like this:

          jdk.http.auth.tunneling.disabledSchemes=

          jdk.http.auth.proxying.disabledSchemes=

           

           

          Change in Java 8 Update 111:

           

           

          Now, proxies requiring Basic authentication when setting up a tunnel for HTTPS will no longer succeed by default. If required, this authentication scheme can be reactivated by removing Basic from the jdk.http.auth.tunneling.disabledSchemes networking property, or by setting a system property of the same name to "" ( empty ) on the command line.

          http://www.oracle.com/technetwork/java/javase/8u111-relnotes-3124969.html

           

           

          You could try to run Java with

           

           

          java -Djdk.http.auth.tunneling.disabledSchemes=""

          or probably better (security): upgrade the authentication scheme of your proxy, e.g. to Digest access authentication.

          • 2. Re: Proxy options don't work with Salesforce connector
            pranavk

            Hi Anup,

             

            Thanks for your response, and kindly excuse the delay in my response. I tried passing these as JVM arguments while starting my app server but this did not do the trick for me. Were you able to solve this particular case of connecting through the Salesforce connector using these settings?

            • 3. Re: Proxy options don't work with Salesforce connector
              andey

              Guessing that your proxy is not allowing clients to access servers via HTTPS.