geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject geode git commit: fixup
Date Thu, 01 Jun 2017 19:23:09 GMT
Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-2632-19 fc0da1ba6 -> 9b1905c23


fixup


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

Branch: refs/heads/feature/GEODE-2632-19
Commit: 9b1905c231ef27537349ccd3689bbd40ff306574
Parents: fc0da1b
Author: Kirk Lund <klund@apache.org>
Authored: Thu Jun 1 12:22:53 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Thu Jun 1 12:22:53 2017 -0700

----------------------------------------------------------------------
 .../internal/security/SecurityServiceFactory.java    |  2 +-
 .../org/apache/geode/tools/pulse/tests/Server.java   | 15 +++++++++------
 .../geode/tools/pulse/tests/rules/ServerRule.java    |  3 +--
 3 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/9b1905c2/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
index cafa4ab..e8c273a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
@@ -45,7 +45,7 @@ public class SecurityServiceFactory {
     return securityService;
   }
 
-  static SecurityService create(Properties securityConfig, SecurityManager securityManager,
+  public static SecurityService create(Properties securityConfig, SecurityManager securityManager,
       PostProcessor postProcessor) {
     SecurityServiceType type = determineType(securityConfig, securityManager);
     switch (type) {

http://git-wip-us.apache.org/repos/asf/geode/blob/9b1905c2/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
index 3b8f81f..9a16182 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/Server.java
@@ -20,6 +20,7 @@ import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.rmi.registry.LocateRegistry;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
@@ -36,6 +37,7 @@ import javax.management.remote.JMXServiceURL;
 
 import org.apache.geode.internal.security.DisabledSecurityService;
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.internal.security.SecurityServiceFactory;
 import org.apache.geode.tools.pulse.internal.data.PulseConstants;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.shiro.SecurityUtils;
@@ -58,8 +60,7 @@ public class Server {
   private JMXConnectorServer cs;
   private String propFile = null;
 
-  public Server(int jmxPort, String properties, String jsonAuthFile,
-      final SecurityService securityService) throws Exception {
+  public Server(int jmxPort, String properties, String jsonAuthFile) throws Exception {
     this.propFile = properties;
     mbs = ManagementFactory.getPlatformMBeanServer();
     url = new JMXServiceURL(formJMXServiceURLString(DEFAULT_HOST, jmxPort));
@@ -85,6 +86,9 @@ public class Server {
       MBeanServer platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
       platformMBeanServer.registerMBean(acc, accessControlMBeanON);
 
+      SecurityService securityService =
+          SecurityServiceFactory.create(securityProperties, new TestSecurityManager(), null);
+
       // wire in the authenticator and authorizaton
       JMXShiroAuthenticator interceptor = new JMXShiroAuthenticator(securityService);
       env.put(JMXConnectorServer.AUTHENTICATOR, interceptor);
@@ -99,7 +103,7 @@ public class Server {
     }
 
     try {
-      java.rmi.registry.LocateRegistry.createRegistry(jmxPort);
+      LocateRegistry.createRegistry(jmxPort);
       System.out.println("RMI registry ready.");
     } catch (Exception e) {
       System.out.println("Exception starting RMI registry:");
@@ -225,11 +229,10 @@ public class Server {
     return propVal.split(" ");
   }
 
-  public static Server createServer(int jmxPort, String properties, String jsonAuthFile,
-      final SecurityService securityService) {
+  public static Server createServer(int jmxPort, String properties, String jsonAuthFile)
{
     Server s = null;
     try {
-      s = new Server(jmxPort, properties, jsonAuthFile, securityService);
+      s = new Server(jmxPort, properties, jsonAuthFile);
     } catch (Exception e) {
       e.printStackTrace();
       return null;

http://git-wip-us.apache.org/repos/asf/geode/blob/9b1905c2/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
index 3055d13..767588d 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/rules/ServerRule.java
@@ -41,8 +41,7 @@ public class ServerRule extends ExternalResource {
     String jmxPropertiesFile = classLoader.getResource("test.properties").getPath();
 
     int jmxPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    server = Server.createServer(jmxPort, jmxPropertiesFile, jsonAuthFile,
-        new DisabledSecurityService());
+    server = Server.createServer(jmxPort, jmxPropertiesFile, jsonAuthFile);
     System.setProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_HOST, LOCALHOST);
     System.setProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_PORT, Integer.toString(jmxPort));
 


Mime
View raw message