You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/12/04 09:19:31 UTC

svn commit: r723240 - in /geronimo/server/trunk: framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/ framework/modules/geronimo-...

Author: djencks
Date: Thu Dec  4 00:19:31 2008
New Revision: 723240

URL: http://svn.apache.org/viewvc?rev=723240&view=rev
Log:
GERONIMO-4445, GERONIMO-4415 Fix up GeronimoLoginConfiguration and SimpleCredentialStore, use in monitoring console agent

Added:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java   (with props)
Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImpl.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ClassOptionLoginModule.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ConfigurationEntryFactory.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificateChainTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificatePropertiesFileTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginConfiguredIdentityNamedUsernamePasswordTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPasswordCredentialTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPropertiesFileMappedPasswordCredentialTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosNonGeronimoTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginNamedUPCredentialTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginSQLTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/NoLoginModuleReuseTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
    geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/WrappingLoginModuleTest.java
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java Thu Dec  4 00:19:31 2008
@@ -38,6 +38,7 @@
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
+import javax.security.auth.login.Configuration;
 
 import org.apache.geronimo.security.realm.providers.GeronimoCallerPrincipal;
 
@@ -69,22 +70,53 @@
         registerSubject(EMPTY);
     }
 
-    public static LoginContext login(String realm, CallbackHandler callbackHandler) throws LoginException {
+    /**
+     *
+     * @param realm
+     * @param callbackHandler
+     * @param configuration login Configuration to use, or null for the GeronimoLoginConfiguration gbean instance
+     * @return
+     * @throws LoginException
+     */
+    public static LoginContext login(String realm, CallbackHandler callbackHandler, Configuration configuration) throws LoginException {
         Subject subject = new Subject();
-        LoginContext loginContext = new LoginContext(realm, subject, callbackHandler);
+        LoginContext loginContext = new LoginContext(realm, subject, callbackHandler, configuration);
         loginContext.login();
         SubjectId id = ContextManager.registerSubject(subject);
         IdentificationPrincipal principal = new IdentificationPrincipal(id);
         subject.getPrincipals().add(principal);
         return loginContext;
     }
-    
-    public static LoginContext login(Subject subject, String realm, CallbackHandler callbackHandler) throws LoginException {
-        LoginContext loginContext = new LoginContext(realm, subject, callbackHandler);
+
+    /**
+     * @deprecated use the method with Configuration
+     * @param realm
+     * @param callbackHandler
+     * @return
+     * @throws LoginException
+     */
+    public static LoginContext login(String realm, CallbackHandler callbackHandler) throws LoginException {
+        return login(realm, callbackHandler, null);
+    }
+
+    public static LoginContext login(Subject subject, String realm, CallbackHandler callbackHandler, Configuration configuration) throws LoginException {
+        LoginContext loginContext = new LoginContext(realm, subject, callbackHandler, configuration);
         loginContext.login();
         return loginContext;
     }
 
+    /**
+     * @deprecated use the method with Configuration
+     * @param subject
+     * @param realm
+     * @param callbackHandler
+     * @return
+     * @throws LoginException
+     */
+    public static LoginContext login(Subject subject, String realm, CallbackHandler callbackHandler) throws LoginException {
+        return login(subject, realm, callbackHandler, null);
+    }
+
     public static void logout(LoginContext loginContext) throws LoginException {
         Subject subject = loginContext.getSubject();
         ContextManager.unregisterSubject(subject);

Added: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java?rev=723240&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java (added)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java Thu Dec  4 00:19:31 2008
@@ -0,0 +1,110 @@
+/*
+ * 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 org.apache.geronimo.security.credentialstore;
+
+import java.util.Map;
+import java.util.List;
+import java.util.Arrays;
+import java.io.IOException;
+import java.security.Principal;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.security.auth.spi.LoginModule;
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.login.FailedLoginException;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
+
+/**
+ * Simple login module that may help create subjects for run-as roles.  List the desired class as the principalClass and the
+ * desired allowed names for principals as allowedNames in a comma-separated list.
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class RunAsLoginModule implements LoginModule {
+
+    private Subject subject;
+    private CallbackHandler callbackHandler;
+    private Class<Principal> principalClass;
+    private List<String> allowedNames;
+    private String name;
+
+    public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+        this.subject = subject;
+        this.callbackHandler = callbackHandler;
+        ClassLoader classLoader = (ClassLoader) options.get(JaasLoginModuleUse.CLASSLOADER_LM_OPTION);
+        String principalClassName = (String) options.get("principalClass");
+        try {
+            principalClass = (Class<Principal>) classLoader.loadClass(principalClassName);
+        } catch (ClassNotFoundException e) {
+            throw new IllegalArgumentException(principalClassName + " not found", e);
+        }
+        String allNames = (String) options.get("principalNames");
+        allowedNames = Arrays.asList(allNames.split(","));
+    }
+
+    public boolean login() throws LoginException {
+        NameCallback callback = new NameCallback("foo");
+        try {
+            callbackHandler.handle(new Callback[] {callback});
+        } catch (IOException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        } catch (UnsupportedCallbackException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        }
+        name = callback.getName();
+        if (allowedNames.contains(name)) {
+            return true;
+        }
+        throw new FailedLoginException("name not recognized " + name);
+    }
+
+    public boolean commit() throws LoginException {
+        try {
+            Constructor<Principal> c = principalClass.getConstructor(String.class);
+            Principal principal = c.newInstance(name);
+            subject.getPrincipals().add(principal);
+            return true;
+        } catch (InstantiationException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        } catch (IllegalAccessException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        } catch (NoSuchMethodException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        } catch (InvocationTargetException e) {
+            throw (LoginException) new LoginException().initCause(e);
+        }
+    }
+
+    public boolean abort() throws LoginException {
+        return false;
+    }
+
+    public boolean logout() throws LoginException {
+        return false;
+    }
+}

Propchange: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/RunAsLoginModule.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImpl.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImpl.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImpl.java Thu Dec  4 00:19:31 2008
@@ -22,6 +22,7 @@
 
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Collection;
 import java.lang.reflect.Constructor;
 
 import javax.security.auth.Subject;
@@ -30,19 +31,37 @@
 import javax.security.auth.callback.UnsupportedCallbackException;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
+import javax.security.auth.login.Configuration;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.security.ContextManager;
+import org.apache.geronimo.security.SecurityNames;
+import org.apache.geronimo.security.jaas.ConfigurationEntryFactory;
+import org.apache.geronimo.security.jaas.GeronimoLoginConfiguration;
 
 /**
  * @version $Rev$ $Date$
  */
+@GBean
 public class SimpleCredentialStoreImpl implements CredentialStore {
 
     private final Map<String, Map<String, Map<String, SingleCallbackHandler>>> credentialStore = new HashMap<String, Map<String, Map<String, SingleCallbackHandler>>>();
+    private final Configuration configuration;
 
-    public SimpleCredentialStoreImpl(Map<String, Map<String, Map<String, String>>> credentials, ClassLoader cl) {
+    public SimpleCredentialStoreImpl(@ParamAttribute(name="credentialStore")Map<String, Map<String, Map<String, String>>> credentials,
+                                     @ParamReference(name="Realms", namingType = SecurityNames.SECURITY_REALM)Collection<ConfigurationEntryFactory> realms,
+                                     @ParamSpecial(type = SpecialAttributeType.classLoader)ClassLoader cl) {
+        if (realms != null) {
+            configuration = new GeronimoLoginConfiguration(realms, true);
+        } else {
+            configuration = null;
+        }
         if (credentials != null) {
             for (Map.Entry<String, Map<String, Map<String, String>>> realmData: credentials.entrySet()) {
                 String realmName = realmData.getKey();
@@ -89,7 +108,8 @@
                     singleCallbackHandler.handle(callback);
                 }
             }
-        });
+        },
+                configuration);
         return loginContext.getSubject();
     }
 
@@ -116,20 +136,4 @@
         return subject;
     }
 
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(SimpleCredentialStoreImpl.class);
-
-        infoBuilder.addAttribute("credentialStore", Map.class, true);
-        infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
-
-        infoBuilder.setConstructor(new String[]{"credentialStore", "classLoader"});
-
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ClassOptionLoginModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ClassOptionLoginModule.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ClassOptionLoginModule.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ClassOptionLoginModule.java Thu Dec  4 00:19:31 2008
@@ -38,7 +38,6 @@
 public class ClassOptionLoginModule implements LoginModule {
     public static final String CLASS_OPTION = WrappingLoginModule.class.getName() + ".LoginModuleClass";
     public static final List<String> supportedOptions = Collections.unmodifiableList(Arrays.asList(CLASS_OPTION));
-    private Subject subject;
     private LoginModule delegate;
 
 
@@ -46,7 +45,6 @@
     }
 
     public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
