You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by hi...@apache.org on 2016/06/08 16:28:57 UTC

incubator-geode git commit: GEODE-1372 Added security-udp-dhalgo property.

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1372 ba4361859 -> 49e86cd6e


GEODE-1372 Added security-udp-dhalgo property.

Added this property in test and code. Fixed issue with InternalDistributedMember
where it was using viewId for equal method.


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

Branch: refs/heads/feature/GEODE-1372
Commit: 49e86cd6e6874a8e33aabe7df590bc0687c3f11e
Parents: ba43618
Author: Hitesh Khamesra <hi...@yahoo.com>
Authored: Wed Jun 8 09:26:14 2016 -0700
Committer: Hitesh Khamesra <hi...@yahoo.com>
Committed: Wed Jun 8 09:26:14 2016 -0700

----------------------------------------------------------------------
 .../DistributedSystemConfigProperties.java      |  5 +++
 .../internal/AbstractDistributionConfig.java    |  4 +++
 .../internal/DistributionConfig.java            | 32 ++++++++++++++++-
 .../internal/DistributionConfigImpl.java        | 14 +++++++-
 .../membership/InternalDistributedMember.java   | 20 +++++++----
 .../membership/gms/membership/GMSJoinLeave.java | 20 +++++------
 .../membership/gms/messenger/GMSEncrypt.java    | 36 +++++++++++++++++---
 .../gms/messenger/JGroupsMessenger.java         | 12 +++++--
 .../gemfire/internal/i18n/LocalizedStrings.java |  3 +-
 .../DistributedMulticastRegionDUnitTest.java    |  4 +--
 .../ReconnectWithUDPSecurityDUnitTest.java      |  4 +--
 .../LocatorUDPSecurityDUnitTest.java            |  3 +-
 .../membership/MembershipJUnitTest.java         |  5 +--
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  2 +-
 .../gms/messenger/GMSEncryptJUnitTest.java      |  3 +-
 15 files changed, 131 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystemConfigProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystemConfigProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystemConfigProperties.java
