If your proxy service connects to a back-end server through a proxy server, you can enable secure socket layer (SSL) tunneling through the proxy server, which prevents any intermediary proxy services from interfering with the communication. SSL tunneling is available when your proxy service uses the HTTP PassThrough transport or the HTTP-NIO transport .
To configure SSL tunneling through the proxy server:
In
<ESB_HOME>/repository/conf/axis2/axis2.xml
, add the following parameters to thetransportSender
configuration for PassThroughHttpSender, PassThroughHttpSSLSender, HttpCoreNIOSender, and HttpCoreNIOSSLSender:<parameter name="http.proxyHost" locked="false">hostName</parameter>
where<parameter name="http.proxyPort" locked="false">portNumber</parameter>
hostName
andportNumber
specify the host name and port number of the proxy server.
- Uncomment the following parameter in the PassThroughHttpSSLSender and HttpCoreNIOSSLSender configurations and change the value to
AllowAll
.<parameter name="HostnameVerifier">AllowAll</parameter>
For example, if the host name and port number of proxy server is localhost:8080, your transportSender configurations for PassThroughHttPSender and PassThroughHttpSSLSender would look like this:
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender"> <parameter name="non-blocking" locked="false">true</parameter> <parameter name="http.proxyHost" locked="false">localhost</parameter> <parameter name="http.proxyPort" locked="false">8080</parameter> </transportSender>
<transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender"> <parameter name="non-blocking" locked="false">true</parameter> <parameter name="keystore" locked="false"> <KeyStore> <Location>repository/resources/security/wso2carbon.jks</Location> <Type>JKS</Type> <Password>wso2carbon</Password> <KeyPassword>wso2carbon</KeyPassword> </KeyStore> </parameter> <parameter name="truststore" locked="false"> <TrustStore> <Location>repository/resources/security/client-truststore.jks</Location> <Type>JKS</Type> <Password>wso2carbon</Password> </TrustStore> </parameter> <parameter name="http.proxyHost" locked="false">localhost</parameter> <parameter name="http.proxyPort" locked="false">8080</parameter> <parameter name="HostnameVerifier">AllowAll</parameter> </transportSender>