-        this.subject = subject;
         Class lmClass = (Class) options.get(CLASS_OPTION);
         try {
             delegate = (LoginModule) lmClass.newInstance();

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ConfigurationEntryFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ConfigurationEntryFactory.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ConfigurationEntryFactory.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/ConfigurationEntryFactory.java Thu Dec  4 00:19:31 2008
@@ -44,4 +44,5 @@
      */
     AppConfigurationEntry[] getAppConfigurationEntries();
 
+    Boolean isPublish();
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java Thu Dec  4 00:19:31 2008
@@ -56,6 +56,11 @@
         return new AppConfigurationEntry[] {new AppConfigurationEntry(module.getLoginModuleClass(), controlFlag.getFlag(), module.getOptions())};
     }
 
+    //TODO configure this
+    public Boolean isPublish() {
+        return true;
+    }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java Thu Dec  4 00:19:31 2008
@@ -19,21 +19,25 @@
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Hashtable;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.security.auth.login.AppConfigurationEntry;
 import javax.security.auth.login.Configuration;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.ReferenceCollection;
 import org.apache.geronimo.gbean.ReferenceCollectionEvent;
 import org.apache.geronimo.gbean.ReferenceCollectionListener;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.GBean;
 import org.apache.geronimo.security.SecurityServiceImpl;
