geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [2/2] incubator-geode git commit: GEODE-17: Refactor admin rest commands test not to test authorization.
Date Mon, 18 Apr 2016 05:56:39 GMT
GEODE-17: Refactor admin rest commands test not to test authorization.

* added GfshCommandTests to test authorization.


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

Branch: refs/heads/feature/GEODE-17-2
Commit: 4a327216d5f3be8dc517512ec3b5e39ab6de36ec
Parents: 151472c
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Sun Apr 17 22:56:16 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Sun Apr 17 22:56:16 2016 -0700

----------------------------------------------------------------------
 .../management/internal/ManagementAgent.java    |  51 ++--
 .../internal/security/CLIOperationContext.java  |  10 +-
 .../internal/security/MBeanServerWrapper.java   |  12 +-
 .../controllers/AbstractCommandsController.java |  55 +++--
 .../cli/commands/CliCommandTestBase.java        |  11 +-
 .../cli/commands/ConfigCommandsDUnitTest.java   |  24 +-
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  28 +--
 .../cli/commands/DeployCommandsDUnitTest.java   |   4 +-
 .../commands/DiskStoreCommandsDUnitTest.java    |  21 +-
 .../cli/commands/FunctionCommandsDUnitTest.java |  14 +-
 .../commands/GemfireDataCommandsDUnitTest.java  |  38 +--
 ...WithCacheLoaderDuringCacheMissDUnitTest.java |  22 +-
 .../cli/commands/IndexCommandsDUnitTest.java    |   4 +-
 ...stAndDescribeDiskStoreCommandsDUnitTest.java |  18 +-
 .../ListAndDescribeRegionDUnitTest.java         |  12 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |  35 ++-
 .../MiscellaneousCommandsDUnitTest.java         |  18 +-
 ...laneousCommandsExportLogsPart1DUnitTest.java |  16 +-
 ...laneousCommandsExportLogsPart2DUnitTest.java |  16 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |  17 +-
 ...laneousCommandsExportLogsPart4DUnitTest.java |  16 +-
 .../cli/commands/QueueCommandsDUnitTest.java    |  19 +-
 .../SharedConfigurationCommandsDUnitTest.java   |  19 +-
 .../cli/commands/ShellCommandsDUnitTest.java    |  13 +-
 .../cli/commands/ShowMetricsDUnitTest.java      |  18 +-
 .../cli/commands/ShowStackTraceDUnitTest.java   |  15 +-
 .../cli/commands/UserCommandsDUnitTest.java     |  14 +-
 .../security/AllCliCommandsSecurityTest.java    | 236 -------------------
 .../security/CliCommandsSecurityTest.java       |  89 +++++++
 .../security/GfshCommandsSecurityTest.java      |  47 +++-
 .../security/GfshShellConnectionRule.java       |  31 ++-
 .../security/MemberMBeanSecurityJUnitTest.java  |   4 +-
 .../internal/security/TestCommand.java          | 192 +++++++++++++++
 .../internal/security/cacheServer.json          |  44 +++-
 34 files changed, 547 insertions(+), 636 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index 64229db..5dd2f80 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -16,6 +16,28 @@
  */
 package com.gemstone.gemfire.management.internal;
 
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.rmi.AlreadyBoundException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.HashMap;
+import javax.management.MBeanServer;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXServiceURL;
+import javax.management.remote.rmi.RMIConnectorServer;
+import javax.management.remote.rmi.RMIJRMPServerImpl;
+import javax.management.remote.rmi.RMIServerImpl;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -36,28 +58,6 @@ import org.apache.logging.log4j.Logger;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
 
-import javax.management.MBeanServer;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.rmi.RMIConnectorServer;
-import javax.management.remote.rmi.RMIJRMPServerImpl;
-import javax.management.remote.rmi.RMIServerImpl;
-import javax.rmi.ssl.SslRMIClientSocketFactory;
-import java.io.IOException;
-import java.io.Serializable;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.rmi.AlreadyBoundException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RMIServerSocketFactory;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.HashMap;
-
 /**
  * Agent implementation that controls the JMX server end points for JMX clients
  * to connect, such as an RMI server.
@@ -83,6 +83,7 @@ public class ManagementAgent {
   private final DistributionConfig config;
   private boolean isHttpServiceRunning = false;
   private ManagementInterceptor managementInterceptor = null;
+  private MBeanServerWrapper mBeanServerWrapper = null;
 
   /**
    * This system property is set to true when the embedded HTTP server is
@@ -103,6 +104,10 @@ public class ManagementAgent {
     return managementInterceptor;
   }
 
+  public MBeanServerWrapper getMBeanServerWrapper() {
+    return mBeanServerWrapper;
+  }
+
   public synchronized boolean isHttpServiceRunning() {
     return isHttpServiceRunning;
   }
@@ -473,7 +478,7 @@ public class ManagementAgent {
       if(managementInterceptor==null){
         managementInterceptor = new ManagementInterceptor(cache.getDistributedSystem().getProperties());
       }
-      MBeanServerWrapper mBeanServerWrapper = new MBeanServerWrapper(managementInterceptor);
+      mBeanServerWrapper = new MBeanServerWrapper(managementInterceptor);
       cs.setMBeanServerForwarder(mBeanServerWrapper);
       logger.info("Starting RMI Connector with Security Interceptor");
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java
index d80bc05..ad6be59 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java
@@ -16,6 +16,11 @@
  */
 package com.gemstone.gemfire.management.internal.security;
 
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
 import com.gemstone.gemfire.management.cli.CommandProcessingException;
 import com.gemstone.gemfire.management.internal.cli.CommandManager;
 import com.gemstone.gemfire.management.internal.cli.GfshParseResult;
