geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject incubator-geode git commit: GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel Renaming of HTTP_SERVICE -> WEB
Date Mon, 12 Sep 2016 22:42:10 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-420 9df6715ef -> 0b579cfea


GEODE-420: Renaming of SecurableComponents to SecurableCommunicationChannel
Renaming of HTTP_SERVICE -> WEB


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

Branch: refs/heads/feature/GEODE-420
Commit: 0b579cfea136aa1849fe39d22fce745b15bf44a6
Parents: 9df6715
Author: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Authored: Tue Sep 13 08:42:01 2016 +1000
Committer: Udo Kohlmeyer <ukohlmeyer@pivotal.io>
Committed: Tue Sep 13 08:42:01 2016 +1000

----------------------------------------------------------------------
 .../controllers/RestAPIsWithSSLDUnitTest.java   | 25 ++++++++++----------
 .../internal/AbstractDistributionConfig.java    | 21 ++++++++--------
 .../internal/DistributionConfig.java            |  2 +-
 .../internal/DistributionConfigImpl.java        | 22 ++++++++---------
 .../gemfire/internal/AbstractConfig.java        | 12 +++++-----
 .../internal/net/SSLConfigurationFactory.java   |  5 ++--
 .../gemfire/internal/net/SocketCreator.java     |  3 ++-
 .../internal/security/SecurableComponent.java   |  2 --
 .../CacheServerSSLConnectionDUnitTest.java      |  3 ++-
 .../gemfire/distributed/LocatorDUnitTest.java   | 12 +++++-----
 .../ConnectToLocatorSSLDUnitTest.java           |  3 ++-
 .../gemfire/management/JMXMBeanDUnitTest.java   |  3 ++-
 12 files changed, 58 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index e6abfa1..93efb7a 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -69,6 +69,7 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.ManagementException;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -481,7 +482,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
   }
@@ -495,7 +496,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     String restEndpoint = startInfraWithSSL(props, false);
@@ -511,7 +512,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_ALIAS, "httpservicekey");
     props.setProperty(INVALID_CLIENT_ALIAS, "someAlias");
@@ -526,7 +527,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE, findTrustedJKSWithSingleEntry().getCanonicalPath());
     props.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -541,7 +542,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);
@@ -556,7 +557,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLS");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLS", props);
@@ -571,7 +572,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.1");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.1", props);
@@ -586,7 +587,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -601,7 +602,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "SSL,TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "TLSv1.2", props);
@@ -617,7 +618,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -639,7 +640,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
     props.setProperty(SSL_KEYSTORE_TYPE, "JKS");
     props.setProperty(SSL_PROTOCOLS, "TLSv1.2");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     SSLContext ssl = SSLContext.getInstance("TLSv1.2");
 
@@ -664,7 +665,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     props.setProperty(SSL_PROTOCOLS, "SSL");
     props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
     props.setProperty(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "true");
-    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.HTTP_SERVICE.getConstant());
+    props.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant());
 
     String restEndpoint = startInfraWithSSL(props, false);
     validateConnection(restEndpoint, "SSL", props);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index ce77c5e..2a55a17 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -41,6 +41,7 @@ import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.internal.net.SocketCreator;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
 
@@ -462,27 +463,27 @@ public abstract class AbstractDistributionConfig extends AbstractConfig
implemen
    * This would mean one is mixing the "old" with the "new"
    */
   @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS)
