busker1

proxy config clarification request

0 votes
I've a request for clarification on the proxy configuration options. When should withHttps be used versus withHttp and what difference does it make? It isn't clear to me that it is straight forward as I've seen sample code showing withHttp (vs withHttps) being used, yet the URL passed is 'https://sandbox...'. So in theory the traffic is encrypted regardless...
ProxyConfiguration httpProxyConfiguration = ProxyConfigurationBuilder
        .newProxyConfiguration()
            .withHttpsHost(proxyHost)
            .withHttpsPort(proxyPort)
            // .withHttpHost(proxyHost)
            // .withHttpPort(proxyPort)
            .build();

return new EslClient(apiKey, apiUrl, allowAllSSLCertificates, httpProxyConfiguration);

Reply to: proxy config clarification request

0 votes
Hi busker1, I just walked through the source code for Java SDK, and found out that the proxyConfiguration object boiled down to be used in below pseudo code at lower level:
        final org.apache.http.impl.client.HttpClientBuilder httpClientBuilder = HttpClients.custom();
        httpClientBuilder.setDefaultRequestConfig(RequestConfig requestConfig);
        requestConfig = RequestConfig.custom()
                .setProxy(new HttpHost(proxyConfiguration.getHost(), proxyConfiguration.getPort(), proxyConfiguration.getScheme()))
                .build();
So the http vs https refers to the schema your local machine connected to your proxy server, depending on your real environment. To connect to OneSpan Sign server, it's always using HTTPS, based on TLS1.1 or later, which is not related to the proxy setting. Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: proxy config clarification request

0 votes
Yes thank you.

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off