geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r109915 - in geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security: . jacc util
Date Sun, 05 Dec 2004 22:11:08 GMT
Author: djencks
Date: Sun Dec  5 14:11:07 2004
New Revision: 109915

URL: http://svn.apache.org/viewcvs?view=rev&rev=109915
Log:
remove unused classes and clean up, and fix GERONIMO-515 and GERONIMO-516
Removed:
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ModuleConfiguration.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationEJB.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationWeb.java
Modified:
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
   geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityService.java
Sun Dec  5 14:11:07 2004
@@ -29,17 +29,13 @@
  */
 public interface SecurityService {
 
-    String getPolicyConfigurationFactory();
+//    Collection getRealms() throws GeronimoSecurityException;
+//
+//    void setRealms(Collection realms);
 
-    void setPolicyConfigurationFactory(String policyConfigurationFactory);
+//    Collection getModuleConfigurations();
 
-    Collection getRealms() throws GeronimoSecurityException;
-
-    void setRealms(Collection realms);
-
-    Collection getModuleConfigurations();
-
-    void setModuleConfigurations(Collection moduleConfigurations);
+//    void setModuleConfigurations(Collection moduleConfigurations);
 
     AutoMapAssistant getMapper(String name);
 }

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
Sun Dec  5 14:11:07 2004
@@ -26,13 +26,13 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.common.GeronimoSecurityException;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.gbean.WaitingException;
+import org.apache.geronimo.gbean.ReferenceCollection;
+import org.apache.geronimo.gbean.ReferenceCollectionEvent;
+import org.apache.geronimo.gbean.ReferenceCollectionListener;
 import org.apache.geronimo.security.jacc.GeronimoPolicy;
-import org.apache.geronimo.security.jacc.ModuleConfiguration;
+import org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory;
 import org.apache.geronimo.security.jacc.PolicyContextHandlerContainerSubject;
 import org.apache.geronimo.security.jacc.PolicyContextHandlerHttpServletRequest;
 import org.apache.geronimo.security.jacc.PolicyContextHandlerSOAPMessage;
@@ -46,87 +46,120 @@
  *
  * @version $Rev$ $Date$
  */
-public class SecurityServiceImpl implements SecurityService, GBeanLifecycle {
+public class SecurityServiceImpl implements SecurityService {
 
     private final Log log = LogFactory.getLog(SecurityService.class);
 
-    private String policyConfigurationFactory;
-    private Collection realms = Collections.EMPTY_SET;
-    private Collection mappers = Collections.EMPTY_SET;
-    private Collection moduleConfigurations = Collections.EMPTY_SET;
-
+    private final Collection realms;
+    private final Collection mappers;
 
     /**
      * Permissions that protect access to sensitive security information
      */
     public static final GeronimoSecurityPermission CONFIGURE = new GeronimoSecurityPermission("configure");
 
-    public SecurityServiceImpl(String policyConfigurationFactory) {
+    public SecurityServiceImpl(String policyConfigurationFactory,
+                               Collection realms,
+                               Collection mappers) throws PolicyContextException, ClassNotFoundException
{
         /**
-         *  @see "JSR 115 4.6.1" Container Subject Policy Contact Handler
+         *  @see "JSR 115 4.6.1" Container Subject Policy Context Handler
          */
-        try {
-            ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerContainerSubject(),
true);
-            ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerSOAPMessage(),
true);
-            ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerHttpServletRequest(),
true);
-        } catch (PolicyContextException pce) {
-            log.error("Exception in doStart()", pce);
+        ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerContainerSubject(),
true);
+        ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerSOAPMessage(),
true);
+        ConfigurationUtil.registerPolicyContextHandler(new PolicyContextHandlerHttpServletRequest(),
true);
 
-            throw (IllegalStateException) new IllegalStateException().initCause(pce);
-        }
-        
-        this.policyConfigurationFactory = policyConfigurationFactory;
-        //TODO remove this if wrapper when GeronimoMBean leaves.
         if (policyConfigurationFactory != null) {
             System.setProperty("javax.security.jacc.PolicyConfigurationFactory.provider",
policyConfigurationFactory);
         }