index d80a3e8..0907644 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystemConfigProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystemConfigProperties.java
@@ -541,6 +541,11 @@ public interface DistributedSystemConfigProperties {
    */
   String SECURITY_CLIENT_DHALGO = SECURITY_PREFIX + "client-dhalgo";
   /**
+   * The static definition of the <a href="DistributedSystem.html#security-udp-dhalgo">"security-udp-dhalgo"</a>
+   * property
+   */
+  String SECURITY_UDP_DHALGO = SECURITY_PREFIX + "udp-dhalgo";
+  /**
    * The static definition of the <a href="DistributedSystem.html#security-log-file">"security-log-file"</a>
    * property
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/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 f529196..714ccbc 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
@@ -934,6 +934,10 @@ public abstract class AbstractDistributionConfig
     m.put(SECURITY_CLIENT_DHALGO,
       LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0
         .toLocalizedString(DEFAULT_SECURITY_CLIENT_DHALGO));
+    
+    m.put(SECURITY_UDP_DHALGO,
+        LocalizedStrings.AbstractDistributionConfig_SECURITY_UDP_DHALGO_NAME_0
+          .toLocalizedString(DEFAULT_SECURITY_UDP_DHALGO));
 
     m.put(SECURITY_PEER_AUTH_INIT,
       LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTH_INIT_NAME_0

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/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 fee905c..050b5d2 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
@@ -2184,7 +2184,7 @@ public interface DistributionConfig extends Config, LogConfig, DistributedSystem
    */
   @ConfigAttributeGetter(name = SECURITY_CLIENT_DHALGO)
   String getSecurityClientDHAlgo();
-
+  
   /**
    * Set the name of algorithm to use for Diffie-Hellman key exchange <a
    * href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
@@ -2192,6 +2192,21 @@ public interface DistributionConfig extends Config, LogConfig, DistributedSystem
    */
   @ConfigAttributeSetter(name = SECURITY_CLIENT_DHALGO)
   void setSecurityClientDHAlgo(String attValue);
+  
+  /**
+   * Returns name of algorithm to use for Diffie-Hellman key exchange <a
+   * href="../DistributedSystem.html#security-udp-dhalgo">"security-udp-dhalgo"</a>
+   */
+  @ConfigAttributeGetter(name = SECURITY_UDP_DHALGO)
+  String getSecurityUDPDHAlgo();
+
+  /**
+   * Set the name of algorithm to use for Diffie-Hellman key exchange <a
+   * href="../DistributedSystem.html#security-udp-dhalgo">"security-udp-dhalgo"</a>
+   * property.
+   */
+  @ConfigAttributeSetter(name = SECURITY_UDP_DHALGO)
+  void setSecurityUDPDHAlgo(String attValue);
 
   /**
    * The name of the Diffie-Hellman symmetric algorithm "security-client-dhalgo"
@@ -2199,6 +2214,13 @@ public interface DistributionConfig extends Config, LogConfig, DistributedSystem
    */
   @ConfigAttribute(type = String.class)
   String SECURITY_CLIENT_DHALGO_NAME = SECURITY_CLIENT_DHALGO;
+  
+  /**
+   * The name of the Diffie-Hellman symmetric algorithm "security-client-dhalgo"
+   * property.
+   */
+  @ConfigAttribute(type = String.class)
+  String SECURITY_UDP_DHALGO_NAME = SECURITY_UDP_DHALGO;
 
   /**
    * The default Diffie-Hellman symmetric algorithm name.
@@ -2207,6 +2229,14 @@ public interface DistributionConfig extends Config, LogConfig, DistributedSystem
    * JDK like "DES", "DESede", "AES", "Blowfish".
    */
   String DEFAULT_SECURITY_CLIENT_DHALGO = "";
+  
+  /**
+   * The default Diffie-Hellman symmetric algorithm name.
+   * <p>
+   * Actual value of this is one of the available symmetric algorithm names in
+   * JDK like "DES", "DESede", "AES", "Blowfish".
+   */
+  String DEFAULT_SECURITY_UDP_DHALGO = "";
 
   /**
    * Returns user defined method name for peer authentication initializer in <a

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/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 3288e98..b470fea 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
@@ -206,6 +206,9 @@ public class DistributionConfigImpl
 
   /** The client Diffie-Hellman method name*/
   private String securityClientDHAlgo = DEFAULT_SECURITY_CLIENT_DHALGO;
+  
+  /** The udp Diffie-Hellman method name*/
+  private String securityUDPDHAlgo = DEFAULT_SECURITY_UDP_DHALGO;
 
   /** The peer authentication initialization method name*/
   private String securityPeerAuthInit = DEFAULT_SECURITY_PEER_AUTH_INIT;
@@ -466,6 +469,7 @@ public class DistributionConfigImpl
     this.securityClientAuthInit = other.getSecurityClientAuthInit();
     this.securityClientAuthenticator = other.getSecurityClientAuthenticator();
     this.securityClientDHAlgo = other.getSecurityClientDHAlgo();
+    this.securityUDPDHAlgo = other.getSecurityUDPDHAlgo();
     this.securityPeerAuthInit = other.getSecurityPeerAuthInit();
     this.securityPeerAuthenticator = other.getSecurityPeerAuthenticator();
     this.securityClientAccessor = other.getSecurityClientAccessor();
@@ -1926,10 +1930,18 @@ public class DistributionConfigImpl
   public String getSecurityClientDHAlgo() {
     return securityClientDHAlgo;
   }
-
+  
   public void setSecurityClientDHAlgo(String value) {
     securityClientDHAlgo = (String)checkAttribute(SECURITY_CLIENT_DHALGO, value);
   }
+  
+  public String getSecurityUDPDHAlgo() {
+    return securityUDPDHAlgo;
+  }
+
+  public void setSecurityUDPDHAlgo(String value) {
+    securityUDPDHAlgo = (String)checkAttribute(SECURITY_UDP_DHALGO, value);
+  }
 
   public String getSecurityPeerAuthInit() {
     return securityPeerAuthInit;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
index 2d8b8e1..067b71b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
@@ -581,6 +581,10 @@ public class InternalDistributedMember
   }
   
   public int compareTo(DistributedMember o, boolean checkNetMembersIfEqual) {
+    return compareTo(o, checkNetMembersIfEqual, true);
+  }
+  
+  public int compareTo(DistributedMember o, boolean checkNetMembersIfEqual, boolean verifyViewId) {
     if (this == o) {
       return 0;
     }
@@ -647,13 +651,15 @@ public class InternalDistributedMember
     }
 
     if (this.uniqueTag == null && other.uniqueTag == null) {
-      // not loners, so look at P2P view ID
-      if (this.vmViewId >= 0 && other.vmViewId >= 0) {
-        if (this.vmViewId < other.vmViewId) {
-          return -1;
-        } else if (this.vmViewId > other.vmViewId) {
-          return 1;
-        } // else they're the same, so continue
+      if (verifyViewId) {
+        // not loners, so look at P2P view ID
+        if (this.vmViewId >= 0 && other.vmViewId >= 0) {
+          if (this.vmViewId < other.vmViewId) {
+            return -1;
+          } else if (this.vmViewId > other.vmViewId) {
+            return 1;
+          } // else they're the same, so continue
+        }
       }
     } else if (this.uniqueTag == null) {
       return -1;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 86a4bb4..11a976e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -877,17 +877,15 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
 
   private void addPublickeysToView(NetView view) {
     //TODO: is this check is correct
-    if (services != null && services.getConfig() != null && services.getConfig().getDistributionConfig() != null) {
-      String sDHAlgo = services.getConfig().getDistributionConfig().getSecurityClientDHAlgo();
-      if (sDHAlgo != null && !sDHAlgo.isEmpty()) {
-        List<InternalDistributedMember> mbrs = view.getMembers();
-        Iterator<InternalDistributedMember> itr = mbrs.iterator();
+    String sDHAlgo = services.getConfig().getDistributionConfig().getSecurityUDPDHAlgo();
+    if (sDHAlgo != null && !sDHAlgo.isEmpty()) {
+      List<InternalDistributedMember> mbrs = view.getMembers();
+      Iterator<InternalDistributedMember> itr = mbrs.iterator();
 
-        while (itr.hasNext()) {
-          InternalDistributedMember mbr = itr.next();
-          byte[] pk = services.getMessenger().getPublickey(mbr);
-          view.setPublicKey(mbr, pk);
-        }
+      while (itr.hasNext()) {
+        InternalDistributedMember mbr = itr.next();
+        byte[] pk = services.getMessenger().getPublickey(mbr);
+        view.setPublicKey(mbr, pk);
       }
     }
   }
@@ -1124,7 +1122,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         state.responses.clear();
       }
       
-      if (!services.getConfig().getDistributionConfig().getSecurityClientDHAlgo().isEmpty()) {
+      if (!services.getConfig().getDistributionConfig().getSecurityUDPDHAlgo().isEmpty()) {
         for (InternalDistributedMember mbr : v.getMembers()) {
           Set<InternalDistributedMember> r = new HashSet<>();
           r.add(mbr);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
index 5fcf8d7..a7583c9 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
@@ -68,7 +68,7 @@ public class GMSEncrypt implements Cloneable {
   private ConcurrentHashMap<InternalDistributedMember, PeerEncryptor>[] copyOfPeerEncryptors;
   private ClusterEncryptor[] clusterEncryptors;
   
-  private Map<InternalDistributedMember, byte[]> memberToPeerEncryptor = new ConcurrentHashMap<>();
+  private Map<GMSEncrypt.InternalDistrubtedMemberWrapper, byte[]> memberToPeerEncryptor = new ConcurrentHashMap<>();
 
   private ClusterEncryptor clusterEncryptor;
 
@@ -159,7 +159,7 @@ public class GMSEncrypt implements Cloneable {
   protected void setPublicKey(byte[] publickey, InternalDistributedMember mbr) {
     try {
       //createPeerEncryptor(mbr, publickey);
-      memberToPeerEncryptor.put(mbr, publickey);
+      memberToPeerEncryptor.put(new InternalDistrubtedMemberWrapper(mbr), publickey);
       synchronized (copyOfPeerEncryptors) {
         //remove all the existing keys..
         for(Map m : copyOfPeerEncryptors) {
@@ -202,7 +202,7 @@ public class GMSEncrypt implements Cloneable {
    */
   private void initDHKeys(DistributionConfig config) throws Exception {
 
-    dhSKAlgo = config.getSecurityClientDHAlgo();
+    dhSKAlgo = config.getSecurityUDPDHAlgo();
     // Initialize the keys when either the host is a peer that has
     // non-blank setting for DH symmetric algo, or this is a server
     // that has authenticator defined.
@@ -218,6 +218,34 @@ public class GMSEncrypt implements Cloneable {
     }
   }
 
+  static class InternalDistrubtedMemberWrapper {
+    InternalDistributedMember mbr;
+    
+    public InternalDistrubtedMemberWrapper(InternalDistributedMember m) {
+      this.mbr = m;
+    }
+
+    public InternalDistributedMember getMbr() {
+      return mbr;
+    }
+
+    @Override
+    public int hashCode() {
+      return mbr.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+      InternalDistributedMember other = ((InternalDistrubtedMemberWrapper)obj).mbr;
+      return mbr.compareTo(other, false, false) == 0;
+    }
+
+    @Override
+    public String toString() {
+      return "InternalDistrubtedMemberWrapper [mbr=" + mbr + "]";
+    }        
+  }
+  
   protected PeerEncryptor getPeerEncryptor(InternalDistributedMember member) throws Exception {
     Map<InternalDistributedMember, PeerEncryptor> m = getPeerEncryptorMap();
 
@@ -226,7 +254,7 @@ public class GMSEncrypt implements Cloneable {
       synchronized (this) {
         result = m.get(member);
         if (result == null) {
-          byte[] pk = (byte[])memberToPeerEncryptor.get(member);
+          byte[] pk = (byte[])memberToPeerEncryptor.get(new InternalDistrubtedMemberWrapper(member));
           result = createPeerEncryptor(member, pk != null ? pk : (byte[]) view.getPublicKey(member));
           m.put(member, result);
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index f60a0af..a16bd11 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -228,7 +228,7 @@ public class JGroupsMessenger implements Messenger {
 
     this.jgStackConfig = properties;
 
-    if ( !dc.getSecurityClientDHAlgo().isEmpty() ) {
+    if ( !dc.getSecurityUDPDHAlgo().isEmpty() ) {
       try {
         this.encrypt = new GMSEncrypt(services);
         logger.info("Initializing GMSEncrypt ");
@@ -1055,7 +1055,15 @@ public class JGroupsMessenger implements Messenger {
         setSender(result, m, ordinal);
 
         if (pk != null) {
-          encryptLocal.setPublicKey(pk, result.getSender());
+          
+          /*InternalDistributedMember mbr = null;
+          if (result instanceof JoinRequestMessage) {
+            mbr = ((JoinRequestMessage)result).getMemberID();
+          } else {
+            mbr = ((FindCoordinatorRequest)result).getMemberID();
+          }*/
+          logger.info("Setting public key for " + result.getSender() +  " len " + pk.length);
+          setPublicKey(pk, result.getSender());
         }
 
         return result;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index a09952e..9b00bd3 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -2400,7 +2400,7 @@ public class LocalizedStrings {
   public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_MEMCACHED_SERVER_ON_PORT_0_FOR_1_PROTOCOL = new StringId(3868, "Starting GemFireMemcachedServer on port {0} for {1} protocol");
   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_SETTRANSACTIONTIMEOUT_TRANSACTION_HAS_EITHER_EXPIRED_OR_ROLLEDBACK_OR_COMITTED = new StringId(3869, "Transaction has either expired or rolledback or comitted");
   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_RESUME_CANNOT_RESUME_A_NULL_TRANSACTION = new StringId(3870, "cannot resume a null transaction");
-  public static final StringId AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0 = new StringId(3871, "User defined name for the symmetric encryption algorithm to use in Diffie-Hellman key exchange for encryption of credentials.  Defaults to \"{0}\". Legal values can be any of the available symmetric algorithm names in JDK like \"DES\", \"DESede\", \"AES\", \"Blowfish\". It may be required to install Unlimited Strength Jurisdiction Policy Files from Sun for some symmetric algorithms to work (like \"AES\")");
+  public static final StringId AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0 = new StringId(3871, "User defined name for the symmetric encryption algorithm to use in Diffie-Hellman key exchange for encryption of credentials.  Defaults to \"{0}\". Legal values can be any of the available symmetric algorithm names in JDK like \"DES\", \"DESede\", \"AES\", \"Blowfish\". It may be required to install Unlimited Strength Jurisdiction Policy Files from Sun for some symmetric algorithms to work (like \"AES\")");  
   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_RESUME_ERROR_IN_LISTING_THREAD_TO_TRANSACTION_MAP_DUE_TO_0 = new StringId(3872, "Error in listing thread to transaction map due to {0}");
   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_GETGLOBALTRANSACTION_NO_TRANSACTION_EXISTS = new StringId(3873, "no transaction exists");
   public static final StringId UserTransactionImpl_USERTRANSACTIONIMPL_SETTRANSACTIONTIMEOUT_CANNOT_SET_A_NEGATIVE_TIME_OUT_FOR_TRANSACTIONS = new StringId(3874, "Cannot set a negative Time Out for transactions");
@@ -2495,6 +2495,7 @@ public class LocalizedStrings {
   public static final StringId PasswordUtil_ENCRYPTED_TO_0 = new StringId(3981, "Encrypted to {0}");
   public static final StringId DistributionManager_SHUTDOWN_MESSAGE_THREAD_FOR_0 = new StringId(3982, "Shutdown Message Thread for {0}");
   public static final StringId HealthMonitorImpl_HEALTH_MONITOR_OWNED_BY_0 = new StringId(3983, "Health Monitor owned by {0}");
+  public static final StringId AbstractDistributionConfig_SECURITY_UDP_DHALGO_NAME_0 = new StringId(3984, "User defined name for the symmetric encryption algorithm to use in Diffie-Hellman key exchange for encryption of udp messages.  Defaults to \"{0}\". Legal values can be any of the available symmetric algorithm names in JDK like \"DES\", \"DESede\", \"AES\", \"Blowfish\". It may be required to install Unlimited Strength Jurisdiction Policy Files from Sun for some symmetric algorithms to work (like \"AES\")");
   // ok to reuse 3984
   public static final StringId InternalDistributedSystem_COULD_NOT_RENAME_0_TO_1 = new StringId(3985, "Could not rename \"{0}\" to \"{1}\".");
   public static final StringId InternalDistributedSystem_RENAMED_OLD_LOG_FILE_TO_0 = new StringId(3986, "Renamed old log file to \"{0}\".");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 5121290..6b656c3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@ -241,7 +241,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
     p.put(MCAST_TTL, mcastttl);
     p.put(LOCATORS, "localhost[" + locatorPort + "]");
     p.put(LOG_LEVEL, "info");
-    p.put(SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+    p.put(SECURITY_UDP_DHALGO, "AES:128");
     return p;
   } 
   
@@ -274,7 +274,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
         locatorProps.setProperty(MCAST_PORT, mcastport);
         locatorProps.setProperty(MCAST_TTL, mcastttl);
         locatorProps.setProperty(LOG_LEVEL, "info");
-        locatorProps.setProperty(SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+        locatorProps.setProperty(SECURITY_UDP_DHALGO, "AES:128");
         //locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
         try {
           final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, null, null,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
index d61abe6..f7ff7f7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
@@ -3,7 +3,7 @@ package com.gemstone.gemfire.cache30;
 import java.util.Properties;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 public class ReconnectWithUDPSecurityDUnitTest extends ReconnectDUnitTest{
 
   public ReconnectWithUDPSecurityDUnitTest(String name) {
@@ -12,6 +12,6 @@ public class ReconnectWithUDPSecurityDUnitTest extends ReconnectDUnitTest{
   
   @Override
   protected void addDSProps(Properties p) {
-    p.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+    p.setProperty(SECURITY_UDP_DHALGO, "AES:128");
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorUDPSecurityDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorUDPSecurityDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorUDPSecurityDUnitTest.java
index f9614b6..98beb11 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorUDPSecurityDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorUDPSecurityDUnitTest.java
@@ -5,6 +5,7 @@ import java.util.Properties;
 import org.junit.Test;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 
 public class LocatorUDPSecurityDUnitTest extends LocatorDUnitTest{
 
@@ -23,6 +24,6 @@ public class LocatorUDPSecurityDUnitTest extends LocatorDUnitTest{
   
   @Override
   protected void addDSProps(Properties p) {
-    p.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+    p.setProperty(SECURITY_UDP_DHALGO, "AES:128");
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index 58ccb23..ecda596 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.distributed.internal.membership;
 
 import com.gemstone.gemfire.GemFireConfigException;
+import com.gemstone.gemfire.distributed.DistributedSystemConfigProperties;
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.internal.*;
 import com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil;
@@ -30,6 +31,7 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
 import org.apache.logging.log4j.Level;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -240,7 +242,7 @@ public class MembershipJUnitTest {
       nonDefault.put(DistributionConfig.GROUPS_NAME, "red, blue");
       nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
       nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
-      nonDefault.put(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+      nonDefault.put(DistributedSystemConfigProperties.SECURITY_CLIENT_DHALGO, "AES:128");
       DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
       RemoteTransportConfig transport = new RemoteTransportConfig(config,
         DistributionManager.NORMAL_DM_TYPE);
@@ -321,7 +323,6 @@ public class MembershipJUnitTest {
 
       assertTrue(m1.getView().size() == 1);
 
-      System.out.println("encodings performed: " + GMSEncrypt.encodingsPerformed + "; decodings performed: " + GMSEncrypt.decodingsPerformed);
     }
     finally {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 5d1150c..580b7e7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -87,7 +87,7 @@ public class GMSJoinLeaveJUnitTest {
     mockDistConfig = mock(DistributionConfig.class);
     when(mockDistConfig.getEnableNetworkPartitionDetection()).thenReturn(enableNetworkPartition);
     when(mockDistConfig.getLocators()).thenReturn("localhost[8888]");
-    when(mockDistConfig.getSecurityClientDHAlgo()).thenReturn("");
+    when(mockDistConfig.getSecurityUDPDHAlgo()).thenReturn("");
     mockConfig = mock(ServiceConfig.class);
     when(mockDistConfig.getStartLocator()).thenReturn("localhost[12345]");
     when(mockConfig.getDistributionConfig()).thenReturn(mockDistConfig);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49e86cd6/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
index 9cd6da6..20011c5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
@@ -1,6 +1,7 @@
 package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
 import static org.mockito.Mockito.*;
 
+import com.gemstone.gemfire.distributed.DistributedSystemConfigProperties;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
@@ -52,7 +53,7 @@ public class GMSEncryptJUnitTest {
   
   private void initMocks(String algo) throws Exception {
     Properties nonDefault = new Properties();
-    nonDefault.put(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, algo);
+    nonDefault.put(DistributedSystemConfigProperties.SECURITY_UDP_DHALGO, algo);
     DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
     RemoteTransportConfig tconfig = new RemoteTransportConfig(config,
       DistributionManager.NORMAL_DM_TYPE);