You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2019/02/01 11:22:16 UTC

[ignite] branch master updated: IGNITE-11166 Web Console agent: Hostname verifier should be disable in case of trustAll flag enabled. (#6002)

This is an automated email from the ASF dual-hosted git repository.

anovikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 15a3bd9  IGNITE-11166 Web Console agent: Hostname verifier should be disable in case of trustAll flag enabled. (#6002)
15a3bd9 is described below

commit 15a3bd92373b06ddc70f4e80547b1a07e3f7031f
Author: Andrey Novikov <an...@apache.org>
AuthorDate: Fri Feb 1 18:22:08 2019 +0700

    IGNITE-11166 Web Console agent: Hostname verifier should be disable in case of trustAll flag enabled. (#6002)
---
 .../src/main/java/org/apache/ignite/console/agent/AgentLauncher.java   | 3 +++
 .../main/java/org/apache/ignite/console/agent/rest/RestExecutor.java   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java
index 74c8376..2979e851 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/AgentLauncher.java
@@ -358,6 +358,9 @@ public class AgentLauncher {
                 cfg.serverTrustStorePassword()
             );
 
+            if (serverTrustAll)
+                builder.hostnameVerifier((hostname, session) -> true);
+
             SSLSocketFactory sslSocketFactory = sslSocketFactory(
                 cfg.serverKeyStore(),
                 cfg.serverKeyStorePassword(),
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
index 5a9783c..374533f 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/agent/rest/RestExecutor.java
@@ -105,6 +105,9 @@ public class RestExecutor implements AutoCloseable {
 
         X509TrustManager trustMgr = trustManager(trustAll, trustStorePath, trustStorePwd);
 
+        if (trustAll)
+            builder.hostnameVerifier((hostname, session) -> true);
+
         SSLSocketFactory sslSocketFactory = sslSocketFactory(
             keyStorePath, keyStorePwd,
             trustMgr,