geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r264948 - in /geronimo/trunk/modules: assembly/src/plan/ jetty/src/test/org/apache/geronimo/jetty/ security/src/java/org/apache/geronimo/security/jaas/ security/src/java/org/apache/geronimo/security/realm/ security/src/java/org/apache/geron...
Date Wed, 31 Aug 2005 05:58:12 GMT
Author: jboynes
Date: Tue Aug 30 22:57:53 2005
New Revision: 264948

URL: http://svn.apache.org/viewcvs?rev=264948&view=rev
Log:
remove hard coded object name replacing with a reference

Modified:
    geronimo/trunk/modules/assembly/src/plan/j2ee-secure-plan.xml
    geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml
    geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml
    geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginServiceMBean.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
    geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
    geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
    geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
    geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
    geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginSQLTest.java
    geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
    geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-secure-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-secure-plan.xml?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-secure-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-secure-plan.xml Tue Aug 30 22:57:53 2005
@@ -53,6 +53,7 @@
             <module>org/apache/geronimo/System</module>
             <name>ServerInfo</name>
         </reference>
+        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
     </gbean>
 
     <gbean name="demo-properties-login" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
@@ -66,6 +67,7 @@
         class="org.apache.geronimo.security.jaas.ServerRealmConfigurationEntry">
         <attribute name="applicationConfigName">jaasTest</attribute>
         <attribute name="realmName">demo-properties-realm</attribute>
+        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
     </gbean>
 
 </configuration>

Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/j2ee-server-plan.xml Tue Aug 30 22:57:53 2005
@@ -172,6 +172,7 @@
             <name>properties-login</name>
         </reference>
         <reference name="ServerInfo"><module>org/apache/geronimo/System</module><name>ServerInfo</name></reference>
+        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
     </gbean>
     <gbean name="properties-login" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
          <attribute name="controlFlag">REQUIRED</attribute>
@@ -184,6 +185,7 @@
         class="org.apache.geronimo.security.jaas.ServerRealmConfigurationEntry">
         <attribute name="applicationConfigName">JMX</attribute>
         <attribute name="realmName">geronimo-properties-realm</attribute>
+        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
     </gbean>
 
     <!-- Register GeronimoLoginConfiguration as the LoginConfiguration handler -->

Modified: geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml Tue Aug 30 22:57:53 2005
@@ -101,6 +101,7 @@
             <module>org/apache/geronimo/System</module>
             <name>ServerInfo</name>
         </reference>
+        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
     </gbean>
 
     <gbean name="tomcat-properties" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">

Modified: geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
(original)
+++ geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/AbstractWebModuleTest.java
Tue Aug 30 22:57:53 2005
@@ -192,7 +192,7 @@
         securityServiceGBean.setAttribute("policyConfigurationFactory", "org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory");
         securityServiceGBean.setAttribute("policyProvider", "org.apache.geronimo.security.jacc.GeronimoPolicy");
 
-        loginServiceName = JaasLoginService.OBJECT_NAME;
+        loginServiceName = new ObjectName("test:name=TestLoginService");
         loginServiceGBean = new GBeanData(loginServiceName, JaasLoginService.GBEAN_INFO);
         loginServiceGBean.setReferencePattern("Realms", new ObjectName("geronimo.server:j2eeType=SecurityRealm,*"));
 //        loginServiceGBean.setAttribute("reclaimPeriod", new Long(1000 * 1000));
@@ -219,6 +219,7 @@
         propertiesRealmGBean = new GBeanData(propertiesRealmName, GenericSecurityRealm.GBEAN_INFO);
         propertiesRealmGBean.setReferencePattern("ServerInfo", serverInfoName);
         propertiesRealmGBean.setAttribute("realmName", "demo-properties-realm");
+        propertiesRealmGBean.setReferencePattern("LoginService", loginServiceName);
 //        Properties config = new Properties();
 //        config.setProperty("LoginModule.1.REQUIRED", propertiesLMName.getCanonicalName());
 //        propertiesRealmGBean.setAttribute("loginModuleConfiguration", config);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginCoordinator.java
