geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge ConfiguredIdentityUserPasswordBridgeTest.java
Date Tue, 20 Jan 2004 06:12:45 GMT
djencks     2004/01/19 22:12:45

  Modified:    modules/core/src/java/org/apache/geronimo/security/bridge
                        AbstractPrincipalMappingUserPasswordRealmBridge.java
                        AbstractRealmBridge.java
                        CallerIdentityUserPasswordRealmBridge.java
                        ConfiguredIdentityUserPasswordRealmBridge.java
                        PropertiesFilePrincipalMappingUserPasswordRealmBridge.java
               modules/core/src/java/org/apache/geronimo/security/providers
                        SQLSecurityRealm.java
               modules/core/src/test/org/apache/geronimo/security/bridge
                        ConfiguredIdentityUserPasswordBridgeTest.java
  Log:
  gbean-ify the bridges
  
  Revision  Changes    Path
  1.2       +49 -10    incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/AbstractPrincipalMappingUserPasswordRealmBridge.java
  
  Index: AbstractPrincipalMappingUserPasswordRealmBridge.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/AbstractPrincipalMappingUserPasswordRealmBridge.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractPrincipalMappingUserPasswordRealmBridge.java	11 Jan 2004 08:27:02 -0000	1.1
  +++ AbstractPrincipalMappingUserPasswordRealmBridge.java	20 Jan 2004 06:12:45 -0000	1.2
  @@ -71,6 +71,10 @@
   
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GAttributeInfo;
  +import org.apache.geronimo.gbean.GConstructorInfo;
   
   /**
    *
  @@ -80,6 +84,8 @@
    * */
   public abstract class AbstractPrincipalMappingUserPasswordRealmBridge extends AbstractRealmBridge
{
   