-    }
-
-    public String getPolicyConfigurationFactory() {
-        return policyConfigurationFactory;
-    }
+        PolicyConfigurationFactory factory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
+        GeronimoPolicyConfigurationFactory geronimoPolicyConfigurationFactory = (GeronimoPolicyConfigurationFactory)
factory;
+        Policy.setPolicy(new GeronimoPolicy(geronimoPolicyConfigurationFactory));
+        if (realms == null) {
+            this.realms = Collections.EMPTY_SET;
+        } else {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                sm.checkPermission(CONFIGURE);
+            }
+            this.realms = realms;
+            ((ReferenceCollection) realms).addReferenceCollectionListener(new ReferenceCollectionListener()
{
 
-    public void setPolicyConfigurationFactory(String policyConfigurationFactory) {
-        this.policyConfigurationFactory = policyConfigurationFactory;
-        //TODO remove this if wrapper when GeronimoMBean leaves.
-        if (policyConfigurationFactory != null) {
-            System.setProperty("javax.security.jacc.PolicyConfigurationFactory.provider",
policyConfigurationFactory);
+                public void memberAdded(ReferenceCollectionEvent event) {
+                    SecurityManager sm = System.getSecurityManager();
+                    if (sm != null) {
+                        sm.checkPermission(CONFIGURE);
+                    }
+                }
+
+                public void memberRemoved(ReferenceCollectionEvent event) {
+                    SecurityManager sm = System.getSecurityManager();
+                    if (sm != null) {
+                        sm.checkPermission(CONFIGURE);
+                    }
+                }
+            });
         }
-    }
-
-    public Collection getRealms() throws GeronimoSecurityException {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(CONFIGURE);
-        return realms;
-    }
-
-
-    public void setRealms(Collection realms) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(CONFIGURE);
-        this.realms = realms;
-    }
-
-    public Collection getMappers() throws GeronimoSecurityException {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(CONFIGURE);
-        return mappers;
-    }
-
-
-    public void setMappers(Collection mappers) {
-        SecurityManager sm = System.getSecurityManager();
-        if (sm != null) sm.checkPermission(CONFIGURE);
-        this.mappers = mappers;
-    }
+        if (mappers == null) {
+            this.mappers = Collections.EMPTY_SET;
+        } else {
+            SecurityManager sm = System.getSecurityManager();
+            if (sm != null) {
+                sm.checkPermission(CONFIGURE);
+            }
+            this.mappers = mappers;
+            ((ReferenceCollection) mappers).addReferenceCollectionListener(new ReferenceCollectionListener()
{
 
-    public Collection getModuleConfigurations() {
-        return moduleConfigurations;
+                public void memberAdded(ReferenceCollectionEvent event) {
+                    SecurityManager sm = System.getSecurityManager();
+                    if (sm != null) {
+                        sm.checkPermission(CONFIGURE);
+                    }
+                }
+
+                public void memberRemoved(ReferenceCollectionEvent event) {
+                    SecurityManager sm = System.getSecurityManager();
+                    if (sm != null) {
+                        sm.checkPermission(CONFIGURE);
+                    }
+                }
+            });
+        }
+        log.info("Security service started");
     }
 