-  protected SecurableComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SecurableComponent[]
value) {
-    for (SecurableComponent component : value) {
+  protected SecurableCommunicationChannel[] checkLegacySSLWhenSSLEnabledComponentsSet(SecurableCommunicationChannel[]
value) {
+    for (SecurableCommunicationChannel component : value) {
       switch (component) {
         case ALL:
         case CLUSTER:
         case SERVER:
         case GATEWAY:
         case JMX:
-        case HTTP_SERVICE:
+        case WEB:
         case LOCATOR:
           continue;
         default:
           throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1.toLocalizedString(new
Object[] {
             value, StringUtils.join(new String[] {
-            SecurableComponent.ALL.getConstant(),
-            SecurableComponent.CLUSTER.getConstant(),
-            SecurableComponent.SERVER.getConstant(),
-            SecurableComponent.GATEWAY.getConstant(),
-            SecurableComponent.JMX.getConstant(),
-            SecurableComponent.HTTP_SERVICE.getConstant(),
-            SecurableComponent.LOCATOR.getConstant()
+            SecurableCommunicationChannel.ALL.getConstant(),
+            SecurableCommunicationChannel.CLUSTER.getConstant(),
+            SecurableCommunicationChannel.SERVER.getConstant(),
+            SecurableCommunicationChannel.GATEWAY.getConstant(),
+            SecurableCommunicationChannel.JMX.getConstant(),
+            SecurableCommunicationChannel.WEB.getConstant(),
+            SecurableCommunicationChannel.LOCATOR.getConstant()
           }, ",")
           }));
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 2a14bf7..e90ac3e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -4382,7 +4382,7 @@ public interface DistributionConfig extends Config, LogConfig {
    * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property
    * @since Geode 1.0
    */
-  @ConfigAttribute(type = SecurableComponent[].class)
+  @ConfigAttribute(type = SecurableCommunicationChannel[].class)
   String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 35e8a9d..c5df689 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -960,27 +960,27 @@ public class DistributionConfigImpl extends AbstractDistributionConfig
implement
         throw new InternalGemFireException("error invoking getter for property" + ConfigurationProperties.SSL_ENABLED_COMPONENTS);
       }
     }
-    SecurableComponent[] sslEnabledComponents = (SecurableComponent[]) value;
-    for (SecurableComponent sslEnabledComponent : sslEnabledComponents) {
-      if (!isAliasCorrectlyConfiguredForComponents(sslEnabledComponent)) {
+    SecurableCommunicationChannel[] sslEnabledComponents = (SecurableCommunicationChannel[])
value;
+    for (SecurableCommunicationChannel securableCommunicationChannel : sslEnabledComponents)
{
+      if (!isAliasCorrectlyConfiguredForComponents(securableCommunicationChannel)) {
         throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_INVALID_ALIAS_OPTIONS.toLocalizedString());
       }
     }
 
   }
 
-  private boolean isAliasCorrectlyConfiguredForComponents(final SecurableComponent component)
{
+  private boolean isAliasCorrectlyConfiguredForComponents(final SecurableCommunicationChannel
component) {
     switch (component) {
       case ALL: {
         //If the default alias is not set, then check that all the other component aliases
are set
         if (StringUtils.isEmpty(getSSLDefaultAlias())) {
           boolean correctAlias = true;
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.CLUSTER);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.GATEWAY);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.HTTP_SERVICE);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.JMX);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.LOCATOR);
-          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableComponent.SERVER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.CLUSTER);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.GATEWAY);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.WEB);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.JMX);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.LOCATOR);
+          correctAlias &= isAliasCorrectlyConfiguredForComponents(SecurableCommunicationChannel.SERVER);
           return correctAlias;
         }
       }
