geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [1/3] incubator-geode git commit: GEODE-17: use the new resource and operation code
Date Thu, 07 Apr 2016 18:30:44 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17-2 7dd0094d3 -> d0c4a991a


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationDetailsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationDetailsIntegrationTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationDetailsIntegrationTest.java
deleted file mode 100644
index 03e26fa..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationDetailsIntegrationTest.java
+++ /dev/null
@@ -1,75 +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.management.internal.security.JSONAuthorization.User;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * Tests JSONAuthorization with JSON loaded from files.
- */
-@Category(IntegrationTest.class)
-public class JSONAuthorizationDetailsIntegrationTest {
-
-  @Test
-  public void testSimpleUserAndRole() throws Exception {
-    new JSONAuthorization("testSimpleUserAndRole.json");
-    Map<String, User> acl = JSONAuthorization.getAcl();
-    assertNotNull(acl);
-    assertEquals(1, acl.size());
-    User user = acl.get("tushark");
-    assertNotNull(user);
-    assertEquals(1, user.roles.size());
-    JSONAuthorization.Role r  = user.roles.iterator().next();
-    assertEquals(1, r.permissions.size());
-    JSONAuthorization.Permission p = r.permissions.get(0);
-    assertEquals("QUERY:EXECUTE", p.toString());
-  }
-
-  @Test
-  public void testUserAndRoleRegionServerGroup() throws Exception {
-    new JSONAuthorization("testUserAndRoleRegionServerGroup.json");
-    Map<String, User> acl = JSONAuthorization.getAcl();
-
-    assertNotNull(acl);
-    assertEquals(1, acl.size());
-    User user = acl.get("tushark");
-    assertNotNull(user);
-    assertEquals(1, user.roles.size());
-    JSONAuthorization.Role r  = user.roles.iterator().next();
-    assertEquals("secureRegion", r.regionNames.get(0));
-  }
-
-  @Test
-  public void testUserMultipleRole() throws Exception {
-    new JSONAuthorization("testUserMultipleRole.json");
-    Map<String, User> acl = JSONAuthorization.getAcl();
-
-    assertNotNull(acl);
-    assertEquals(1, acl.size());
-    User user = acl.get("tushark");
-    assertNotNull(user);
-    assertEquals(2, user.roles.size());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
index e86a8e6..5fa7012 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
@@ -62,7 +62,7 @@ public class LockServiceMBeanAuthorizationJUnitTest {
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "superuser", password = "1234567")
+  @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
   public void testAllAccess() throws Exception {
     lockServiceMBean.becomeLockGrantor();
     lockServiceMBean.fetchGrantorMember();
@@ -72,19 +72,19 @@ public class LockServiceMBeanAuthorizationJUnitTest {
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "user", password = "1234567")
+  @JMXConnectionConfiguration(user = "cluster-admin", password = "1234567")
   public void testSomeAccess() throws Exception {
     assertThatThrownBy(() -> lockServiceMBean.becomeLockGrantor()).isInstanceOf(SecurityException.class);
     lockServiceMBean.getMemberCount();
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
+  @JMXConnectionConfiguration(user = "data-user", password = "1234567")
   public void testNoAccess() throws Exception {
-    assertThatThrownBy(() -> lockServiceMBean.becomeLockGrantor()).isInstanceOf(SecurityException.class).hasMessageContaining("LOCK_SERVICE:BECOME_LOCK_GRANTOR");
-    assertThatThrownBy(() -> lockServiceMBean.fetchGrantorMember()).isInstanceOf(SecurityException.class).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> lockServiceMBean.getMemberCount()).isInstanceOf(SecurityException.class).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> lockServiceMBean.isDistributed()).isInstanceOf(SecurityException.class).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> lockServiceMBean.listThreadsHoldingLock()).isInstanceOf(SecurityException.class).hasMessageContaining("JMX:GET");
+    assertThatThrownBy(() -> lockServiceMBean.becomeLockGrantor()).isInstanceOf(SecurityException.class).hasMessageContaining("DATA:MANAGE");
+    assertThatThrownBy(() -> lockServiceMBean.fetchGrantorMember()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> lockServiceMBean.getMemberCount()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> lockServiceMBean.isDistributed()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> lockServiceMBean.listThreadsHoldingLock()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:READ");
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
index c0969ad..6f8ee34 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
@@ -57,7 +57,7 @@ public class MBeanSecurityJUnitTest {
    * No user can call createBean or unregisterBean of GemFire Domain
    */
   @Test
-  @JMXConnectionConfiguration(user = "superuser", password = "1234567")
+  @JMXConnectionConfiguration(user = "super-user", password = "1234567")
   public void testNoAccessWithWhoever() throws Exception{
     MBeanServerConnection con = connectionRule.getMBeanServerConnection();
     assertThatThrownBy(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
index ab22f96..efbdbc7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
@@ -60,23 +60,19 @@ public class ManagerMBeanAuthorizationJUnitTest {
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "superuser", password = "1234567")
+  @JMXConnectionConfiguration(user = "cluster-admin", password = "1234567")
   public void testAllAccess() throws Exception {
-    managerMXBean.setPulseURL("foo"); // MANAGER:SET_PULSE_URL
-    managerMXBean.start(); // MANAGER.START
-    managerMXBean.stop(); // MANAGER.STOP
+    managerMXBean.setPulseURL("foo");
+    managerMXBean.start();
+    managerMXBean.stop();
+    managerMXBean.isRunning();
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "user", password = "1234567")
+  @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
   public void testSomeAccess() throws Exception {
-    assertThatThrownBy(() -> managerMXBean.start()).isInstanceOf(SecurityException.class);
-    managerMXBean.getPulseURL();
-  }
-
-  @Test
-  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
-  public void testNoAccess() throws Exception {
-    assertThatThrownBy(() -> managerMXBean.start()).isInstanceOf(SecurityException.class);
+    assertThatThrownBy(() -> managerMXBean.start()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:MANAGE");
+    assertThatThrownBy(() -> managerMXBean.getPulseURL()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:WRITE");
+    managerMXBean.isRunning();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/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 33136f3..3797582 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
@@ -46,7 +46,7 @@ public class MemberMBeanSecurityJUnitTest {
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "superuser", password = "1234567")
+  @JMXConnectionConfiguration(user = "super-user", password = "1234567")
   public void testAllAccess() throws Exception {
     bean.shutDownMember();
     bean.compactAllDiskStores();
@@ -64,19 +64,47 @@ public class MemberMBeanSecurityJUnitTest {
   }
 
   @Test
-  @JMXConnectionConfiguration(user = "stranger", password = "1234567")
-  public void testNoAccess() throws Exception {
-    assertThatThrownBy(() -> bean.shutDownMember()).isInstanceOf(SecurityException.class).hasMessageContaining("MEMBER:SHUTDOWN");
-    assertThatThrownBy(() -> bean.createManager()).hasMessageContaining("MANAGER:CREATE");
-    assertThatThrownBy(() -> bean.fetchJvmThreads()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.getName()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.getDiskStores()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.hasGatewayReceiver()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.isCacheServer()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.isServer()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.listConnectedGatewayReceivers()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.processCommand("create region --name=Region_A")).hasMessageContaining("REGION:CREATE");
-    assertThatThrownBy(() -> bean.showJVMMetrics()).hasMessageContaining("JMX:GET");
-    assertThatThrownBy(() -> bean.status()).hasMessageContaining("JMX:GET");
+  @JMXConnectionConfiguration(user = "cluster-admin", password = "1234567")
+  public void testClusterAdmin() throws Exception {
+    assertThatThrownBy(() -> bean.compactAllDiskStores()).hasMessageContaining("DATA:MANAGE");
+    bean.shutDownMember();
+    bean.createManager();
+    bean.fetchJvmThreads();
+    bean.getName();
+    bean.getDiskStores();
+    bean.hasGatewayReceiver();
+    bean.isCacheServer();
+    bean.isServer();
+    bean.listConnectedGatewayReceivers();
+    bean.showJVMMetrics();
+    bean.status();
+  }
+
+  @Test
+  @JMXConnectionConfiguration(user = "data-admin", password = "1234567")
+  public void testDataAdmin() throws Exception {
+    bean.compactAllDiskStores();
+    assertThatThrownBy(() -> bean.shutDownMember()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:MANAGE");
+    assertThatThrownBy(() -> bean.createManager()).hasMessageContaining("CLUSTER:MANAGE");
+    bean.showJVMMetrics();
+    bean.status();
+  }
+
+  @Test
+  @JMXConnectionConfiguration(user = "data-user", password = "1234567")
+  public void testDataUser() throws Exception {
+    assertThatThrownBy(() -> bean.shutDownMember()).isInstanceOf(SecurityException.class).hasMessageContaining("CLUSTER:MANAGE");
+    assertThatThrownBy(() -> bean.createManager()).hasMessageContaining("CLUSTER:MANAGE");
+    assertThatThrownBy(() -> bean.compactAllDiskStores()).hasMessageContaining("DATA:MANAGE");
+    assertThatThrownBy(() -> bean.fetchJvmThreads()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.getName()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.getDiskStores()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.hasGatewayReceiver()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.isCacheServer()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.isServer()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.listConnectedGatewayReceivers()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.processCommand("create region --name=Region_A")).hasMessageContaining("DATA:MANAGE");
+    assertThatThrownBy(() -> bean.showJVMMetrics()).hasMessageContaining("CLUSTER:READ");
+    assertThatThrownBy(() -> bean.status()).hasMessageContaining("CLUSTER:READ");
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
index 05f2a7d..18422fd 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/security/cacheServer.json
@@ -1,180 +1,157 @@
 {
   "roles": [
     {
-      "name": "admin",
+      "name": "cluster",
       "operationsAllowed": [
-        "ASYNC_EVENT_QUEUE:LIST",
-        "ASYNC_EVENT_QUEUE:MANAGE",
-        "CLUSTER_CONFIGURATION:STATUS",
-        "CLUSTER_CONFIGURATION:LIST",
-        "CLUSTER_CONFIGURATION:IMPORT",
-        "CLUSTER_CONFIGURATION:EXPORT",
-        "DISKSTORE:LIST",
-        "DISKSTORE:MANAGE",
-        "DISTRIBUTED_SYSTEM:ALL",
-        "DISTRIBUTED_SYSTEM:LIST",
-        "DISTRIBUTED_SYSTEM:MANAGE",
-        "DISTRIBUTED_SYSTEM:ALTER_RUNTIME",
-        "GATEWAY:LIST",
-        "GATEWAY:MANAGE",
-        "PDX:MANAGE",
-        "REGION:PUT",
-        "REGION:GET",
-        "REGION:DELETE",
-        "REGION:EXPORT",
-        "REGION:IMPORT",
-        "REGION:REBALANCE",
-        "REGION:CREATE",
-        "REGION:ALTER",
-        "REGION:DESTROY",
-        "REGION:LIST",
-        "QUERY:EXECUTE",
-        "CLIENT:LIST",
-        "FUNCTION:DEPLOY",
-        "FUNCTION:UNDEPLOY",
-        "FUNCTION:LIST",
-        "FUNCTION:DESTROY",
-        "FUNCTION:EXECUTE",
-        "CONTINUOUS_QUERY:STOP",
-        "CONTINUOUS_QUERY:LIST",
-        "INDEX:FLUSH",
-        "INDEX:CREATE",
-        "INDEX:DESTROY",
-        "INDEX:LIST",
-        "MEMBER:START",
-        "MEMBER:STOP",
-        "MEMBER:STATUS",
-        "MEMBER:LIST",
-        "LOCATOR:STOP"
+        "CLUSTER:MANAGE",
+        "CLUSTER:WRITE",
+        "CLUSTER:READ"
       ]
     },
     {
-      "name": "data-admin",
+      "name": "data",
+      "operationsAllowed": [
+        "DATA:MANAGE",
+        "DATA:WRITE",
+        "DATA:READ"
+      ]
+    },
+    {
+      "name": "manage",
+      "operationsAllowed": [
+        "CLUSTER:MANAGE",
+        "DATA:MANAGE"
+      ]
+    },
+    {
+      "name": "write",
+      "operationsAllowed": [
+        "CLUSTER:WRITE",
+        "DATA:WRITE"
+      ]
+    },
+    {
+      "name": "read",
+      "operationsAllowed": [
+        "CLUSTER:READ",
+        "DATA:READ"
+      ]
+    },
+    {
+      "name": "cluster-manage",
+      "operationsAllowed": [
+        "CLUSTER:MANAGE"
+      ]
+    },
+    {
+      "name": "cluster-write",
+      "operationsAllowed": [
+        "CLUSTER:WRITE"
+      ]
+    },
+    {
+      "name": "cluster-read",
       "operationsAllowed": [
+        "CLUSTER:READ"
       ]
     },
     {
-      "name": "everything",
+      "name": "data-manage",
       "operationsAllowed": [
-        "DISTRIBUTED_SYSTEM:LIST_DS",
-        "INDEX:DESTROY",
-        "QUERY:EXECUTE",
-        "CONTINUOUS_QUERY:EXECUTE",
-        "CONTINUOUS_QUERY:STOP",
-        "MEMBER:SHUTDOWN",
-        "MEMBER:STATUS",
-        "MEMBER:EXPORT_LOGS",
-        "MEMBER:EXPORT_STACKTRACE",
-        "MEMBER:SHOW_LOG",
-        "DISKSTORE:COMPACT",
-        "DISKSTORE:FLUSH",
-        "DISKSTORE:ROLL",
-        "DISKSTORE:ALTER",
-        "MANAGER:CREATE",
-        "REGION:CREATE",
-        "REGION:REBALANCE",
-        "REGION:EXPORT",
-        "REGION:IMPORT",
-        "REGION:PUT",
-        "REGION:GET",
-        "REGION:DELETE",
-        "LOCK_SERVICE:BECOME_LOCK_GRANTOR",
-        "JMX:GET",
-        "GATEWAY:MANAGE",
-        "MANAGER:SET_PULSE_URL",
-        "MANAGER:START",
-        "MANAGER:STOP",
-        "CLUSTER_CONFIGURATION:STATUS",
-        "DISTRIBUTED_SYSTEM:ALL",
-        "DISTRIBUTED_SYSTEM:RENAME",
-        "DISTRIBUTED_SYSTEM:GC",
-        "DISTRIBUTED_SYSTEM:ALTER_RUNTIME",
-        "DISTRIBUTED_SYSTEM:NETSTAT",
-        "DISTRIBUTED_SYSTEM:SHOW_DEADLOCKS",
-        "DISTRIBUTED_SYSTEM:SHOW_METRICS",
-        "DISTRIBUTED_SYSTEM:SHUTDOWN",
-        "ASYNC_EVENT_QUEUE:CREATE",
-        "ASYNC_EVENT_QUEUE:LIST",
-        "PDX:CONFIGURE"
-      ]
-    },
-    {
-      "name": "nothing",
+        "DATA:MANAGE"
+      ]
+    },
+    {
+      "name": "data-write",
       "operationsAllowed": [
+        "DATA:WRITE"
       ]
     },
     {
-      "name": "something",
+      "name": "data-read",
       "operationsAllowed": [
-        "JMX:GET",
-        "MANAGER:SET_PULSE_URL"
+        "DATA:READ"
       ]
     },
     {
-      "name": "dataUsers",
+      "name": "region1-use",
       "operationsAllowed": [
-        "REGION:GET",
-        "REGION:REBALANCE",
-        "REGION:EXPORT",
-        "REGION:IMPORT",
-        "REGION:PUT",
-        "REGION:GET",
-        "REGION:DELETE",
-        "QUERY:EXECUTE"
+        "DATA:READ"
       ],
       "region": "region1"
     },
     {
-      "name": "secureDataUsers",
+      "name": "secure-use",
       "operationsAllowed": [
-        "REGION:GET",
-        "QUERY:EXECUTE"
+        "DATA:READ"
       ],
       "regions": ["region1", "secureRegion"]
     }
   ],
   "users": [
     {
-      "name": "adminUser",
+      "name": "super-user",
       "password": "1234567",
       "roles": [
-        "admin"
+        "cluster",
+        "data"
       ]
     },
     {
-      "name": "superuser",
+      "name": "cluster-admin",
       "password": "1234567",
       "roles": [
-        "everything"
+        "cluster"
       ]
     },
     {
-      "name": "stranger",
+      "name": "data-admin",
+      "password": "1234567",
+      "roles": [
+        "cluster-read",
+        "data-manage"
+      ]
+    },
+    {
+      "name": "data-user",
       "password": "1234567",
       "roles": [
-        "nothing"
+        "data-write",
+        "data-read"
       ]
     },
     {
-      "name": "user",
+      "name": "auditor",
       "password": "1234567",
       "roles": [
-        "something"
+        "data-read"
       ]
     },
     {
-      "name": "dataUser",
+      "name": "monitor",
       "password": "1234567",
       "roles": [
-        "dataUsers"
+        "cluster-read"
       ]
     },
     {
-      "name": "secureDataUser",
+      "name": "region1-user",
+      "password": "1234567",
+      "roles": [
+        "region1-use"
+      ]
+    },
+    {
+      "name": "secure-user",
+      "password": "1234567",
+      "roles": [
+        "secure-use"
+      ]
+    },
+    {
+      "name": "stranger",
       "password": "1234567",
       "roles": [
-        "secureDataUsers",
-        "dataUsers"
       ]
     }
   ]

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
index 901b363..f4180a8 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
@@ -19,15 +19,6 @@
 
 package com.gemstone.gemfire.cache.lucene.internal.distributed;
 
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CancellationException;
-
-import org.junit.Assert;
-import org.junit.experimental.categories.Category;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.EvictionAction;
 import com.gemstone.gemfire.cache.EvictionAlgorithm;
@@ -49,6 +40,14 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Assert;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CancellationException;
 
 @Category(DistributedTest.class)
 public class LuceneFunctionReadPathDUnitTest extends CacheTestCase {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
index 308776b..e066865 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
@@ -34,7 +34,6 @@ import javax.management.remote.JMXConnector;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Set;
 
 /**
  * Spring security authentication object for GemFire
@@ -59,8 +58,7 @@ import java.util.Set;
  *
  * TODO : Better model would be to maintain background connection map for Databrowser instead
  * of each web session creating rmi connection and map user to correct entry in the connection
map
- * 
- * @author Tushar Khairnar
+ *
  * @since version 9.0
  */
 public class GemFireAuthentication extends UsernamePasswordAuthenticationToken {	

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d0c4a991/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
index 970eb34..ede7706 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
@@ -19,9 +19,9 @@
 package com.vmware.gemfire.tools.pulse.tests;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
 import com.gemstone.gemfire.management.internal.security.MBeanServerWrapper;
 import com.gemstone.gemfire.management.internal.security.ManagementInterceptor;
+import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
 import org.json.JSONException;
 
@@ -66,7 +66,7 @@ public class Server {
       props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName()
+ ".create");
       props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName()
+ ".create");
       JSONAuthorization.setUpWithJsonFile(jsonAuthFile);
-      Map<String, Object> env = new HashMap<>();
+      Map<String, Object> env = new HashMap<String, Object>();
 
       ManagementInterceptor interceptor = new ManagementInterceptor(props);
       env.put(JMXConnectorServer.AUTHENTICATOR, interceptor);


Mime
View raw message