+import org.apache.geronimo.security.SecurityNames;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -45,20 +49,16 @@
  *
  * @version $Rev$ $Date$
  */
+@GBean
 public class GeronimoLoginConfiguration extends Configuration implements GBeanLifecycle, ReferenceCollectionListener {
     private static final Logger log = LoggerFactory.getLogger(GeronimoLoginConfiguration.class);
-    private static Map<String, AppConfigurationEntry[]> entries = new Hashtable<String, AppConfigurationEntry[]>();
+    private final Map<String, AppConfigurationEntry[]> entries = new ConcurrentHashMap<String, AppConfigurationEntry[]>();
     private Configuration oldConfiguration;
-    private Collection<ConfigurationEntryFactory> configurations = Collections.emptySet();
+    private final Collection<ConfigurationEntryFactory> configurations;
+    private final boolean useAllConfigurations;
 
-    public Collection getConfigurations() {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(SecurityServiceImpl.CONFIGURE);
-
-        return configurations;
-    }
-
-    public void setConfigurations(Collection<ConfigurationEntryFactory> configurations) {
+    public GeronimoLoginConfiguration(@ParamReference(name="Configurations", namingType = SecurityNames.SECURITY_REALM)Collection<ConfigurationEntryFactory> configurations,
+                                      @ParamAttribute(name="useAllConfigurations") boolean useAllConfigurations) {
         SecurityManager sm = System.getSecurityManager();
         if (sm != null) sm.checkPermission(SecurityServiceImpl.CONFIGURE);
 
@@ -68,12 +68,20 @@
         }
 
         this.configurations = configurations;
+        this.useAllConfigurations = useAllConfigurations;
 
         for (ConfigurationEntryFactory configuration : configurations) {
             addConfiguration(configuration);
         }
     }
 
+    public Collection getConfigurations() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) sm.checkPermission(SecurityServiceImpl.CONFIGURE);
+
+        return configurations;
+    }
+
     public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
         return entries.get(name);
     }
@@ -103,9 +111,11 @@
         if (entries.containsKey(factory.getConfigurationName())) {
             throw new java.lang.IllegalArgumentException("ConfigurationEntry already registered");
         }
-        AppConfigurationEntry[] ace = factory.getAppConfigurationEntries();
-        entries.put(factory.getConfigurationName(), ace);
-        log.debug("Added Application Configuration Entry " + factory.getConfigurationName());
+        if (useAllConfigurations || factory.isPublish()) {
+            AppConfigurationEntry[] ace = factory.getAppConfigurationEntries();
+            entries.put(factory.getConfigurationName(), ace);
+            log.debug("Added Application Configuration Entry " + factory.getConfigurationName());
+        }
     }
 
     public void doStart() throws Exception {
@@ -134,17 +144,4 @@
         log.debug("Uninstalled Geronimo login configuration");
     }
 
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
-    private static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(GeronimoLoginConfiguration.class); //just a gbean
-        infoFactory.addReference("Configurations", ConfigurationEntryFactory.class, null);
-
-        GBEAN_INFO = infoFactory.getBeanInfo();
-    }
-
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java Thu Dec  4 00:19:31 2008
@@ -26,6 +26,11 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.security.jaas.ConfigurationEntryFactory;
 import org.apache.geronimo.security.jaas.JaasLoginModuleChain;
@@ -54,6 +59,7 @@
  *
  * @version $Rev$ $Date$
  */