@@ -990,7 +990,7 @@ public class DistributionConfigImpl extends AbstractDistributionConfig
implement
       case GATEWAY: {
         return StringUtils.isEmpty(getGatewaySSLAlias()) ? true : (getSecurableCommunicationChannels().length
> 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
-      case HTTP_SERVICE: {
+      case WEB: {
         return StringUtils.isEmpty(getHTTPServiceSSLAlias()) ? true : (getSecurableCommunicationChannels().length
> 1 ? !StringUtils.isEmpty(getSSLDefaultAlias()) : true);
       }
       case JMX: {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index 28b0cac..497c12d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -44,7 +44,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.FlowControlParams;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.net.SocketCreator;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 
 /**
  * Provides an implementation of the {@link Config} interface
@@ -410,8 +410,8 @@ public abstract class AbstractConfig implements Config {
           }));
         }
         attObjectValue = new FlowControlParams(credits, thresh, waittime);
-      } else if (valueType.isArray() && SecurableComponent.class.equals(valueType.getComponentType()))
{
-        attObjectValue = commaDelimitedStringToSecurableComponents(attValue);
+      } else if (valueType.isArray() && SecurableCommunicationChannel.class.equals(valueType.getComponentType()))
{
+        attObjectValue = commaDelimitedStringToSecurableCommunicationChannels(attValue);
       }else {
         throw new InternalGemFireException(LocalizedStrings.AbstractConfig_UNHANDLED_ATTRIBUTE_TYPE_0_FOR_1.toLocalizedString(new
Object[] {
           valueType, attName
@@ -436,13 +436,13 @@ public abstract class AbstractConfig implements Config {
     return strings;
   }
 
-  private SecurableComponent[] commaDelimitedStringToSecurableComponents(final String tokenizeString)
{
+  private SecurableCommunicationChannel[] commaDelimitedStringToSecurableCommunicationChannels(final
String tokenizeString) {
     StringTokenizer stringTokenizer = new StringTokenizer(tokenizeString, ",");
-    SecurableComponent[] returnArray = new SecurableComponent[stringTokenizer.countTokens()];
+    SecurableCommunicationChannel[] returnArray = new SecurableCommunicationChannel[stringTokenizer.countTokens()];
     for (int i = 0; i < returnArray.length; i++) {
       String name = stringTokenizer.nextToken();
       try {
-        returnArray[i] = SecurableComponent.getEnum(name);
+        returnArray[i] = SecurableCommunicationChannel.getEnum(name);
       } catch (Exception e) {
         throw new IllegalArgumentException(e);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
index 03b1a47..2b1a22e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SSLConfigurationFactory.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.GemFireConfigException;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.admin.SSLConfig;
 import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
 
 public class SSLConfigurationFactory {
 
@@ -163,10 +162,10 @@ public class SSLConfigurationFactory {
   }
 
   private boolean determineIfSSLEnabledForSSLComponent(final SecurableCommunicationChannel
sslEnabledComponent) {
-    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(),
SecurableComponent.NONE)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(),
SecurableCommunicationChannel.NONE)) {
       return false;
     }
-    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(),
SecurableComponent.ALL)) {
+    if (ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(),
SecurableCommunicationChannel.ALL)) {
       return true;
     }
     return ArrayUtils.contains(getDistributionConfig().getSecurableCommunicationChannels(),
sslEnabledComponent) ? true : false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
index 5136f19..9d118b8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/net/SocketCreator.java
@@ -96,6 +96,7 @@ import com.gemstone.gemfire.internal.cache.wan.TransportFilterSocketFactory;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.internal.util.PasswordUtil;
 
@@ -331,7 +332,7 @@ public class SocketCreator {
   private void initialize() {
     try {
       // set p2p values...
-      if (SecurableComponent.CLUSTER.equals(sslConfig.getSecuredCommunicationChannel()))
{
+      if (SecurableCommunicationChannel.CLUSTER.equals(sslConfig.getSecuredCommunicationChannel()))
{
         if (this.sslConfig.isEnabled()) {
           System.setProperty("p2p.useSSL", "true");
           System.setProperty("p2p.oldIO", "true");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
index 439cde5..b572a23 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/SecurableComponent.java
@@ -16,8 +16,6 @@
  */
 package com.gemstone.gemfire.internal.security;
 
-import org.springframework.util.StringUtils;
-
 import com.gemstone.gemfire.GemFireConfigException;
 import org.apache.geode.security.SecurableComponents;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 5884c1f..d97249b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.internal.net.SocketCreatorFactory;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.security.AuthenticationRequiredException;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -111,7 +112,7 @@ public class CacheServerSSLConnectionDUnitTest extends JUnit4DistributedTestCase
     String cacheServerSslciphers = "any";
     boolean cacheServerSslRequireAuth = true;
     if (!legacy) {
-      gemFireProps.put(SSL_ENABLED_COMPONENTS, SecurableComponent.CLUSTER + "," + SecurableComponent.SERVER);
+      gemFireProps.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.CLUSTER + ","
+ SecurableCommunicationChannel.SERVER);
       gemFireProps.put(SSL_PROTOCOLS, cacheServerSslprotocols);
       gemFireProps.put(SSL_CIPHERS, cacheServerSslciphers);
       gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index a373e82..2cee5bf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -55,7 +55,7 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.security.SecurableComponent;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.tcp.Connection;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -371,7 +371,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_KEYSTORE_TYPE, "JKS");
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc2.invoke("startLocator2", () -> startLocatorWithPortAndProperties(port2, properties));
@@ -420,7 +420,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getMultiKeyTruststore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_LOCATOR_ALIAS, "locatorkey");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
 
     try {
@@ -471,7 +471,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));
@@ -537,7 +537,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
       properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
       properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-      properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+      properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
       loc2.invoke("start Locator2", () -> startLocator(port2, properties));
     } finally {
@@ -588,7 +588,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     properties.put(SSL_TRUSTSTORE, getSingleKeyKeystore());
     properties.put(SSL_TRUSTSTORE_PASSWORD, "password");
     properties.put(SSL_REQUIRE_AUTHENTICATION, "true");
-    properties.put(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    properties.put(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
 
     try {
       loc1.invoke("start Locator1", () -> startLocator(port1, properties));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
index 048e304..5a83b13 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ConnectToLocatorSSLDUnitTest.java
@@ -36,6 +36,7 @@ import org.junit.rules.TemporaryFolder;
 
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.CliUtil;
@@ -75,7 +76,7 @@ public class ConnectToLocatorSSLDUnitTest extends JUnit4DistributedTestCase
{
   @Test
   public void testConnectToLocatorWithSSL() throws Exception{
     Properties securityProps = new Properties();
-    securityProps.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.LOCATOR.getConstant());
+    securityProps.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.LOCATOR.getConstant());
     securityProps.setProperty(SSL_KEYSTORE, jks.getCanonicalPath());
     securityProps.setProperty(SSL_KEYSTORE_PASSWORD, "password");
     securityProps.setProperty(SSL_KEYSTORE_TYPE, "JKS");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0b579cfe/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
index 3c1f944..a84e6cb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/JMXMBeanDUnitTest.java
@@ -40,6 +40,7 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.security.SecurableCommunicationChannel;
 import com.gemstone.gemfire.internal.security.SecurableComponent;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -237,7 +238,7 @@ public class JMXMBeanDUnitTest extends DistributedTestCase {
         properties.setProperty(SSL_TRUSTSTORE_PASSWORD, "password");
         properties.setProperty(SSL_KEYSTORE, getSimpleSingleKeyKeystore());
         properties.setProperty(SSL_TRUSTSTORE, getSimpleSingleKeyKeystore());
-        properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableComponent.JMX.getConstant());
+        properties.setProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.JMX.getConstant());
 
         if (useMultiKey) {
           properties.setProperty(SSL_KEYSTORE, getMultiKeyKeystore());


Mime
View raw message