-    public void setModuleConfigurations(Collection moduleConfigurations) {
-        this.moduleConfigurations = moduleConfigurations;
-    }
+//    public Collection getRealms() throws GeronimoSecurityException {
+//        SecurityManager sm = System.getSecurityManager();
+//        if (sm != null) sm.checkPermission(CONFIGURE);
+//        return realms;
+//    }
+//
+//
+//    public void setRealms(Collection realms) {
+//        SecurityManager sm = System.getSecurityManager();
+//        if (sm != null) sm.checkPermission(CONFIGURE);
+//        this.realms = realms;
+//    }
+//
+//    public Collection getMappers() throws GeronimoSecurityException {
+//        SecurityManager sm = System.getSecurityManager();
+//        if (sm != null) sm.checkPermission(CONFIGURE);
+//        return mappers;
+//    }
+//
+//
+//    public void setMappers(Collection mappers) {
+//        SecurityManager sm = System.getSecurityManager();
+//        if (sm != null) sm.checkPermission(CONFIGURE);
+//        this.mappers = mappers;
+//    }
+
+//    public Collection getModuleConfigurations() {
+//        return moduleConfigurations;
+//    }
+//
+//    public void setModuleConfigurations(Collection moduleConfigurations) {
+//        this.moduleConfigurations = moduleConfigurations;
+//    }
 
     public SecurityRealm getRealm(String name) {
         for (Iterator iter = realms.iterator(); iter.hasNext();) {
@@ -148,20 +181,6 @@
         return null;
     }
 
-    public void doStart() throws WaitingException, Exception {
-        PolicyConfigurationFactory factory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
-        Policy.setPolicy(new GeronimoPolicy(factory));
-
-        log.info("Security service started");
-    }
-
-    public void doStop() throws WaitingException, Exception {
-        log.info("Security service stopped");
-    }
-
-    public void doFail() {
-        log.info("Security service failed");
-    }
 
     public static final GBeanInfo GBEAN_INFO;
 
@@ -172,11 +191,10 @@
 
         infoFactory.addReference("Realms", SecurityRealm.class);
         infoFactory.addReference("Mappers", AutoMapAssistant.class);
-        infoFactory.addReference("ModuleConfigurations", ModuleConfiguration.class);
         infoFactory.addOperation("getRealm", new Class[]{String.class});
         infoFactory.addOperation("getMapper", new Class[]{String.class});
 
-        infoFactory.setConstructor(new String[]{"policyConfigurationFactory"});
+        infoFactory.setConstructor(new String[]{"policyConfigurationFactory", "Realms", "Mappers"});
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicy.java
Sun Dec  5 14:11:07 2004
@@ -22,8 +22,6 @@
 import java.security.PermissionCollection;
 import java.security.Policy;
 import java.security.ProtectionDomain;
-
-import javax.security.jacc.PolicyConfigurationFactory;
 import javax.security.jacc.PolicyContext;
 import javax.security.jacc.PolicyContextException;
 
@@ -34,13 +32,13 @@
  */
 public class GeronimoPolicy extends Policy {
     private final Policy root;
-    private final PolicyConfigurationFactory factory;
+    private final GeronimoPolicyConfigurationFactory factory;
 
-    public GeronimoPolicy(PolicyConfigurationFactory factory) {
+    public GeronimoPolicy(GeronimoPolicyConfigurationFactory factory) {
         this(factory, null);
     }
 
-    public GeronimoPolicy(PolicyConfigurationFactory factory, Policy root) {
+    public GeronimoPolicy(GeronimoPolicyConfigurationFactory factory, Policy root) {
         this.factory = factory;
         this.root = root;
     }
@@ -56,7 +54,7 @@
         String contextID = PolicyContext.getContextID();
         if (contextID != null) {
             try {
-                GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration)factory.getPolicyConfiguration(contextID,
false);
+                GeronimoPolicyConfiguration configuration = factory.getGeronimoPolicyConfiguration(contextID);
 
                 if (configuration.inService()) {
                     if (configuration.implies(domain, permission)) return true;

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfiguration.java
Sun Dec  5 14:11:07 2004
@@ -28,4 +28,7 @@
 
 public interface GeronimoPolicyConfiguration extends RoleMappingConfiguration {
     public boolean implies(ProtectionDomain domain, Permission permission);
-}
+
+    public void open(boolean remove);
+
+}
\ No newline at end of file

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/GeronimoPolicyConfigurationFactory.java
Sun Dec  5 14:11:07 2004
@@ -19,12 +19,10 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.security.jacc.PolicyConfiguration;
 import javax.security.jacc.PolicyConfigurationFactory;
 import javax.security.jacc.PolicyContextException;
 
-import org.apache.geronimo.security.jacc.GeronimoPolicyConfiguration;
 import org.apache.geronimo.security.GeronimoSecurityPermission;
 
 
@@ -42,14 +40,22 @@
         configurations.put(contextID, configuration);
     }
 
+    public GeronimoPolicyConfiguration getGeronimoPolicyConfiguration(String contextID) throws
PolicyContextException {
+        GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration) configurations.get(contextID);
+        if (configuration == null) {
+            throw new PolicyContextException("No policy configuration registered for contextID:
" + contextID);
+        }
+        return configuration;
+    }
+
     public PolicyConfiguration getPolicyConfiguration(String contextID, boolean remove) throws
PolicyContextException {
-        PolicyConfigurationGeneric configuration = (PolicyConfigurationGeneric) configurations.get(contextID);
+        GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration) configurations.get(contextID);
 
-        if (configuration == null || remove) {
+        if (configuration == null) {
             configuration = new PolicyConfigurationGeneric(contextID);
             configurations.put(contextID, configuration);
         } else {
-            configuration.open();
+            configuration.open(remove);
         }
 
         return configuration;

Deleted: /geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ModuleConfiguration.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/ModuleConfiguration.java?view=auto&rev=109914
==============================================================================

Deleted: /geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationEJB.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationEJB.java?view=auto&rev=109914
==============================================================================

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationGeneric.java
Sun Dec  5 14:11:07 2004
@@ -34,7 +34,6 @@
 
 
 /**
- *
  * @version $Rev$ $Date$
  */
 public class PolicyConfigurationGeneric implements GeronimoPolicyConfiguration {
@@ -44,12 +43,12 @@
 
     private final String contextID;
     private int state;
-    private HashMap rolePermissionsMap = new HashMap();
-    private HashMap principalRoleMapping = new HashMap();
+    private final HashMap rolePermissionsMap = new HashMap();
+    private final HashMap principalRoleMapping = new HashMap();
     private Permissions unchecked = null;
     private Permissions excluded = null;
 
-    private HashMap principalPermissionsMap = new HashMap();
+    private final HashMap principalPermissionsMap = new HashMap();
 
     PolicyConfigurationGeneric(String contextID) {
         this.contextID = contextID;
@@ -191,7 +190,7 @@
     }
 
     public void commit() throws PolicyContextException {
-        if (state == DELETED) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
 
         Iterator principals = principalRoleMapping.keySet().iterator();
         while (principals.hasNext()) {
@@ -205,7 +204,7 @@
 
             Iterator roles = ((HashSet) principalRoleMapping.get(principal)).iterator();
             while (roles.hasNext()) {
-                Permissions permissions =  (Permissions) rolePermissionsMap.get(roles.next());
+                Permissions permissions = (Permissions) rolePermissionsMap.get(roles.next());
                 if (permissions == null) continue;
                 Enumeration rolePermissions = permissions.elements();
                 while (rolePermissions.hasMoreElements()) {
@@ -223,7 +222,14 @@
 
     //TODO I have no idea what side effects this might have, but it's needed in some form
from GeronimoPolicyConfigurationFactory.
     //see JACC spec 1.0 section 3.1.1.1 discussion of in service and deleted.
-    public void open() {
+    public void open(boolean remove) {
+        if (remove) {
+            rolePermissionsMap.clear();
+            principalRoleMapping.clear();
+            unchecked = null;
+            excluded = null;
+            principalPermissionsMap.clear();
+        }
         state = OPEN;
     }
 }

Deleted: /geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationWeb.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/jacc/PolicyConfigurationWeb.java?view=auto&rev=109914
==============================================================================

Modified: geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java
Url: http://svn.apache.org/viewcvs/geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java?view=diff&rev=109915&p1=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java&r1=109914&p2=geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java&r2=109915
==============================================================================
--- geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java
(original)
+++ geronimo/branches/djencks/jetty-deployer1/trunk/modules/security/src/java/org/apache/geronimo/security/util/URLPattern.java
Sun Dec  5 14:11:07 2004
@@ -28,7 +28,6 @@
  * method sets, complements of HTTP method sets, and HTTP method sets w/ transport restrictions
for URL patterns that
  * are found in the web deployment descriptor.
  * @version $Rev$ $Date$
- * @see org.apache.geronimo.security.jacc.ModuleConfiguration
  */
 public class URLPattern {
     private final static String[] HTTP_METHODS = {"GET", "POST", "PUT", "DELETE", "HEAD",
"OPTIONS", "TRACE"};
@@ -46,7 +45,6 @@
     /**
      * Construct an instance of the utility class for <code>WebModuleConfiguration</code>.
      * @param pat the URL pattern that this instance is to collect information on
-     * @see org.apache.geronimo.security.jacc.ModuleConfiguration
      * @see "JSR 115, section 3.1.3" Translating Servlet Deployment Descriptors
      */
     public URLPattern(String pat) {

Mime
View raw message