geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject geode git commit: GEODE-1294: Added test to confirm default http mutual authentication behavior
Date Wed, 04 Jan 2017 22:01:07 GMT
Repository: geode
Updated Branches:
  refs/heads/develop ebde0a260 -> d26ccf5ad


GEODE-1294: Added test to confirm default http mutual authentication behavior


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/d26ccf5a
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/d26ccf5a
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/d26ccf5a

Branch: refs/heads/develop
Commit: d26ccf5ad68d672c20cdca0bc4d01d4dad4a3c7e
Parents: ebde0a2
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Wed Jan 4 14:01:02 2017 -0800
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Wed Jan 4 14:01:02 2017 -0800

----------------------------------------------------------------------
 .../net/SSLConfigurationFactoryJUnitTest.java   | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d26ccf5a/geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
index 4f8d5b8..31c2469 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/net/SSLConfigurationFactoryJUnitTest.java
@@ -252,6 +252,34 @@ public class SSLConfigurationFactoryJUnitTest {
         sslConfig.getTruststoreType());
   }
 
+  @Test
+  public void getSSLHTTPMutualAuthenticationOffWithDefaultConfiguration() {
+    Properties properties = new Properties();
+    properties.setProperty(CLUSTER_SSL_ENABLED, "true");
+    properties.setProperty(MCAST_PORT, "0");
+    DistributionConfigImpl distributionConfig = new DistributionConfigImpl(properties);
+    SSLConfigurationFactory.setDistributionConfig(distributionConfig);
+    SSLConfig sslConfig =
+        SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.WEB);
+    assertEquals(false, sslConfig.isRequireAuth());
+    assertEquals(true, sslConfig.isEnabled());
+    sslConfig =
+        SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.CLUSTER);
+    assertEquals(true, sslConfig.isRequireAuth());
+    assertEquals(true, sslConfig.isEnabled());
+    sslConfig =
+        SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.GATEWAY);
+    assertEquals(true, sslConfig.isRequireAuth());
+    assertEquals(true, sslConfig.isEnabled());
+    sslConfig =
+        SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.SERVER);
+    assertEquals(true, sslConfig.isRequireAuth());
+    assertEquals(true, sslConfig.isEnabled());
+    sslConfig = SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.JMX);
+    assertEquals(true, sslConfig.isRequireAuth());
+    assertEquals(true, sslConfig.isEnabled());
+  }
+
   private void assertSSLConfig(final Properties properties, final SSLConfig sslConfig,
       final SecurableCommunicationChannel expectedSecurableComponent,
       final DistributionConfigImpl distributionConfig) {


Mime
View raw message