Tue Aug 30 22:57:53 2005
@@ -29,6 +29,8 @@
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.spi.LoginModule;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
 
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.Kernel;
@@ -52,10 +54,12 @@
     public final static String OPTION_PORT = "port";
     public final static String OPTION_KERNEL = "kernel";
     public final static String OPTION_REALM = "realm";
+    public final static String OPTION_SERVICENAME = "serviceName";
     private String serverHost;
     private int serverPort;
     private String realmName;
     private String kernelName;
+    private ObjectName serviceName;
     private JaasLoginServiceMBean service;
     private CallbackHandler handler;
     private Subject subject;
@@ -73,6 +77,12 @@
         }
         realmName = (String) options.get(OPTION_REALM);
         kernelName = (String) options.get(OPTION_KERNEL);
+        try {
+            String s = (String) options.get(OPTION_SERVICENAME);
+            serviceName = s != null ? new ObjectName(s) : null;
+        } catch (MalformedObjectNameException e) {
+            throw new IllegalArgumentException("option " + OPTION_SERVICENAME + "is not a
valid ObjectName: " + options.get(OPTION_SERVICENAME));
+        }
         service = connect();
         handler = callbackHandler;
         if(subject == null) {
@@ -160,7 +170,7 @@
             return JaasLoginServiceRemotingClient.create(serverHost, serverPort);
         } else {
             Kernel kernel = KernelRegistry.getKernel(kernelName);
-            return (JaasLoginServiceMBean) kernel.getProxyManager().createProxy(JaasLoginService.OBJECT_NAME,
JaasLoginServiceMBean.class);
+            return (JaasLoginServiceMBean) kernel.getProxyManager().createProxy(serviceName,
JaasLoginServiceMBean.class);
         }
     }
 

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java
Tue Aug 30 22:57:53 2005
@@ -62,7 +62,6 @@
  * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
  */
 public class JaasLoginService implements GBeanLifecycle, JaasLoginServiceMBean {
-    public static final ObjectName OBJECT_NAME = JMXUtil.getObjectName("geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=JaasLoginService");
     public static final Log log = LogFactory.getLog(JaasLoginService.class);
     private final static int DEFAULT_EXPIRED_LOGIN_SCAN_INTERVAL = 300000; // 5 mins
     private final static int DEFAULT_MAX_LOGIN_DURATION = 1000 * 3600 * 24; // 1 day
@@ -70,6 +69,7 @@
     private static long nextLoginModuleId = System.currentTimeMillis();
     private ReferenceCollection realms;
     private Object expiredLoginScanIdentifier;
+    private final String objectName;
     private final SecretKey key;
     private final String algorithm;
     private final ClassLoader classLoader;
@@ -77,11 +77,16 @@
     private int expiredLoginScanIntervalMillis = DEFAULT_EXPIRED_LOGIN_SCAN_INTERVAL;
     private int maxLoginDurationMillis = DEFAULT_MAX_LOGIN_DURATION;
 
-    public JaasLoginService(String algorithm, String password, ClassLoader classLoader) {
+    public JaasLoginService(String algorithm, String password, ClassLoader classLoader, String
objectName) {
         this.classLoader = classLoader;
         this.algorithm = algorithm;
         //todo: password could just be randomly generated??
         key = new SecretKeySpec(password.getBytes(), algorithm);
+        this.objectName = objectName;
+    }
+
+    public String getObjectName() {
+        return objectName;
     }
 
     /**
@@ -414,13 +419,14 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JaasLoginService.class); //just
a gbean
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JaasLoginService.class, "JaasLoginService");
//just a gbean
 
         infoFactory.addAttribute("algorithm", String.class, true);
         infoFactory.addAttribute("password", String.class, true);
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
         infoFactory.addAttribute("maxLoginDurationMillis", int.class, true);
         infoFactory.addAttribute("expiredLoginScanIntervalMillis", int.class, true);
+        infoFactory.addAttribute("objectName", String.class, false);
 
         infoFactory.addOperation("connectToRealm", new Class[]{String.class});
         infoFactory.addOperation("getLoginConfiguration", new Class[]{JaasClientId.class});
@@ -434,7 +440,7 @@
 
         infoFactory.addReference("Realms", SecurityRealm.class, NameFactory.SECURITY_REALM);
 
-        infoFactory.setConstructor(new String[]{"algorithm", "password", "classLoader"});
+        infoFactory.setConstructor(new String[]{"algorithm", "password", "classLoader", "objectName"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginServiceMBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginServiceMBean.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginServiceMBean.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginServiceMBean.java
Tue Aug 30 22:57:53 2005
@@ -31,6 +31,12 @@
  */
 public interface JaasLoginServiceMBean {
     /**
+     * Return the object name of this login service.
+     * @return the object name of this service
+     */
+    public String getObjectName();
+
+    /**
      * GBean property
      */
     public Collection getRealms() throws GeronimoSecurityException;

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/ServerRealmConfigurationEntry.java
Tue Aug 30 22:57:53 2005
@@ -36,14 +36,16 @@
     private final String applicationConfigName;
     private final String realmName;
     private final Kernel kernel;
+    private final JaasLoginServiceMBean loginService;
 
     public ServerRealmConfigurationEntry() {
         this.applicationConfigName = null;
         this.realmName = null;
         this.kernel = null;
+        this.loginService = null;
     }
 
-    public ServerRealmConfigurationEntry(String applicationConfigName, String realmName,
Kernel kernel) {
+    public ServerRealmConfigurationEntry(String applicationConfigName, String realmName,
Kernel kernel, JaasLoginServiceMBean loginService) {
         this.applicationConfigName = applicationConfigName;
         this.realmName = realmName;
         if(applicationConfigName == null || realmName == null) {
@@ -53,6 +55,7 @@
             throw new IllegalArgumentException("applicationConfigName must be different than
realmName (there's an automatic entry using the same name as the realm name, so you don't
need a ServerRealmConfigurationEntry if you're just going to use that!)");
         }
         this.kernel = kernel;
+        this.loginService = loginService;
     }
 
     public String getConfigurationName() {
@@ -61,6 +64,10 @@
 
     public JaasLoginModuleConfiguration generateConfiguration() {
         Properties options = new Properties();
+        options.put(JaasLoginCoordinator.OPTION_REALM, realmName);
+        options.put(JaasLoginCoordinator.OPTION_KERNEL, kernel.getKernelName());
+        options.put(JaasLoginCoordinator.OPTION_SERVICENAME, loginService.getObjectName());
+
         options.put("realm", realmName);
         options.put("kernel", kernel.getKernelName());
 
@@ -75,8 +82,9 @@
         infoFactory.addAttribute("applicationConfigName", String.class, true);
         infoFactory.addAttribute("realmName", String.class, true);
         infoFactory.addAttribute("kernel", Kernel.class, false);
+        infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "JaasLoginService");
 
-        infoFactory.setConstructor(new String[]{"applicationConfigName", "realmName", "kernel"});
+        infoFactory.setConstructor(new String[]{"applicationConfigName", "realmName", "kernel",
"LoginService"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
Tue Aug 30 22:57:53 2005
@@ -34,6 +34,7 @@
 import org.apache.geronimo.security.jaas.JaasLoginModuleConfiguration;
 import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
 import org.apache.geronimo.security.jaas.LoginModuleControlFlag;
+import org.apache.geronimo.security.jaas.JaasLoginServiceMBean;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 
@@ -71,6 +72,7 @@
  */
 public class GenericSecurityRealm implements SecurityRealm, ConfigurationEntryFactory {
 
+    private final JaasLoginServiceMBean loginService;
     private final String realmName;
     private JaasLoginModuleConfiguration[] config;
     private final Kernel kernel;
@@ -87,11 +89,13 @@
                                 Principal defaultPrincipal,
                                 ServerInfo serverInfo,
                                 ClassLoader classLoader,
-                                Kernel kernel) {
+                                Kernel kernel,
+                                JaasLoginServiceMBean loginService) {
         this.realmName = realmName;
         this.kernel = kernel;
         this.restrictPrincipalsToServer = restrictPrincipalsToServer;
         this.defaultPrincipal = defaultPrincipal;
+        this.loginService = loginService;
 
         Set domainNames = new HashSet();
         List loginModuleConfigurations = new ArrayList();
@@ -150,8 +154,9 @@
 
     public JaasLoginModuleConfiguration generateConfiguration() {
         Map options = new HashMap();
-        options.put("realm", realmName);
-        options.put("kernel", kernel.getKernelName());
+        options.put(JaasLoginCoordinator.OPTION_REALM, realmName);
+        options.put(JaasLoginCoordinator.OPTION_KERNEL, kernel.getKernelName());
+        options.put(JaasLoginCoordinator.OPTION_SERVICENAME, loginService.getObjectName());
 
         return new JaasLoginModuleConfiguration(JaasLoginCoordinator.class.getName(), LoginModuleControlFlag.REQUIRED,
options, true, realmName);
     }
@@ -172,6 +177,7 @@
 
         infoFactory.addReference("LoginModuleConfiguration", JaasLoginModuleUse.class, "LoginModuleUse");
         infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "JaasLoginService");
 
         infoFactory.addOperation("getAppConfigurationEntries", new Class[0]);
 
@@ -181,7 +187,8 @@
                                                 "defaultPrincipal",
                                                 "ServerInfo",
                                                 "classLoader",
-                                                "kernel"});
+                                                "kernel",
+                                                "LoginService"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
(original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
Tue Aug 30 22:57:53 2005
@@ -185,7 +185,7 @@
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Remote Login Listener", JaasLoginServiceRemotingServer.class);
//has fixed name, j2eeType is irrelevant
         infoFactory.addAttribute("clientConnectURI", URI.class, false);
-        infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "GBean");
+        infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "JaasLoginService");
         infoFactory.addInterface(NetworkConnector.class, new String[]{"host","port","protocol"},
new String[]{"host","port"});
         infoFactory.setConstructor(new String[]{"protocol", "host", "port", "LoginService"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
Tue Aug 30 22:57:53 2005
@@ -59,7 +59,7 @@
 
         // Create all the parts
 
-        loginService = JaasLoginService.OBJECT_NAME;
+        loginService = new ObjectName("test:name=TestLoginService");
         gbean = new GBeanData(loginService, JaasLoginService.getGBeanInfo());
         gbean.setReferencePatterns("Realms", Collections.singleton(new ObjectName("geronimo.security:type=SecurityRealm,*")));
 //        gbean.setAttribute("reclaimPeriod", new Long(10 * 1000));  // todo check other
tests to see if ok
@@ -87,6 +87,7 @@
 //        props.setProperty("LoginModule.1.REQUIRED","geronimo.security:type=LoginModule,name=TestModule");
 //        gbean.setAttribute("loginModuleConfiguration", props);
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
 
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
Tue Aug 30 22:57:53 2005
@@ -154,7 +154,7 @@
         gbean.setReferencePatterns("Configurations", configurations);
         kernel.loadGBean(gbean, GeronimoLoginConfiguration.class.getClassLoader());
 
-        loginService = JaasLoginService.OBJECT_NAME;
+        loginService = new ObjectName("test:name=TestLoginService");
         gbean = new GBeanData(loginService, JaasLoginService.getGBeanInfo());
         gbean.setReferencePatterns("Realms", Collections.singleton(new ObjectName("geronimo.security:type=SecurityRealm,*")));
 //        gbean.setAttribute("reclaimPeriod", new Long(100));
@@ -166,6 +166,7 @@
         gbean = new GBeanData(clientCE, ServerRealmConfigurationEntry.getGBeanInfo());
         gbean.setAttribute("applicationConfigName", "properties-client");
         gbean.setAttribute("realmName", "properties-realm");
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, ServerRealmConfigurationEntry.class.getClassLoader());
 
         testProperties = new ObjectName("geronimo.security:type=LoginModule,name=properties");
@@ -225,6 +226,7 @@
 //        gbean.setAttribute("loginModuleConfiguration", props);
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName1);
         gbean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfo));
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
 
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
Tue Aug 30 22:57:53 2005
@@ -109,6 +109,7 @@
 //        gbean.setAttribute("loginModuleConfiguration", props);
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);
         gbean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfo));
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
 
         kernel.startGBean(loginConfiguration);

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginSQLTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginSQLTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginSQLTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/LoginSQLTest.java
Tue Aug 30 22:57:53 2005
@@ -110,6 +110,7 @@
 //        props.setProperty("LoginModule.1.REQUIRED","geronimo.security:type=LoginModule,name=sql");
 //        gbean.setAttribute("loginModuleConfiguration", props);
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
         kernel.startGBean(sqlRealm);
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
(original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
Tue Aug 30 22:57:53 2005
@@ -119,6 +119,7 @@
 //        gbean.setAttribute("loginModuleConfiguration", props);
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);
         gbean.setReferencePatterns("ServerInfo", Collections.singleton(serverInfo));
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
 
         clientLM = new ObjectName("geronimo.security:type=LoginModule,name=properties-client");

Modified: geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Tue Aug 30 22:57:53 2005
@@ -230,7 +230,7 @@
         securityServiceGBean.setAttribute("policyConfigurationFactory", "org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory");
         securityServiceGBean.setAttribute("policyProvider", "org.apache.geronimo.security.jacc.GeronimoPolicy");
 
-        loginServiceName = JaasLoginService.OBJECT_NAME;
+        loginServiceName = new ObjectName("test:name=TestLoginService");
         loginServiceGBean = new GBeanData(loginServiceName, JaasLoginService.GBEAN_INFO);
         loginServiceGBean.setReferencePattern("Realms", new ObjectName("geronimo.server:j2eeType=SecurityRealm,*"));
         loginServiceGBean.setAttribute("algorithm", "HmacSHA1");
@@ -256,6 +256,7 @@
         propertiesRealmGBean.setReferencePattern("ServerInfo", serverInfoName);
         propertiesRealmGBean.setAttribute("realmName", "Geronimo");
         propertiesRealmGBean.setReferencePattern("LoginModuleConfiguration", testUseName);
+        propertiesRealmGBean.setReferencePattern("LoginService", loginServiceName);
         Principal.PrincipalEditor principalEditor = new Principal.PrincipalEditor();
         principalEditor.setAsText("metro=org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
         propertiesRealmGBean.setAttribute("defaultPrincipal", principalEditor.getValue());
@@ -265,6 +266,7 @@
         propertiesRealmGBean2.setReferencePattern("ServerInfo", serverInfoName);
         propertiesRealmGBean2.setAttribute("realmName", REALM_NAME);
         propertiesRealmGBean2.setReferencePattern("LoginModuleConfiguration", testUseName);
+        propertiesRealmGBean2.setReferencePattern("LoginService", loginServiceName);
         Principal.PrincipalEditor principalEditor2 = new Principal.PrincipalEditor();
         principalEditor2.setAsText("metro=org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
         propertiesRealmGBean2.setAttribute("defaultPrincipal", principalEditor2.getValue());

Modified: geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java?rev=264948&r1=264947&r2=264948&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java (original)
+++ geronimo/trunk/modules/tomcat/src/test/org/apache/geronimo/tomcat/ContainerTest.java Tue
Aug 30 22:57:53 2005
@@ -191,7 +191,7 @@
        securityServiceGBean.setAttribute("policyConfigurationFactory", "org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory");
        securityServiceGBean.setAttribute("policyProvider", "org.apache.geronimo.security.jacc.GeronimoPolicy");
 
-       loginServiceName = JaasLoginService.OBJECT_NAME;
+       loginServiceName = new ObjectName("test:name=TestLoginService");
        loginServiceGBean = new GBeanData(loginServiceName, JaasLoginService.GBEAN_INFO);
        loginServiceGBean.setReferencePattern("Realms", new ObjectName("geronimo.server:j2eeType=SecurityRealm,*"));
        loginServiceGBean.setAttribute("algorithm", "HmacSHA1");
@@ -217,6 +217,7 @@
        propertiesRealmGBean.setReferencePattern("ServerInfo", serverInfoName);
        propertiesRealmGBean.setAttribute("realmName", "Geronimo");
        propertiesRealmGBean.setReferencePattern("LoginModuleConfiguration", testUseName);
+       propertiesRealmGBean.setReferencePattern("LoginService", loginServiceName);
        Principal.PrincipalEditor principalEditor = new Principal.PrincipalEditor();
        principalEditor.setAsText("metro=org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
        propertiesRealmGBean.setAttribute("defaultPrincipal", principalEditor.getValue());



Mime
View raw message