  +    private static final GBeanInfo GBEAN_INFO;
  +
       protected final Map principalMap = new HashMap();
       private Class principalSourceType;
       private String principalTargetCallbackName;
  @@ -90,15 +96,20 @@
       private Class passwordSourceType;
   
   
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  -        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  -        //set target class in concrete subclass
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PrincipalSourceType", true,
true, "Class of principal to use as source for target principal map key"));
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PrincipalTargetCallbackName",
true, true, "Pronpt of NameCallback used to query for target principal"));
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UserNameSourceType", true,
true, "Class of principal to use as source for target user name map key"));
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UserNameTargetCallbackName",
true, true, "Pronpt of NameCallback used to query for target user name"));
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PasswordSourceType", true,
true, "Class of principal to use as source for target password map key"));
  -        return mbeanInfo;
  +    public AbstractPrincipalMappingUserPasswordRealmBridge() {}
  +
  +    public AbstractPrincipalMappingUserPasswordRealmBridge(String targetRealm,
  +                                                           Class principalSourceType,
  +                                                           String principalTargetCallbackName,
  +                                                           Class userNameSourceType,
  +                                                           String userNameTargetCallbackName,
  +                                                           Class passwordSourceType) {
  +        super(targetRealm);
  +        this.principalSourceType = principalSourceType;
  +        this.principalTargetCallbackName = principalTargetCallbackName;
  +        this.userNameSourceType = userNameSourceType;
  +        this.userNameTargetCallbackName = userNameTargetCallbackName;
  +        this.passwordSourceType = passwordSourceType;
       }
   
       public Class getPrincipalSourceType() {
  @@ -188,6 +199,34 @@
               }
   
           };
  +    }
  +
  +    static {
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(CallerIdentityUserPasswordRealmBridge.class.getName(),
AbstractRealmBridge.getGBeanInfo());
  +        infoFactory.addAttribute(new GAttributeInfo("PrincipalSourceType", true));
  +        infoFactory.addAttribute(new GAttributeInfo("PrincipalTargetCallbackName", true));
  +        infoFactory.addAttribute(new GAttributeInfo("UserNameSourceType", true));
  +        infoFactory.addAttribute(new GAttributeInfo("UserNameTargetCallbackName", true));
  +        infoFactory.addAttribute(new GAttributeInfo("PasswordSourceType", true));
  +        infoFactory.setConstructor(new GConstructorInfo(
  +                new String[] {"TargetRealm", "PrincipalSourceType", "PrincipalTargetCallbackName",
"UserNameSourceType", "UserNameTargetCallbackName", "PasswordSourceType"},
  +        new Class[] {String.class, Class.class, String.class, Class.class, String.class,
Class.class}));
  +        GBEAN_INFO = infoFactory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +
  +    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  +        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  +        //set target class in concrete subclass
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PrincipalSourceType", true,
true, "Class of principal to use as source for target principal map key"));
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PrincipalTargetCallbackName",
true, true, "Pronpt of NameCallback used to query for target principal"));
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UserNameSourceType", true,
true, "Class of principal to use as source for target user name map key"));
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("UserNameTargetCallbackName",
true, true, "Pronpt of NameCallback used to query for target user name"));
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PasswordSourceType", true,
true, "Class of principal to use as source for target password map key"));
  +        return mbeanInfo;
       }
   
   }
  
  
  
  1.2       +37 -10    incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/AbstractRealmBridge.java
  
  Index: AbstractRealmBridge.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/AbstractRealmBridge.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractRealmBridge.java	11 Jan 2004 08:27:02 -0000	1.1
  +++ AbstractRealmBridge.java	20 Jan 2004 06:12:45 -0000	1.2
  @@ -65,6 +65,11 @@
   import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.geronimo.kernel.service.GeronimoOperationInfo;
   import org.apache.geronimo.kernel.service.GeronimoParameterInfo;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GAttributeInfo;
  +import org.apache.geronimo.gbean.GConstructorInfo;
  +import org.apache.geronimo.security.providers.PropertiesFileSecurityRealm;
   
   /**
    *
  @@ -74,17 +79,14 @@
    * */
   public abstract class AbstractRealmBridge implements RealmBridge {
   
  +    private static final GBeanInfo GBEAN_INFO;
  +
       private String targetRealm;
   
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  -        GeronimoMBeanInfo mbeanInfo = new GeronimoMBeanInfo();
  -        //set target class in concrete subclass
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("TargetRealm", true, true,
"Name of realm to log in to"));
  -        mbeanInfo.addOperationInfo(new GeronimoOperationInfo("getSubject",
  -                new GeronimoParameterInfo[]{new GeronimoParameterInfo("sourceSubject",
Subject.class, "Subject to be translated")},
  -                GeronimoOperationInfo.ACTION,
  -                "Log into the target realm using information gleaned from the supplied
Subject"));
  -        return mbeanInfo;
  +    public AbstractRealmBridge() {}
  +
  +    public AbstractRealmBridge(String targetRealm) {
  +        this.targetRealm = targetRealm;
       }
   
       public Subject mapSubject(Subject sourceSubject) throws LoginException {
  @@ -103,4 +105,29 @@
       public void setTargetRealm(String targetRealm) {
           this.targetRealm = targetRealm;
       }
  +
  +    static {
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(AbstractRealmBridge.class.getName());
  +        infoFactory.addAttribute(new GAttributeInfo("TargetRealm", true));
  +        infoFactory.setConstructor(new GConstructorInfo(
  +                new String[] {"TargetRealm"},
  +                new Class[] {String.class}));
  +        GBEAN_INFO = infoFactory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +
  +    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  +        GeronimoMBeanInfo mbeanInfo = new GeronimoMBeanInfo();
  +        //set target class in concrete subclass
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("TargetRealm", true, true,
"Name of realm to log in to"));
  +        mbeanInfo.addOperationInfo(new GeronimoOperationInfo("getSubject",
  +                new GeronimoParameterInfo[]{new GeronimoParameterInfo("sourceSubject",
Subject.class, "Subject to be translated")},
  +                GeronimoOperationInfo.ACTION,
  +                "Log into the target realm using information gleaned from the supplied
Subject"));
  +        return mbeanInfo;
  +    }
  +
   }
  
  
  
  1.2       +30 -10    incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/CallerIdentityUserPasswordRealmBridge.java
  
  Index: CallerIdentityUserPasswordRealmBridge.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/CallerIdentityUserPasswordRealmBridge.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CallerIdentityUserPasswordRealmBridge.java	11 Jan 2004 08:27:02 -0000	1.1
  +++ CallerIdentityUserPasswordRealmBridge.java	20 Jan 2004 06:12:45 -0000	1.2
  @@ -59,16 +59,17 @@
   import java.io.IOException;
   import java.util.Set;
   
  -import javax.security.auth.callback.CallbackHandler;
  +import javax.security.auth.Subject;
   import javax.security.auth.callback.Callback;
  -import javax.security.auth.callback.UnsupportedCallbackException;
  +import javax.security.auth.callback.CallbackHandler;
   import javax.security.auth.callback.NameCallback;
   import javax.security.auth.callback.PasswordCallback;
  -import javax.security.auth.Subject;
  +import javax.security.auth.callback.UnsupportedCallbackException;
   
  -import org.apache.geronimo.security.providers.GeronimoPasswordCredential;
  -import org.apache.geronimo.security.bridge.AbstractRealmBridge;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  +import org.apache.geronimo.security.providers.GeronimoPasswordCredential;
   
   /**
    *
  @@ -78,12 +79,15 @@
    * */
   public class CallerIdentityUserPasswordRealmBridge extends AbstractRealmBridge {
   
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  -        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  -        mbeanInfo.setTargetClass(CallerIdentityUserPasswordRealmBridge.class);
  -        return mbeanInfo;
  +    private static final GBeanInfo GBEAN_INFO;
  +
  +    public CallerIdentityUserPasswordRealmBridge() {}
  +
  +    public CallerIdentityUserPasswordRealmBridge(String targetRealm) {
  +        super(targetRealm);
       }
   
  +
       protected CallbackHandler getCallbackHandler(final Subject sourceSubject) {
           return new CallbackHandler() {
               public void handle(Callback[] callbacks)
  @@ -108,4 +112,20 @@
   
           };
       }
  +
  +    static {
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(CallerIdentityUserPasswordRealmBridge.class.getName(),
AbstractRealmBridge.getGBeanInfo());
  +        GBEAN_INFO = infoFactory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +
  +    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  +        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  +        mbeanInfo.setTargetClass(CallerIdentityUserPasswordRealmBridge.class);
  +        return mbeanInfo;
  +    }
  +
   }
  
  
  
  1.2       +41 -13    incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/ConfiguredIdentityUserPasswordRealmBridge.java
  
  Index: ConfiguredIdentityUserPasswordRealmBridge.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/ConfiguredIdentityUserPasswordRealmBridge.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfiguredIdentityUserPasswordRealmBridge.java	11 Jan 2004 08:27:02 -0000	1.1
  +++ ConfiguredIdentityUserPasswordRealmBridge.java	20 Jan 2004 06:12:45 -0000	1.2
  @@ -58,16 +58,19 @@
   
   import java.io.IOException;
   
  -import javax.security.auth.callback.CallbackHandler;
  +import javax.security.auth.Subject;
   import javax.security.auth.callback.Callback;
  -import javax.security.auth.callback.UnsupportedCallbackException;
  +import javax.security.auth.callback.CallbackHandler;
   import javax.security.auth.callback.NameCallback;
   import javax.security.auth.callback.PasswordCallback;
  -import javax.security.auth.Subject;
  +import javax.security.auth.callback.UnsupportedCallbackException;
   
  -import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  +import org.apache.geronimo.gbean.GAttributeInfo;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GConstructorInfo;
   import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  -import org.apache.geronimo.security.bridge.AbstractRealmBridge;
  +import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   
   /**
    * ConfiguredIdentityRealmBridge supplies a constant mapping between realms:
  @@ -79,15 +82,17 @@
    * */
   public class ConfiguredIdentityUserPasswordRealmBridge extends AbstractRealmBridge {
   
  +    private static final GBeanInfo GBEAN_INFO;
  +
       private String configuredUser;
       private char[] configuredPassword;
   
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  -        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  -        mbeanInfo.setTargetClass(ConfiguredIdentityUserPasswordRealmBridge.class);
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ConfiguredUser", true, true,
"Name of user to log in as"));
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ConfiguredPassword", true,
true, "Password of user to log in as"));
  -        return mbeanInfo;
  +    public ConfiguredIdentityUserPasswordRealmBridge() {}
  +
  +    public ConfiguredIdentityUserPasswordRealmBridge(String targetRealm, String configuredUser,
String configuredPassword) {
  +        super(targetRealm);
  +        this.configuredUser = configuredUser;
  +        setConfiguredPassword(configuredPassword);
       }
   
       public String getConfiguredUser() {
  @@ -99,7 +104,7 @@
       }
   
       public String getConfiguredPassword() {
  -        return new String(configuredPassword);
  +        return configuredPassword == null? null:new String(configuredPassword);
       }
   
       public void setConfiguredPassword(String configuredPassword) {
  @@ -124,4 +129,27 @@
   
           };
       }
  +
  +    static {
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(ConfiguredIdentityUserPasswordRealmBridge.class.getName(),
AbstractRealmBridge.getGBeanInfo());
  +        infoFactory.addAttribute(new GAttributeInfo("ConfiguredUser", true));
  +        infoFactory.addAttribute(new GAttributeInfo("ConfiguredPassword", true));
  +        infoFactory.setConstructor(new GConstructorInfo(
  +                new String[] {"TargetRealm", "ConfiguredUser", "ConfiguredPassword"},
  +                new Class[] {String.class, String.class, String.class}));
  +        GBEAN_INFO = infoFactory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +
  +    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  +        GeronimoMBeanInfo mbeanInfo = AbstractRealmBridge.getGeronimoMBeanInfo();
  +        mbeanInfo.setTargetClass(ConfiguredIdentityUserPasswordRealmBridge.class);
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ConfiguredUser", true, true,
"Name of user to log in as"));
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("ConfiguredPassword", true,
true, "Password of user to log in as"));
  +        return mbeanInfo;
  +    }
  +
   }
  
  
  
  1.2       +54 -10    incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/PropertiesFilePrincipalMappingUserPasswordRealmBridge.java
  
  Index: PropertiesFilePrincipalMappingUserPasswordRealmBridge.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/PropertiesFilePrincipalMappingUserPasswordRealmBridge.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertiesFilePrincipalMappingUserPasswordRealmBridge.java	11 Jan 2004 08:27:02 -0000