+@GBean(j2eeType = SecurityNames.SECURITY_REALM)
 public class GenericSecurityRealm implements SecurityRealm, ConfigurationEntryFactory {
 
     private final String realmName;
@@ -63,16 +69,20 @@
     private final boolean wrapPrincipals;
     private final JaasLoginModuleUse loginModuleUse;
 
-    public GenericSecurityRealm(String realmName,
-                                JaasLoginModuleUse loginModuleUse,
-                                boolean wrapPrincipals,
-                                ServerInfo serverInfo,
-                                ClassLoader classLoader,
-                                Kernel kernel
+    private final boolean publish;
+
+    public GenericSecurityRealm(@ParamAttribute(name="realmName") String realmName,
+                                @ParamReference(name="LoginModuleConfiguration", namingType = "LoginModuleUse")JaasLoginModuleUse loginModuleUse,
+                                @ParamAttribute(name="wrapPrincipals")boolean wrapPrincipals,
+                                @ParamAttribute(name="publish")Boolean publish,
+                                @ParamReference(name="ServerInfo")ServerInfo serverInfo,
+                                @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader,
+                                @ParamSpecial(type = SpecialAttributeType.kernel)Kernel kernel
     ) throws ClassNotFoundException {
         this.realmName = realmName;
         this.wrapPrincipals = wrapPrincipals;
         this.loginModuleUse = loginModuleUse;
+        this.publish = publish == null || publish;
 
         Set<String> domainNames = new HashSet<String>();
         List<AppConfigurationEntry> loginModuleConfigurations = new ArrayList<AppConfigurationEntry>();
@@ -120,34 +130,8 @@
         return realmName;
     }
 
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(GenericSecurityRealm.class, SecurityNames.SECURITY_REALM);
-
-        infoFactory.addInterface(SecurityRealm.class);
-        infoFactory.addInterface(ConfigurationEntryFactory.class);
-        infoFactory.addAttribute("realmName", String.class, true);
-        infoFactory.addAttribute("kernel", Kernel.class, false);
-        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
-        infoFactory.addAttribute("deploymentSupport", Properties.class, true);
-        infoFactory.addAttribute("wrapPrincipals", boolean.class, true);
-
-        infoFactory.addReference("LoginModuleConfiguration", JaasLoginModuleUse.class, "LoginModuleUse");
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
-
-        infoFactory.setConstructor(new String[]{"realmName",
-                                                "LoginModuleConfiguration",
-                                                "wrapPrincipals",
-                                                "ServerInfo",
-                                                "classLoader",
-                                                "kernel"});
-
-        GBEAN_INFO = infoFactory.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
+    public Boolean isPublish() {
+        return publish;
     }
 
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/AbstractTest.java Thu Dec  4 00:19:31 2008
@@ -35,6 +35,7 @@
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.MultiGBeanInfoFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.repository.Artifact;
@@ -69,14 +70,14 @@
 
         // Create all the parts
         if (needServerInfo) {
-            gbean = buildGBeanData("name", "ServerInfo", BasicServerInfo.GBEAN_INFO);
+            gbean = buildGBeanData("name", "ServerInfo", BasicServerInfo.class);
             serverInfo = gbean.getAbstractName();
             gbean.setAttribute("baseDirectory", BASEDIR.getAbsolutePath());
             kernel.loadGBean(gbean, ServerInfo.class.getClassLoader());
             kernel.startGBean(serverInfo);
         }
         if (needLoginConfiguration) {
-            gbean = buildGBeanData("name", "LoginConfiguration", GeronimoLoginConfiguration.getGBeanInfo());
+            gbean = buildGBeanData("name", "LoginConfiguration", GeronimoLoginConfiguration.class);
             loginConfiguration = gbean.getAbstractName();
             gbean.setReferencePattern("Configurations", new AbstractNameQuery(ConfigurationEntryFactory.class.getName()));
             kernel.loadGBean(gbean, GeronimoLoginConfiguration.class.getClassLoader());
@@ -90,12 +91,13 @@
     }
 
 
-    protected GBeanData buildGBeanData(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
-        AbstractName abstractName = buildAbstractName(key, value, info);
+    protected GBeanData buildGBeanData(String key, String value, Class clazz) throws MalformedObjectNameException {
+        AbstractName abstractName = buildAbstractName(key, value);
+        GBeanInfo info = new MultiGBeanInfoFactory().getGBeanInfo(clazz);
         return new GBeanData(abstractName, info);
     }
 
-    private AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
+    private AbstractName buildAbstractName(String key, String value) throws MalformedObjectNameException {
         Map names = new HashMap();
         names.put(key, value);
         return new AbstractName(new Artifact("test", "foo", "1", "car"), names, new ObjectName("test:" + key + "=" + value));

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/credentialstore/SimpleCredentialStoreImplTest.java Thu Dec  4 00:19:31 2008
@@ -23,6 +23,7 @@
 import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Collections;
 
 import javax.security.auth.Subject;
 
@@ -33,7 +34,10 @@
 import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
 import org.apache.geronimo.security.jaas.LoginModuleGBean;
 import org.apache.geronimo.security.jaas.LoginModuleControlFlag;
+import org.apache.geronimo.security.jaas.ConfigurationEntryFactory;
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
+import org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
  * @version $Rev$ $Date$
@@ -43,76 +47,27 @@
     protected AbstractName clientCE;
     protected AbstractName testCE;
     protected AbstractName testRealm;
+    private GenericSecurityRealm gsr;
 
     public void setUp() throws Exception {
         needServerInfo = true;
-        needLoginConfiguration = true;
+        needLoginConfiguration = false;
         super.setUp();
 
-        GBeanData gbean;
-
-        gbean = buildGBeanData("name", "ClientPropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
-        clientLM = gbean.getAbstractName();
-        gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.jaas.client.JaasLoginCoordinator");
         Map<String, Object> props = new HashMap<String, Object>();
-        props.put("host", "localhost");
-        props.put("port", "4242");
-        props.put("realm", "properties-realm");
-        gbean.setAttribute("options", props);
-        kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
-
-        gbean = buildGBeanData("name", "ClientConfigurationEntry", DirectConfigurationEntry.getGBeanInfo());
-        clientCE = gbean.getAbstractName();
-        gbean.setAttribute("applicationConfigName", "properties-client");
-        gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
-        gbean.setReferencePattern("Module", clientLM);
-        kernel.loadGBean(gbean, DirectConfigurationEntry.class.getClassLoader());
-
-        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
-        testCE = gbean.getAbstractName();
-        gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
-        props = new HashMap<String, Object>();
         props.put("usersURI", new File(BASEDIR, "src/test/data/data/users.properties").toURI().toString());
         props.put("groupsURI", new File(BASEDIR, "src/test/data/data/groups.properties").toURI().toString());
-        gbean.setAttribute("options", props);
-        gbean.setAttribute("loginDomainName", "TestProperties");
-        gbean.setAttribute("wrapPrincipals", Boolean.TRUE);
-        kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
-
-        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
-        AbstractName testUseName = gbean.getAbstractName();
-        gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
-        gbean.setReferencePattern("LoginModule", testCE);
-        kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
-
-        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.getGBeanInfo());
-        testRealm = gbean.getAbstractName();
-        gbean.setAttribute("realmName", "properties-realm");
-        gbean.setReferencePattern("LoginModuleConfiguration", testUseName);
-        gbean.setReferencePattern("ServerInfo", serverInfo);
-        kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
-
-        kernel.startGBean(loginConfiguration);
-        kernel.startGBean(clientLM);
-        kernel.startGBean(clientCE);
-        kernel.startGBean(testUseName);
-        kernel.startGBean(testCE);
-        kernel.startGBean(testRealm);
+        LoginModuleGBean lm = new LoginModuleGBean(PropertiesFileLoginModule.class.getName(), null, true, props, "TestProperties", getClass().getClassLoader());
+
+        JaasLoginModuleUse lmu = new JaasLoginModuleUse(lm, null, LoginModuleControlFlag.REQUIRED);
+
+        gsr = new GenericSecurityRealm("properties-realm", lmu, false, true, (ServerInfo) kernel.getGBean(serverInfo), getClass().getClassLoader(), kernel);
+
     }
 
     public void tearDown() throws Exception {
-        kernel.stopGBean(testRealm);
-        kernel.stopGBean(testCE);
-        kernel.stopGBean(clientCE);
-        kernel.stopGBean(clientLM);
-        kernel.stopGBean(loginConfiguration);
         kernel.stopGBean(serverInfo);
 
-        kernel.unloadGBean(testCE);
-        kernel.unloadGBean(testRealm);
-        kernel.unloadGBean(clientCE);
-        kernel.unloadGBean(clientLM);
-        kernel.unloadGBean(loginConfiguration);
         kernel.unloadGBean(serverInfo);
 
         super.tearDown();
@@ -126,7 +81,7 @@
         entries.put("foo", callbackHanders);
         Map<String, Map<String, Map<String, String>>> credentials = new HashMap<String, Map<String, Map<String, String>>>();
         credentials.put("properties-realm", entries);
-        CredentialStore credentialStore = new SimpleCredentialStoreImpl(credentials, getClass().getClassLoader());
+        CredentialStore credentialStore = new SimpleCredentialStoreImpl(credentials, Collections.<ConfigurationEntryFactory>singleton(gsr), getClass().getClassLoader());
         Subject subject = credentialStore.getSubject("properties-realm", "foo");
         assertNotNull(subject);
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/AbstractLoginModuleTest.java Thu Dec  4 00:19:31 2008
@@ -48,13 +48,13 @@
         testCE = gbean.getAbstractName();
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", testCE);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.class);
         testRealm = gbean.getAbstractName();
         gbean.setAttribute("realmName", SIMPLE_REALM);
         gbean.setAttribute("wrapPrincipals", Boolean.TRUE);
@@ -62,7 +62,7 @@
         gbean.setReferencePattern("ServerInfo", serverInfo);
         kernel.loadGBean(gbean, GenericSecurityRealm.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "NeverFailLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "NeverFailLoginModule", LoginModuleGBean.class);
         neverFailModule = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.jaas.NeverFailLoginModule");
         gbean.setAttribute("options", null);
@@ -71,14 +71,14 @@
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
         kernel.startGBean(neverFailModule);
 
-        gbean = buildGBeanData("name", "PropertiesLoginModuleUse2", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModuleUse2", JaasLoginModuleUse.class);
         AbstractName propsUseName = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.OPTIONAL);
         gbean.setReferencePattern("LoginModule", testCE);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
         kernel.startGBean(propsUseName);
 
-        gbean = buildGBeanData("name", "NeverFailLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "NeverFailLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName neverFailUseName = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", neverFailModule);
@@ -86,7 +86,7 @@
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
         kernel.startGBean(neverFailUseName);
 
-        gbean = buildGBeanData("name", "PropertiesSecurityRealm2", GenericSecurityRealm.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesSecurityRealm2", GenericSecurityRealm.class);
         testRealm2 = gbean.getAbstractName();
         gbean.setAttribute("realmName", COMPLEX_REALM);
         gbean.setAttribute("wrapPrincipals", Boolean.TRUE);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java Thu Dec  4 00:19:31 2008
@@ -22,18 +22,14 @@
 import java.util.Map;
 import java.util.Set;
 
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
 
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.security.AbstractTest;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.IdentificationPrincipal;
@@ -41,13 +37,12 @@
 import org.apache.geronimo.security.realm.GenericSecurityRealm;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.testsupport.TestSupport;
 
 
 /**
  * @version $Rev$ $Date$
  */
-public class ConfigurationEntryTest extends TestSupport {
+public class ConfigurationEntryTest extends AbstractTest {
     
     protected Kernel kernel;
     protected AbstractName serverInfo;
@@ -70,7 +65,6 @@
         LoginContext context = ContextManager.login("properties-realm", new AbstractTest.UsernamePasswordCallback("alan", "starcraft"));
 
         Subject subject = context.getSubject();
-        Subject clientSubject = subject;
         assertTrue("expected non-null client subject", subject != null);
         Set set = subject.getPrincipals(IdentificationPrincipal.class);
         assertEquals("client subject should have one ID principal", set.size(), 1);
@@ -80,7 +74,7 @@
 
         assertTrue("expected non-null server subject", subject != null);
         assertTrue("server subject should have one remote principal", subject.getPrincipals(IdentificationPrincipal.class).size() == 1);
-        IdentificationPrincipal remote = (IdentificationPrincipal) subject.getPrincipals(IdentificationPrincipal.class).iterator().next();
+        IdentificationPrincipal remote = subject.getPrincipals(IdentificationPrincipal.class).iterator().next();
         assertTrue("server subject should be associated with remote id", ContextManager.getRegisteredSubject(remote.getId()) != null);
         assertTrue("server subject should have two realm principals (" + subject.getPrincipals(RealmPrincipal.class).size() + ")", subject.getPrincipals(RealmPrincipal.class).size() == 2);
         assertTrue("server subject should have seven principals (" + subject.getPrincipals().size() + ")", subject.getPrincipals().size() == 7);
@@ -124,18 +118,18 @@
 
         // Create all the parts
 
-        gbean = buildGBeanData("name", "ServerInfo", BasicServerInfo.GBEAN_INFO);
+        gbean = buildGBeanData("name", "ServerInfo", BasicServerInfo.class);
         serverInfo = gbean.getAbstractName();
         gbean.setAttribute("baseDirectory", BASEDIR.getAbsolutePath());
         kernel.loadGBean(gbean, ServerInfo.class.getClassLoader());
         kernel.startGBean(serverInfo);
 
-        gbean = buildGBeanData("new", "LoginConfiguration", GeronimoLoginConfiguration.getGBeanInfo());
+        gbean = buildGBeanData("new", "LoginConfiguration", GeronimoLoginConfiguration.class);
         loginConfiguration = gbean.getAbstractName();
         gbean.setReferencePattern("Configurations", new AbstractNameQuery(ConfigurationEntryFactory.class.getName()));
         kernel.loadGBean(gbean, GeronimoLoginConfiguration.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.class);
         testProperties = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();
@@ -146,13 +140,13 @@
         gbean.setAttribute("wrapPrincipals", Boolean.TRUE);
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModule", LoginModuleGBean.class);
         testUPCred = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.GeronimoPasswordCredentialLoginModule");
         gbean.setAttribute("options", new HashMap<String, Object>());
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData    ("name", "AuditLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData    ("name", "AuditLoginModule", LoginModuleGBean.class);
         testCE = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.FileAuditLoginModule");
         props = new HashMap<String, Object>();
@@ -160,27 +154,27 @@
         gbean.setAttribute("options", props);
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName3 = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", testUPCred);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "AuditLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "AuditLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName2 = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", testCE);
         gbean.setReferencePattern("Next", testUseName3);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName1 = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", testProperties);
         gbean.setReferencePattern("Next", testUseName2);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.class);
         testRealm = gbean.getAbstractName();
         gbean.setAttribute("realmName", "properties-realm");
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName1);
@@ -213,15 +207,4 @@
         kernel.shutdown();
     }
 
-    private GBeanData buildGBeanData(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
-          AbstractName abstractName = buildAbstractName(key, value, info);
-          return new GBeanData(abstractName, info);
-      }
-
-      private AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
-          Map names = new HashMap();
-          names.put(key, value);
-          return new AbstractName(new Artifact("test", "foo", "1", "car"), names, new ObjectName("test:" + key + "=" + value));
-      }
-
 }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificateChainTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificateChainTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificateChainTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificateChainTest.java Thu Dec  4 00:19:31 2008
@@ -57,7 +57,7 @@
         CertificateFactory certFac = CertificateFactory.getInstance("X.509");
         cert = (X509Certificate) certFac.generateCertificate(new ByteArrayInputStream(certText.getBytes()));
 
-        GBeanData gbean = buildGBeanData("name", "CertificateChainLoginModule", LoginModuleGBean.getGBeanInfo());
+        GBeanData gbean = buildGBeanData("name", "CertificateChainLoginModule", LoginModuleGBean.class);
         testCE = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.CertificateChainLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificatePropertiesFileTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificatePropertiesFileTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificatePropertiesFileTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginCertificatePropertiesFileTest.java Thu Dec  4 00:19:31 2008
@@ -70,7 +70,7 @@
         cert = (X509Certificate) certFac.generateCertificate(new ByteArrayInputStream(certText.getBytes()));
         badCert = (X509Certificate) certFac.generateCertificate(new ByteArrayInputStream(badCertText.getBytes()));
 
-        GBeanData gbean = buildGBeanData("name", "CertificatePropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
+        GBeanData gbean = buildGBeanData("name", "CertificatePropertiesLoginModule", LoginModuleGBean.class);
         testCE = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.CertificatePropertiesFileLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginConfiguredIdentityNamedUsernamePasswordTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginConfiguredIdentityNamedUsernamePasswordTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginConfiguredIdentityNamedUsernamePasswordTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginConfiguredIdentityNamedUsernamePasswordTest.java Thu Dec  4 00:19:31 2008
@@ -37,7 +37,7 @@
 
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "ConfiguredIdentityNamedUsernamePasswordLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "ConfiguredIdentityNamedUsernamePasswordLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", ConfiguredIdentityNamedUsernamePasswordLoginModule.class.getName());
         Map<String, Object> props = new HashMap<String, Object>();
         props.put(ConfiguredIdentityNamedUsernamePasswordLoginModule.CREDENTIAL_NAME, credname);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPasswordCredentialTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPasswordCredentialTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPasswordCredentialTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPasswordCredentialTest.java Thu Dec  4 00:19:31 2008
@@ -38,7 +38,7 @@
 
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "GeronimoPasswordCredentialLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", GeronimoPasswordCredentialLoginModule.class.getName());
         Map<String, Object> props = new HashMap<String, Object>();
         gbean.setAttribute("options", props);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPropertiesFileMappedPasswordCredentialTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPropertiesFileMappedPasswordCredentialTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPropertiesFileMappedPasswordCredentialTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginGeronimoPropertiesFileMappedPasswordCredentialTest.java Thu Dec  4 00:19:31 2008
@@ -36,7 +36,7 @@
 public class LoginGeronimoPropertiesFileMappedPasswordCredentialTest extends AbstractLoginModuleTest {
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "GeronimoPropertiesFileMappedPasswordCredentialLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "GeronimoPropertiesFileMappedPasswordCredentialLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", GeronimoPropertiesFileMappedPasswordCredentialLoginModule.class.getName());
         Map<String, Object> props = new HashMap<String, Object>();
         props.put(GeronimoPropertiesFileMappedPasswordCredentialLoginModule.CREDENTIALS_URI, "src/test/data/data/credentials.properties");

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosNonGeronimoTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosNonGeronimoTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosNonGeronimoTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosNonGeronimoTest.java Thu Dec  4 00:19:31 2008
@@ -56,7 +56,7 @@
 
         GBeanData gbean;
 
-        gbean = buildGBeanData("name", "KerberosLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "KerberosLoginModule", LoginModuleGBean.class);
         kerberosLM = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "com.sun.security.auth.module.Krb5LoginModule");
         Properties props = new Properties();
@@ -66,7 +66,7 @@
         gbean.setAttribute("options", props);
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "kerberosConfigurationEntry", DirectConfigurationEntry.getGBeanInfo());
+        gbean = buildGBeanData("name", "kerberosConfigurationEntry", DirectConfigurationEntry.class);
         kerberosCE = gbean.getAbstractName();
         gbean.setAttribute("applicationConfigName", "kerberos-foobar");
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginKerberosTest.java Thu Dec  4 00:19:31 2008
@@ -44,7 +44,7 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        GBeanData gbean = buildGBeanData("name", "KerberosLoginModule", LoginModuleGBean.getGBeanInfo());
+        GBeanData gbean = buildGBeanData("name", "KerberosLoginModule", LoginModuleGBean.class);
         kerberosLM = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "com.sun.security.auth.module.Krb5LoginModule");
         Properties props = new Properties();
@@ -54,13 +54,13 @@
         gbean.setAttribute("options", props);
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "KerberosLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "KerberosLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", kerberosLM);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "KerberosSecurityRealm", GenericSecurityRealm.getGBeanInfo());
+        gbean = buildGBeanData("name", "KerberosSecurityRealm", GenericSecurityRealm.class);
         kerberosRealm = gbean.getAbstractName();
         gbean.setAttribute("realmName", "TOOLAZYDOGS.COM");
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginNamedUPCredentialTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginNamedUPCredentialTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginNamedUPCredentialTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginNamedUPCredentialTest.java Thu Dec  4 00:19:31 2008
@@ -38,7 +38,7 @@
 
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "NamedUsernamePasswordCredentialLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "NamedUsernamePasswordCredentialLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", NamedUsernamePasswordCredentialLoginModule.class.getName());
         Map<String, Object> props = new HashMap<String, Object>();
         props.put(NamedUsernamePasswordCredentialLoginModule.CREDENTIAL_NAME, credname);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginPropertiesFileTest.java Thu Dec  4 00:19:31 2008
@@ -38,7 +38,7 @@
 
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();
         props.put("usersURI", "src/test/data/data/users.properties");

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginSQLTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginSQLTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginSQLTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/LoginSQLTest.java Thu Dec  4 00:19:31 2008
@@ -74,7 +74,7 @@
 
         conn.close();
 
-        GBeanData gbean = buildGBeanData("name", "SQLLoginModule", LoginModuleGBean.getGBeanInfo());
+        GBeanData gbean = buildGBeanData("name", "SQLLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.SQLLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();
         props.put("jdbcURL", hsqldbURL);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/NoLoginModuleReuseTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/NoLoginModuleReuseTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/NoLoginModuleReuseTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/NoLoginModuleReuseTest.java Thu Dec  4 00:19:31 2008
@@ -51,11 +51,10 @@
         GenericSecurityRealm realm = new GenericSecurityRealm(realmName,
                 loginModuleUse,
                 wrapPrincipals,
-                null,
+                null, null,
                 getClass().getClassLoader(),
                 null);
-        GeronimoLoginConfiguration loginConfig = new GeronimoLoginConfiguration();
-        loginConfig.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
+        GeronimoLoginConfiguration loginConfig = new GeronimoLoginConfiguration(Collections.<ConfigurationEntryFactory>singleton(realm), false);
         doLogin(loginConfig, realmName);
         doLogin(loginConfig, realmName);
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/TimeoutTest.java Thu Dec  4 00:19:31 2008
@@ -55,7 +55,7 @@
 
         // Create all the parts
 
-        gbean = buildGBeanData    ("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData    ("name", "PropertiesLoginModule", LoginModuleGBean.class);
         testCE = gbean.getAbstractName();
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();
@@ -66,13 +66,13 @@
         gbean.setAttribute("wrapPrincipals", Boolean.TRUE);
         kernel.loadGBean(gbean, LoginModuleGBean.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModuleUse", JaasLoginModuleUse.class);
         AbstractName testUseName = gbean.getAbstractName();
         gbean.setAttribute("controlFlag", LoginModuleControlFlag.REQUIRED);
         gbean.setReferencePattern("LoginModule", testCE);
         kernel.loadGBean(gbean, JaasLoginModuleUse.class.getClassLoader());
 
-        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesSecurityRealm", GenericSecurityRealm.class);
         testRealm = gbean.getAbstractName();
         gbean.setAttribute("realmName", "properties-realm");
         gbean.setReferencePattern("LoginModuleConfiguration", testUseName);

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/WrappingLoginModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/WrappingLoginModuleTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/WrappingLoginModuleTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/test/java/org/apache/geronimo/security/jaas/WrappingLoginModuleTest.java Thu Dec  4 00:19:31 2008
@@ -40,7 +40,7 @@
 
     protected GBeanData setupTestLoginModule() throws MalformedObjectNameException {
         GBeanData gbean;
-        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.getGBeanInfo());
+        gbean = buildGBeanData("name", "PropertiesLoginModule", LoginModuleGBean.class);
         gbean.setAttribute("loginModuleClass", "org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule");
         Map<String, Object> props = new HashMap<String, Object>();
         props.put("usersURI", "src/test/data/data/users.properties");

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java (original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java Thu Dec  4 00:19:31 2008
@@ -168,10 +168,9 @@
 
         PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
         principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
-        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, serverInfo,  cl, null);
+        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, null, serverInfo,  cl, null);
 
-        GeronimoLoginConfiguration loginConfiguration = new GeronimoLoginConfiguration();
-        loginConfiguration.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
+        GeronimoLoginConfiguration loginConfiguration = new GeronimoLoginConfiguration(Collections.<ConfigurationEntryFactory>singleton(realm), true);
         loginConfiguration.doStart();
 
     }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=723240&r1=723239&r2=723240&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java Thu Dec  4 00:19:31 2008
@@ -136,10 +136,9 @@
 
         PrincipalInfo.PrincipalEditor principalEditor = new PrincipalInfo.PrincipalEditor();
         principalEditor.setAsText("metro,org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal");
-        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, serverInfo, cl, null);
+        GenericSecurityRealm realm = new GenericSecurityRealm(domainName, loginModuleUse, true, true, serverInfo, cl, null);
 
-        loginConfiguration = new GeronimoLoginConfiguration();
-        loginConfiguration.setConfigurations(Collections.<ConfigurationEntryFactory>singleton(realm));
+        loginConfiguration = new GeronimoLoginConfiguration(Collections.<ConfigurationEntryFactory>singleton(realm), true);
         loginConfiguration.doStart();
 
     }