@@ -23,11 +28,6 @@ import com.gemstone.gemfire.management.internal.cli.GfshParser;
 import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
 import org.springframework.shell.event.ParseResult;
 
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * It represents command being executed and all passed options and option-values.
  * ResourceOpCode returned by CLIOperationContext is retrieved from ResourceOperation

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
index b83f0a2..e1c84a5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
@@ -16,9 +16,8 @@
  */
 package com.gemstone.gemfire.management.internal.security;
 
-import com.gemstone.gemfire.management.internal.ManagementConstants;
-import com.gemstone.gemfire.security.GemFireSecurityException;
-
+import java.io.ObjectInputStream;
+import java.util.Set;
 import javax.management.Attribute;
 import javax.management.AttributeList;
 import javax.management.AttributeNotFoundException;
@@ -44,8 +43,9 @@ import javax.management.QueryExp;
 import javax.management.ReflectionException;
 import javax.management.loading.ClassLoaderRepository;
 import javax.management.remote.MBeanServerForwarder;
-import java.io.ObjectInputStream;
-import java.util.Set;
+
+import com.gemstone.gemfire.management.internal.ManagementConstants;
+import com.gemstone.gemfire.security.GemFireSecurityException;
 
 /**
  * This class intercepts all MBean requests for GemFire MBeans and passed it to
@@ -219,7 +219,7 @@ public class MBeanServerWrapper implements MBeanServerForwarder {
   public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
       throws InstanceNotFoundException, MBeanException, ReflectionException {
     ResourceOperationContext ctx = null;
-    if("processCommand".equals(operationName) && params.length==1){
+    if("processCommand".equals(operationName) && params.length>=1){
       ctx = CLIOperationContext.getOperationContext((String)params[0]);
     }
     else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
index d641956..806e926 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
@@ -17,16 +17,37 @@
 
 package com.gemstone.gemfire.management.internal.web.controllers;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.management.ManagementFactory;
+import java.net.URI;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import javax.management.JMX;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.util.ArrayUtils;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
+import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.ManagementConstants;
+import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
+import com.gemstone.gemfire.management.internal.security.MBeanServerWrapper;
 import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
 import com.gemstone.gemfire.management.internal.web.controllers.support.MemberMXBeanAdapter;
 import com.gemstone.gemfire.management.internal.web.util.UriUtils;
@@ -42,23 +63,6 @@ import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.context.request.WebRequest;
 import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
 
-import javax.management.JMX;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.net.URI;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
 /**
  * The AbstractCommandsController class is the abstract base class encapsulating common functionality across all
  * Management Controller classes that expose REST API web service endpoints (URLs/URIs) for GemFire shell (Gfsh)
@@ -427,15 +431,20 @@ public abstract class AbstractCommandsController {
    */
   protected synchronized MemberMXBean getManagingMemberMXBean() {
     if (managingMemberMXBeanProxy == null) {
-      final MBeanServer platformMBeanServer = getMBeanServer();
+      SystemManagementService service = (SystemManagementService) ManagementService
+          .getExistingManagementService(GemFireCacheImpl.getInstance());
+      MBeanServer mbs = getMBeanServer();
+      MBeanServerWrapper wrapper = service.getManagementAgent().getMBeanServerWrapper();
+      MBeanServer wrappedMbs = mbs;
+      if(wrapper!=null) {
+        wrapper.setMBeanServer(mbs);
+        wrappedMbs = wrapper;
+      }
 
-      final DistributedSystemMXBean distributedSystemMXBean = JMX.newMXBeanProxy(platformMBeanServer,
+      final DistributedSystemMXBean distributedSystemMXBean = JMX.newMXBeanProxy(wrappedMbs,
         MBeanJMXAdapter.getDistributedSystemName(), DistributedSystemMXBean.class);
 
-      /*managingMemberMXBeanProxy = createMemberMXBeanForManagerUsingAdapter(platformMBeanServer,
-      distributedSystemMXBean.getMemberObjectName());*/
-
-      managingMemberMXBeanProxy = createMemberMXBeanForManagerUsingProxy(platformMBeanServer,
+      managingMemberMXBeanProxy = createMemberMXBeanForManagerUsingProxy(wrappedMbs,
         distributedSystemMXBean.getMemberObjectName());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index de239d7..7c64b60 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -73,22 +73,19 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
   protected String jmxHost;
 
   public CliCommandTestBase(){
-    this(false, false);
+    this(false);
   }
 
   // Junit will use the parameters to initialize the test class and run the tests with different parameters
-  public CliCommandTestBase(boolean useHttpOnConnect, boolean enableAuth){
+  public CliCommandTestBase(boolean useHttpOnConnect){
     this.useHttpOnConnect = useHttpOnConnect;
-    this.enableAuth = enableAuth;
   }
 
   @Parameterized.Parameters
   public static Collection parameters() {
     return Arrays.asList(new Object[][] {
-        { false, false },  // useHttpOnConnect=false, no security enabled
-        { true, false }, // useHttpOnConnect=true, no security enabled
-        { false, true }, // useHttpOnConnect=false, security enabled with cacheServer.json
-        { true, true } // useHttpOnConnect=true, security enabled with cacheServer.json
+        { false},  // useHttpOnConnect=false,
+        { true } // useHttpOnConnect=true,
     });
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 3e79bc3..2d5dec3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -32,10 +32,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.commons.io.FileUtils;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.server.CacheServer;
 import com.gemstone.gemfire.distributed.Locator;
@@ -67,22 +63,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * Dunit class for testing GemFire config commands : export config
  *
@@ -104,8 +84,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
   File subDir = new File("ConfigCommandsDUnitTestSubDir");
   File subManagerConfigFile = new File(subDir, managerConfigFile.getName());
 
-  public ConfigCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ConfigCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index b5dc011..e19eec2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -35,11 +35,6 @@ import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
@@ -79,25 +74,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.MessageFormat;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.jayway.awaitility.Awaitility.waitAtMost;
-
 @Category({ DistributedTest.class, FlakyTest.class }) // GEODE-973
 @RunWith(Parameterized.class)
 public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBase {
@@ -122,8 +98,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
   @Rule
   public RetryRule retryRule = new RetryRule();
 
-  public CreateAlterDestroyRegionCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public CreateAlterDestroyRegionCommandsDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index db84f84..e4b50b9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -64,8 +64,8 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
   transient private ClassBuilder classBuilder = new ClassBuilder();
   transient private CommandProcessor commandProcessor;
 
-  public DeployCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public DeployCommandsDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index c18ad9f..924c863 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -30,9 +30,6 @@ import java.util.Properties;
 import java.util.StringTokenizer;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.DataPolicy;
@@ -74,20 +71,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * The DiskStoreCommandsDUnitTest class is a distributed test suite of test cases for testing the disk store commands
  * that are part of Gfsh. </p>
@@ -104,8 +87,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public DiskStoreCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public DiskStoreCommandsDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 9b7d572..b4a2cef 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -23,9 +23,6 @@ import static com.gemstone.gemfire.test.dunit.Wait.*;
 import java.util.List;
 import java.util.Properties;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -52,13 +49,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.util.List;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * Dunit class for testing gemfire function commands : execute function, destroy function, list function
  */
@@ -71,8 +61,8 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
   private static final String REGION_ONE = "RegionOne";
   private static final String REGION_TWO = "RegionTwo";
 
-  public FunctionCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public FunctionCommandsDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   void setupWith2Regions() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 7a81f18..a76454e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -16,6 +16,23 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Set;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.DataPolicy;
@@ -66,23 +83,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * Dunit class for testing gemfire data commands : get, put, remove, select, rebalance
  */
@@ -121,8 +121,8 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
 
   final static int COUNT = 5;
 
-  public GemfireDataCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public GemfireDataCommandsDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   public String getMemberId() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index 097269d..55ef25c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -16,6 +16,15 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+import static com.gemstone.gemfire.test.dunit.Wait.*;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheLoader;
 import com.gemstone.gemfire.cache.CacheLoaderException;
@@ -45,15 +54,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * The GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest class is test suite of test cases testing the Gfsh
  * 'get' data command when a cache miss occurs on data in a Region with a CacheLoader defined.
@@ -74,8 +74,8 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
   private static final String USERS_REGION_NAME = "Users";
 
 
-  public GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest(boolean useHttpOnConnect, boolean enableAuth){
-    super(useHttpOnConnect, enableAuth);
+  public GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest(boolean useHttpOnConnect){
+    super(useHttpOnConnect);
   }
 
   protected static String getRegionPath(final String regionName) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index 70aba5d..fc2fe7b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -66,8 +66,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
   private static final String parRegPersName = "ParRegPers";
   private static final String repRegPersName = "RepRegPer";
 
-  public IndexCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public IndexCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   Region<?, ?> createParReg(String regionName, Cache cache, Class keyConstraint, Class valueConstraint) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index 2ac3bd2..bb46b75 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -16,6 +16,12 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.Serializable;
+import java.util.Properties;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.DiskStore;
@@ -35,14 +41,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.Serializable;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.assertNotNull;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * The ListAndDescribeDiskStoreCommandsDUnitTest class is a test suite of functional tests cases testing the proper
  * functioning of the 'list disk-store' and 'describe disk-store' commands. </p>
@@ -55,8 +53,8 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
 @RunWith(Parameterized.class)
 public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBase {
 
-  public ListAndDescribeDiskStoreCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ListAndDescribeDiskStoreCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   protected static String toString(final Result result) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index 3196750..591a323 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -21,9 +21,6 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
 
 import java.util.Properties;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.EvictionAction;
 import com.gemstone.gemfire.cache.EvictionAttributes;
@@ -51,11 +48,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 @Category(DistributedTest.class)
 @RunWith(Parameterized.class)
 public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
@@ -69,8 +61,8 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
   private static final String PR1 = "PR1";
   private static final String LOCALREGIONONMANAGER = "LocalRegionOnManager";
 
-  public ListAndDescribeRegionDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ListAndDescribeRegionDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   static class CacheListener2 extends CacheListenerAdapter {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 3a9f29e..97ca98a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -16,6 +16,21 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.Region;
@@ -42,22 +57,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicLong;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * The ListIndexCommandDUnitTest class is distributed test suite of test cases for testing the index-based GemFire shell
  * (Gfsh) commands. </p>
@@ -75,8 +74,8 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
 
   private final AtomicLong idGenerator = new AtomicLong(0l);
 
-  public ListIndexCommandDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ListIndexCommandDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   protected static String toString(final Result result) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index 202cc6f..cdf4348 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -26,10 +26,6 @@ import java.io.IOException;
 import java.util.List;
 import java.util.Properties;
 
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -62,16 +58,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
-import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * Dunit class for testing gemfire function commands : GC, Shutdown
  */
@@ -82,8 +68,8 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
   private static final long serialVersionUID = 1L;
   private static String cachedLogLevel;
 
-  public MiscellaneousCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public MiscellaneousCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
index 5566f76..7660f79 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart1DUnitTest.java
@@ -24,9 +24,6 @@ import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -44,15 +41,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.fail;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * Dunit class for testing gemfire function commands : export logs
  */
@@ -62,8 +50,8 @@ public class MiscellaneousCommandsExportLogsPart1DUnitTest extends CliCommandTes
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart1DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public MiscellaneousCommandsExportLogsPart1DUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   void setupForExportLogs() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
index 91392e7..ee263ae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart2DUnitTest.java
@@ -24,9 +24,6 @@ import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -44,15 +41,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.fail;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * Dunit class for testing gemfire function commands : export logs
  */
@@ -62,8 +50,8 @@ public class MiscellaneousCommandsExportLogsPart2DUnitTest extends CliCommandTes
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart2DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public MiscellaneousCommandsExportLogsPart2DUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index bd179b3..51b1008 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -25,9 +25,6 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Properties;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -46,16 +43,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.fail;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * Dunit class for testing gemfire function commands : export logs
  */
@@ -65,8 +52,8 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart3DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public MiscellaneousCommandsExportLogsPart3DUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   public String getMemberId() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
index 79a08d0..3d837dc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
@@ -24,9 +24,6 @@ import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -44,15 +41,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.fail;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /**
  * Dunit class for testing gemfire function commands : export logs
  */
@@ -62,8 +50,8 @@ public class MiscellaneousCommandsExportLogsPart4DUnitTest extends CliCommandTes
 
   private static final long serialVersionUID = 1L;
 
-  public MiscellaneousCommandsExportLogsPart4DUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public MiscellaneousCommandsExportLogsPart4DUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   void setupForExportLogs() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index 1568e1f..691533d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -28,9 +28,6 @@ import java.util.List;
 import java.util.Properties;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
 import com.gemstone.gemfire.distributed.Locator;
@@ -54,18 +51,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /**
  * A distributed test suite of test cases for testing the queue commands that are part of Gfsh.
  *
@@ -79,8 +64,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
 
   final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
 
-  public QueueCommandsDUnitTest(boolean useHttpOnConnect, boolean jsonAuthorization) {
-    super(useHttpOnConnect, jsonAuthorization);
+  public QueueCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
index 3eb70e4..d871062 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
@@ -27,10 +27,6 @@ import java.net.UnknownHostException;
 import java.util.Properties;
 import java.util.Set;
 
-import org.apache.commons.io.FileUtils;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.DistributedMember;
@@ -61,17 +57,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-import java.util.Set;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 /***
  * DUnit test to test export and import of shared configuration.
  */
@@ -87,8 +72,8 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
   File newDeployableJarFile = new File("DeployCommandsDUnit1.jar");
   private transient ClassBuilder classBuilder = new ClassBuilder();
 
-  public SharedConfigurationCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public SharedConfigurationCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
index a2f6ee0..313e4db 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
@@ -22,9 +22,6 @@ import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
 import java.io.File;
 import java.util.concurrent.TimeUnit;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
 import com.gemstone.gemfire.distributed.LocatorLauncher;
 import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
@@ -43,20 +40,14 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.util.concurrent.TimeUnit;
-
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 @Category(DistributedTest.class)
 @RunWith(Parameterized.class)
 public class ShellCommandsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShellCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ShellCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index 870fd72..5c2913c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -26,9 +26,6 @@ import java.util.Collections;
 import java.util.Properties;
 import javax.management.ObjectName;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionFactory;
@@ -59,25 +56,14 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
-
 @Category(DistributedTest.class)
 @RunWith(Parameterized.class)
 public class ShowMetricsDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowMetricsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ShowMetricsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   private void createLocalSetUp() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index c18722d..eb79c48 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -23,9 +23,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Properties;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
@@ -40,14 +37,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertFalse;
-import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
-
 /***
  * DUnit test for 'show stack-trace' command
  */
@@ -57,8 +46,8 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
 
   private static final long serialVersionUID = 1L;
 
-  public ShowStackTraceDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public ShowStackTraceDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   private void createCache(Properties props) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
index 902c1f5..9f44c14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
@@ -23,9 +23,6 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Properties;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.ClassBuilder;
 import com.gemstone.gemfire.internal.ClassPathLoader;
@@ -41,13 +38,6 @@ import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-
 /**
  * Unit tests for configuring user commands.
  *
@@ -64,8 +54,8 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
   final File jarFile = new File(this.jarDirectory, "UserCommandsDUnit.jar");
   boolean deleteJarDirectory = false;
 
-  public UserCommandsDUnitTest(boolean useHttpOnConnect, boolean enableAuth) {
-    super(useHttpOnConnect, enableAuth);
+  public UserCommandsDUnitTest(boolean useHttpOnConnect) {
+    super(useHttpOnConnect);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/AllCliCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/AllCliCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/AllCliCommandsSecurityTest.java
deleted file mode 100644
index b24a5cb..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/AllCliCommandsSecurityTest.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.management.internal.security;
-
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.management.MemberMXBean;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.FixMethodOrder;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
-/**
- * tests will be run alphabetically, in this test class, we run non-admin test first,
- * since we don't want to have the server stopped for the rest of the tests.
- */
-
-@Category(IntegrationTest.class)
-@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-public class AllCliCommandsSecurityTest {
-  private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-
-  private MemberMXBean bean;
-
-  // use LinkedHashMap to preserve order. We need to execute shutdown command last
-  private Map<String, String> commands = new LinkedHashMap<>();
-
-  public AllCliCommandsSecurityTest() {
-    // ClientCommands
-    commands.put("list clients", "CLUSTER:READ");
-    commands.put("describe client --clientID=172.16.196.144", "CLUSTER:READ");
-
-    // ConfigCommands
-    commands.put("alter runtime", "CLUSTER:MANAGE");
-    commands.put("describe config --member=Member1", "CLUSTER:READ");
-    commands.put("export config --member=member1", "CLUSTER:READ");
-
-    //CreateAlterDestroyRegionCommands
-    commands.put("alter region --name=region1 --eviction-max=5000", "DATA:MANAGE");
-    commands.put("create region --name=region12", "DATA:MANAGE");
-    commands.put("destroy region --name=value", "DATA:MANAGE");
-
-    //Data Commands
-    commands.put("rebalance --include-region=region1", "DATA:MANAGE");
-    commands.put("export data --region=region1 --file=foo.txt --member=value", "DATA:READ");
-    commands.put("import data --region=region1 --file=foo.txt --member=value", "DATA:WRITE");
-    commands.put("put --key=key1 --value=value1 --region=region1", "DATA:WRITE");
-    commands.put("get --key=key1 --region=region1", "DATA:READ");
-    commands.put("remove --region=region1", "DATA:MANAGE");
-    commands.put("query --query='SELECT * FROM /region1'", "DATA:READ");
-
-    // Deploy commands
-    commands.put("deploy --jar=group1_functions.jar --group=Group1", "DATA:MANAGE");
-    commands.put("list deployed", "CLUSTER:READ");
-    commands.put("undeploy --group=Group1", "DATA:MANAGE");
-
-    // Diskstore Commands
-    commands.put("backup disk-store --dir=foo", "DATA:READ");
-    commands.put("list disk-stores", "CLUSTER:READ");
-    commands.put("create disk-store --name=foo --dir=bar", "DATA:MANAGE");
-    commands.put("compact disk-store --name=foo", "DATA:MANAGE");
-    commands.put("compact offline-disk-store --name=foo --disk-dirs=bar", null);
-    commands.put("upgrade offline-disk-store --name=foo --disk-dirs=bar", null);
-    commands.put("describe disk-store --name=foo --member=baz", "CLUSTER:READ");
-    commands.put("revoke missing-disk-store --id=foo", "DATA:MANAGE");
-    commands.put("show missing-disk-stores", "CLUSTER:READ");
-    commands.put("describe offline-disk-store --name=foo --disk-dirs=bar", null);
-    commands.put("export offline-disk-store --name=foo --disk-dirs=bar --dir=baz", null);
-    commands.put("validate offline-disk-store --name=foo --disk-dirs=bar", null);
-    commands.put("alter disk-store --name=foo --region=xyz --disk-dirs=bar", null); // alteroffline
-    commands.put("destroy disk-store --name=foo", "DATA:MANAGE");
-
-    // DurableClientCommands
-    commands.put("close durable-client --durable-client-id=client1", "DATA:MANAGE");
-    commands.put("close durable-cq --durable-client-id=client1 --durable-cq-name=cq1", "DATA:MANAGE");
-    commands.put("show subscription-queue-size --durable-client-id=client1", "CLUSTER:READ");
-    commands.put("list durable-cqs --durable-client-id=client1", "CLUSTER:READ");
-
-    //ExportIMportSharedConfigurationCommands
-    commands.put("export cluster-configuration --zip-file-name=mySharedConfig.zip", "CLUSTER:READ");
-    commands.put("import cluster-configuration --zip-file-name=value", "CLUSTER:MANAGE");
-
-    //FunctionCommands
-    commands.put("destroy function --id=InterestCalculations", "DATA:MANAGE");
-    commands.put("execute function --id=InterestCalculations --group=Group1", "DATA:WRITE");
-    commands.put("list functions", "CLUSTER:READ");
-
-    //GfshHelpCommands
-    commands.put("hint", null);
-    commands.put("help", null);
-
-    //IndexCommands
-    commands.put("clear defined indexes", "DATA:MANAGE");
-    commands.put("create defined indexes", "DATA:MANAGE");
-    commands.put("create index --name=myKeyIndex --expression=region1.Id --region=region1 --type=key", "DATA:MANAGE");
-    commands.put("define index --name=myIndex1 --expression=exp1 --region=/exampleRegion", "DATA:MANAGE");
-    commands.put("destroy index --member=server2", "DATA:MANAGE");
-    commands.put("list indexes", "CLUSTER:READ");
-
-    //LauncherLifecycleCommands
-    commands.put("start jconsole", null);
-    commands.put("start jvisualvm", null);
-    commands.put("start locator --name=locator1", null);
-    commands.put("start pulse", null);
-    commands.put("start server --name=server1", null);
-    commands.put("start vsd", null);
-    commands.put("status locator", null);
-    commands.put("status server", null);
-    commands.put("stop locator --name=locator1", "CLUSTER:MANAGE");
-    commands.put("stop server --name=server1", "CLUSTER:MANAGE");
-
-    //MemberCommands
-    commands.put("describe member --name=server1", "CLUSTER:READ");
-    commands.put("list members", "CLUSTER:READ");
-
-    // Misc Commands
-    commands.put("change loglevel --loglevel=severe --member=server1", "CLUSTER:WRITE");
-    commands.put("export logs --dir=data/logs", "CLUSTER:READ");
-    commands.put("export stack-traces --file=stack.txt", "CLUSTER:READ");
-    commands.put("gc", "CLUSTER:MANAGE");
-    commands.put("netstat --member=server1", "CLUSTER:READ");
-    commands.put("show dead-locks --file=deadlocks.txt", "CLUSTER:READ");
-    commands.put("show log --member=locator1 --lines=5", "CLUSTER:READ");
-    commands.put("show metrics", "CLUSTER:READ");
-
-
-    // PDX Commands
-    commands.put("configure pdx --read-serialized=true", "DATA:MANAGE");
-    commands.put("pdx rename --old=com.gemstone --new=com.pivotal --disk-store=ds1 --disk-dirs=/diskDir1", "DATA:MANAGE");
-
-    // Queue Commands
-    commands.put("create async-event-queue --id=myAEQ --listener=myApp.myListener", "DATA:MANAGE");
-    commands.put("list async-event-queues", "CLUSTER:READ");
-
-    //RegionCommands
-    commands.put("describe region --name=value", "CLUSTER:READ");
-    commands.put("list regions", "CLUSTER:READ");
-
-    // StatusCommands
-    commands.put("status cluster-config-service", "CLUSTER:READ");
-
-    // Shell Commands
-    commands.put("connect", null);
-    commands.put("debug --state=on", null);
-    commands.put("describe connection", null);
-    commands.put("echo --string=\"Hello World!\"", null);
-    commands.put("encrypt password --password=value", null);
-    commands.put("version", null);
-    commands.put("sleep", null);
-    commands.put("sh ls", null);
-
-
-    // WAN Commands
-    commands.put("create gateway-sender --id=sender1 --remote-distributed-system-id=2", "DATA:MANAGE");
-    commands.put("start gateway-sender --id=sender1", "DATA:MANAGE");
-    commands.put("pause gateway-sender --id=sender1", "DATA:MANAGE");
-    commands.put("resume gateway-sender --id=sender1", "DATA:MANAGE");
-    commands.put("stop gateway-sender --id=sender1", "DATA:MANAGE");
-    commands.put("load-balance gateway-sender --id=sender1", "DATA:MANAGE");
-    commands.put("list gateways", "CLUSTER:READ");
-    commands.put("create gateway-receiver", "DATA:MANAGE");
-    commands.put("start gateway-receiver", "DATA:MANAGE");
-    commands.put("stop gateway-receiver", "DATA:MANAGE");
-    commands.put("status gateway-receiver", "CLUSTER:READ");
-    commands.put("status gateway-sender --id=sender1", "CLUSTER:READ");
-
-    //ShellCommand
-    commands.put("disconnect", null);
-    //Misc commands
-    commands.put("shutdown", "CLUSTER:MANAGE");
-  }
-
-  @ClassRule
-  public static JsonAuthorizationCacheStartRule serverRule = new JsonAuthorizationCacheStartRule(
-      jmxManagerPort, "cacheServer.json");
-
-  @Rule
-  public MBeanServerConnectionRule connectionRule = new MBeanServerConnectionRule(jmxManagerPort);
-
-  @Before
-  public void setUp() throws Exception {
-    bean = connectionRule.getProxyMBean(MemberMXBean.class);
-  }
-
-  @Test
-  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
-  // the tests are run in alphabetical order, so the naming of the tests do matter
-  public void a_testNoAccess(){
-    for (Map.Entry<String, String> perm : commands.entrySet()) {
-      LogService.getLogger().info("processing: "+perm.getKey());
-      // for those commands that don't require any permission, any user can execute them
-      if(perm.getValue()==null){
-        bean.processCommand(perm.getKey());
-      }
-      else {
-        assertThatThrownBy(() -> bean.processCommand(perm.getKey()))
-            .hasMessageContaining(perm.getValue())
-            .isInstanceOf(SecurityException.class);
-      }
-    }
-  }
-
-  @Test
-  @JMXConnectionConfiguration(user = "super-user", password = "1234567")
-  public void b_testAdminUser() throws Exception {
-    for (String cmd : commands.keySet()) {
-      LogService.getLogger().info("processing: "+cmd);
-      bean.processCommand(cmd);
-    }
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
new file mode 100644
index 0000000..10bc7ae
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/CliCommandsSecurityTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal.security;
+
+import static org.assertj.core.api.Assertions.*;
+
+import java.util.List;
+
+import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.management.MemberMXBean;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.FixMethodOrder;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+/**
+ * tests will be run alphabetically, in this test class, we run non-admin test first,
+ * since we don't want to have the server stopped for the rest of the tests.
+ */
+
+@Category(IntegrationTest.class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class CliCommandsSecurityTest {
+  private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+
+  private MemberMXBean bean;
+
+  private List<TestCommand> commands = TestCommand.getCommands();
+
+  @ClassRule
+  public static JsonAuthorizationCacheStartRule serverRule = new JsonAuthorizationCacheStartRule(
+      jmxManagerPort, "cacheServer.json");
+
+  @Rule
+  public MBeanServerConnectionRule connectionRule = new MBeanServerConnectionRule(jmxManagerPort);
+
+  @Before
+  public void setUp() throws Exception {
+    bean = connectionRule.getProxyMBean(MemberMXBean.class);
+  }
+
+  @Test
+  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
+  // the tests are run in alphabetical order, so the naming of the tests do matter
+  public void a_testNoAccess(){
+    for (TestCommand command:commands) {
+      LogService.getLogger().info("processing: "+command.getCommand());
+      // for those commands that don't require any permission, any user can execute them
+      if(command.getPermission()==null){
+        bean.processCommand(command.getCommand());
+      }
+      else {
+        assertThatThrownBy(() -> bean.processCommand(command.getCommand()))
+            .hasMessageContaining(command.getPermission())
+            .isInstanceOf(SecurityException.class);
+      }
+    }
+  }
+
+  @Test
+  @JMXConnectionConfiguration(user = "super-user", password = "1234567")
+  public void b_testAdminUser() throws Exception {
+    for (TestCommand command:commands) {
+      LogService.getLogger().info("processing: "+command.getCommand());
+      bean.processCommand(command.getCommand());
+    }
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
index 3170793..4184597 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsSecurityTest.java
@@ -1,7 +1,10 @@
 package com.gemstone.gemfire.management.internal.security;
 
+import static org.junit.Assert.*;
+
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
+import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.junit.Before;
 import org.junit.ClassRule;
@@ -22,19 +25,55 @@ public class GfshCommandsSecurityTest {
       jmxPort, httpPort, "cacheServer.json");
 
   @Rule
-  public GfshShellConnectionRule gfshConnection = new GfshShellConnectionRule(jmxPort, httpPort, false);
-
+  public GfshShellConnectionRule gfshConnection = new GfshShellConnectionRule(jmxPort, httpPort, true);
 
   @Before
   public void before(){
     gfsh = gfshConnection.getGfsh();
   }
 
- // @Test(expected=SecurityException.class)
+  @Test
+  @JMXConnectionConfiguration(user = "data-admin", password = "wrongPwd")
+  public void testInvalidCredentials() throws Exception {
+    assertFalse(gfshConnection.isAuthenticated());
+  }
+
   @Test
   @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
-  public void test() throws Exception {
+  public void testValidCredentials() throws Exception{
+    assertTrue(gfshConnection.isAuthenticated());
+  }
 
+  @Test
+  @JMXConnectionConfiguration(user = "cluster-reader", password = "1234567")
+  public void testAuthorized() throws Exception{
+    CommandResult result = null;
+//    List<TestCommand> commands = TestCommand.getCommandsOfPermission("DATA:READ");
+//    for(TestCommand command:commands){
+//      System.out.println("Processing command: "+command.getCommand());
+//      gfsh.executeCommand(command.getCommand());
+//      result = (CommandResult)gfsh.getResult();
+//      System.out.println(result);
+//    }
+//
+//    List<TestCommand> others = TestCommand.getCommands();
+//    others.removeAll(commands);
+//    for(TestCommand command:others){
+//      gfsh.executeCommand(command.getCommand());
+//      result = (CommandResult)gfsh.getResult();
+//      System.out.println(result);
+//    }
+    gfsh.executeCommand("describe config --member=Member1");
+    result = (CommandResult)gfsh.getResult();
+    System.out.println("result is: "+ result);
   }
 
+  @Test
+  @JMXConnectionConfiguration(user = "cluster-reader", password = "1234567")
+  public void testNotAuthorized() throws Exception{
+    CommandResult result = null;
+    gfsh.executeCommand("alter runtime --member=server1 --log-level=finest --enable-statistics=true");
+    result = (CommandResult)gfsh.getResult();
+    System.out.println("result is: "+ result);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshShellConnectionRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshShellConnectionRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshShellConnectionRule.java
index 9dc8e5e..5bd5672 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshShellConnectionRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshShellConnectionRule.java
@@ -16,10 +16,10 @@
  */
 package com.gemstone.gemfire.management.internal.security;
 
+import com.gemstone.gemfire.management.internal.cli.CliUtil;
 import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.junit.rules.DescribedExternalResource;
 import org.junit.runner.Description;
@@ -33,17 +33,17 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
 
   private int jmxPort = 0 ;
   private int httpPort = 0;
-  private boolean useHttpOnConnect = false;
+  private boolean useHttp = false;
   private HeadlessGfsh gfsh;
-  private CommandResult result;
+  private boolean authenticated;
   /**
    * Rule constructor
    *
    */
-  public GfshShellConnectionRule(int jmxPort, int httpPort,  boolean useHttpOnConnect) {
+  public GfshShellConnectionRule(int jmxPort, int httpPort, boolean useHttp) {
     this.jmxPort = jmxPort;
     this.httpPort = httpPort;
-    this.useHttpOnConnect = useHttpOnConnect;
+    this.useHttp = useHttp;
   }
 
   protected void before(Description description) throws Throwable {
@@ -51,7 +51,7 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
     if(config==null)
       return;
 
-    Gfsh.SUPPORT_MUTLIPLESHELL = true;
+    CliUtil.isGfshVM = true;
     String shellId = getClass().getSimpleName() + "_" + description.getMethodName();
     gfsh = new HeadlessGfsh(shellId, 30);
 
@@ -60,7 +60,7 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
     command.addOption(CliStrings.CONNECT__PASSWORD, config.password());
 
     String endpoint;
-    if (useHttpOnConnect) {
+    if (useHttp) {
       endpoint = "http://localhost:" + httpPort + "/gemfire/v1";
       command.addOption(CliStrings.CONNECT__USE_HTTP, Boolean.TRUE.toString());
       command.addOption(CliStrings.CONNECT__URL, endpoint);
@@ -72,10 +72,15 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
 
     gfsh.executeCommand(command.toString());
 
-    result = (CommandResult) gfsh.getResult();
+    CommandResult result = (CommandResult) gfsh.getResult();
 
-    if(result.getContent().toString().contains("Authentication Failed Wrong username/password")){
-      throw new SecurityException(result.getContent().toString());
+    String message = result.getContent().toString();
+    if(message.contains("Authentication Failed Wrong username/password") ||
+        message.contains("The HTTP request failed with: 403 - Access Denied")){
+      this.authenticated = false;
+    }
+    else{
+      this.authenticated = true;
     }
   }
 
@@ -87,15 +92,17 @@ public class GfshShellConnectionRule extends DescribedExternalResource {
       gfsh.clearEvents();
       gfsh.executeCommand("exit");
       gfsh.terminate();
+      gfsh.setThreadLocalInstance();
       gfsh = null;
     }
+    CliUtil.isGfshVM = false;
   }
 
   public HeadlessGfsh getGfsh() {
     return gfsh;
   }
 
-  public CommandResult getResult() {
-    return result;
+  public boolean isAuthenticated() {
+    return authenticated;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4a327216/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MemberMBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MemberMBeanSecurityJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MemberMBeanSecurityJUnitTest.java
index 3797582..fb36aca 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MemberMBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MemberMBeanSecurityJUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.management.internal.security;
 
+import static org.assertj.core.api.Assertions.*;
+
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.management.MemberMXBean;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -25,8 +27,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-
 @Category(IntegrationTest.class)
 public class MemberMBeanSecurityJUnitTest {
   private static int jmxManagerPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);



Mime
View raw message