1.1
  +++ PropertiesFilePrincipalMappingUserPasswordRealmBridge.java	20 Jan 2004 06:12:45 -0000
1.2
  @@ -66,26 +66,49 @@
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.geronimo.security.bridge.AbstractPrincipalMappingUserPasswordRealmBridge;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GAttributeInfo;
  +import org.apache.geronimo.gbean.GConstructorInfo;
   
   /**
  + * works off a property file with lines of the format:
  + * sourceprincipalname=targetprincipal:targetuser:targetpassword
    *
  + * all three can be mapped separately; the source for each key is
  + * from the appropriate principal class and possibly
  + * callback name.
    *
    * @version $Revision$ $Date$
    *
    * */
  -public class PropertiesFilePrincipalMappingUserPasswordRealmBridge extends AbstractPrincipalMappingUserPasswordRealmBridge{
  +public class PropertiesFilePrincipalMappingUserPasswordRealmBridge extends AbstractPrincipalMappingUserPasswordRealmBridge
{
  +
  +    private static final GBeanInfo GBEAN_INFO;
   
       private URL propertyFileURL;
   
  -    public URL getPropertyFileURL() {
  -        return propertyFileURL;
  +    public PropertiesFilePrincipalMappingUserPasswordRealmBridge() {
       }
   
  -    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  -        GeronimoMBeanInfo mbeanInfo = AbstractPrincipalMappingUserPasswordRealmBridge.getGeronimoMBeanInfo();
  -        mbeanInfo.setTargetClass(PropertiesFilePrincipalMappingUserPasswordRealmBridge.class);
  -        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PropertyFileURL", true, true,
"URL to read the mapping from in sourcePrincipal=targetPrincipal:targetUserName:targetPassword
format0"));
  -        return mbeanInfo;
  +    public PropertiesFilePrincipalMappingUserPasswordRealmBridge(String targetRealm,
  +                                                                 Class principalSourceType,
  +                                                                 String principalTargetCallbackName,
  +                                                                 Class userNameSourceType,
  +                                                                 String userNameTargetCallbackName,
  +                                                                 Class passwordSourceType,
  +                                                                 URL propertyFileURL) {
  +        super(targetRealm,
  +                principalSourceType,
  +                principalTargetCallbackName,
  +                userNameSourceType,
  +                userNameTargetCallbackName,
  +                passwordSourceType);
  +        this.propertyFileURL = propertyFileURL;
  +    }
  +
  +    public URL getPropertyFileURL() {
  +        return propertyFileURL;
       }
   
       public void setPropertyFileURL(URL propertyFileURL) throws IOException {
  @@ -102,7 +125,7 @@
           for (Iterator iterator = properties.entrySet().iterator(); iterator.hasNext();)
{
               Map.Entry entry = (Map.Entry) iterator.next();
               String key = (String) entry.getKey();
  -            String values = (String)entry.getValue();
  +            String values = (String) entry.getValue();
               StringTokenizer tokenizer = new StringTokenizer(values, ":");
               String targetPrincipal = tokenizer.nextToken();
               String targetUserName = tokenizer.nextToken();
  @@ -112,4 +135,25 @@
               passwordMap.put(key, targetPassword);
           }
       }
  +
  +    static {
  +        GBeanInfoFactory infoFactory = new GBeanInfoFactory(PropertiesFilePrincipalMappingUserPasswordRealmBridge.class.getName(),
AbstractPrincipalMappingUserPasswordRealmBridge.getGBeanInfo());
  +        infoFactory.addAttribute(new GAttributeInfo("PropertyFileURL", true));
  +        infoFactory.setConstructor(new GConstructorInfo(
  +                new String[]{"TargetRealm", "PrincipalSourceType", "PrincipalTargetCallbackName",
"UserNameSourceType", "UserNameTargetCallbackName", "PasswordSourceType", "PropertyFileURL"},
  +                new Class[]{String.class, Class.class, String.class, Class.class, String.class,
Class.class, URL.class}));
  +        GBEAN_INFO = infoFactory.getBeanInfo();
  +    }
  +
  +    public static GBeanInfo getGBeanInfo() {
  +        return GBEAN_INFO;
  +    }
  +
  +    public static GeronimoMBeanInfo getGeronimoMBeanInfo() {
  +        GeronimoMBeanInfo mbeanInfo = AbstractPrincipalMappingUserPasswordRealmBridge.getGeronimoMBeanInfo();
  +        mbeanInfo.setTargetClass(PropertiesFilePrincipalMappingUserPasswordRealmBridge.class);
  +        mbeanInfo.addAttributeInfo(new GeronimoAttributeInfo("PropertyFileURL", true, true,
"URL to read the mapping from in sourcePrincipal=targetPrincipal:targetUserName:targetPassword
format0"));
  +        return mbeanInfo;
  +    }
  +
   }
  
  
  
  1.7       +1 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java
  
  Index: SQLSecurityRealm.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SQLSecurityRealm.java	20 Jan 2004 01:36:59 -0000	1.6
  +++ SQLSecurityRealm.java	20 Jan 2004 06:12:45 -0000	1.7
  @@ -315,7 +315,6 @@
   
       static {
           GBeanInfoFactory infoFactory = new GBeanInfoFactory(PropertiesFileSecurityRealm.class.getName(),
AbstractSecurityRealm.getGBeanInfo());
  -        infoFactory.addAttribute(new GAttributeInfo("RealmName", true));
           infoFactory.addAttribute(new GAttributeInfo("ConnectionURL", true));
           infoFactory.addAttribute(new GAttributeInfo("User", true));
           infoFactory.addAttribute(new GAttributeInfo("Password", true));
  
  
  
  1.2       +2 -5      incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge/ConfiguredIdentityUserPasswordBridgeTest.java
  
  Index: ConfiguredIdentityUserPasswordBridgeTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge/ConfiguredIdentityUserPasswordBridgeTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfiguredIdentityUserPasswordBridgeTest.java	11 Jan 2004 08:27:03 -0000	1.1
  +++ ConfiguredIdentityUserPasswordBridgeTest.java	20 Jan 2004 06:12:45 -0000	1.2
  @@ -70,10 +70,7 @@
   
       protected void setUp() {
           super.setUp();
  -        bridge = new ConfiguredIdentityUserPasswordRealmBridge();
  -        bridge.setTargetRealm(TestRealm.REALM_NAME);
  -        bridge.setConfiguredUser(AbstractUserPasswordBridgeTest.USER);
  -        bridge.setConfiguredPassword(AbstractUserPasswordBridgeTest.PASSWORD);
  +        bridge = new ConfiguredIdentityUserPasswordRealmBridge(TestRealm.REALM_NAME, AbstractUserPasswordBridgeTest.USER,
AbstractUserPasswordBridgeTest.PASSWORD);
       }
       public void testConfiguredIdentityBridge() throws Exception {
           Subject sourceSubject = new Subject();
  
  
  

Mime
View raw message