Description
A TrustStrategy of TrustSelfSignedStrategy is being used while setting up http clients to communicate with Knox over SSL.
In the Hadoop class it should be:
HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; TrustStrategy trustStrategy = TrustSelfSignedStrategy.INSTANCE; if (clientContext.connection().secure()) { hostnameVerifier = SSLConnectionSocketFactory.getDefaultHostnameVerifier(); trustStrategy = null; } else {
instead of:
HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE; TrustStrategy trustStrategy = TrustSelfSignedStrategy.INSTANCE; if (clientContext.connection().secure()) { hostnameVerifier = SSLConnectionSocketFactory.getDefaultHostnameVerifier(); } else {
The trustStrategy must be null in order to keep the default X509TrustManager defined for the default ssl algorithm.