You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by vk...@apache.org on 2008/09/30 17:54:13 UTC

svn commit: r700511 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao...

Author: vkumar
Date: Tue Sep 30 08:54:12 2008
New Revision: 700511

URL: http://svn.apache.org/viewvc?rev=700511&view=rev
Log:
LDAP replication: Adding new beans in Assembly and methods for replication from database to ldap

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java   (with props)
Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/EntityRelationDAO.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-spi.xml

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/SecurityEntityManager.java Tue Sep 30 08:54:12 2008
@@ -43,7 +43,9 @@
 
     Collection<Entity> getRelatedEntitiesTo(Entity toEntity, SecurityEntityRelationType relationType);
 
-    void addRelatedEntity(Entity entity, Entity relatedEntity, SecurityEntityRelationType relationType);
+    void addRelation(Entity fromEntity, Entity toEntity, SecurityEntityRelationType relationType);
+    
+    void removeRelation(Entity fromEntity, Entity toEntity, SecurityEntityRelationType relationType);
 
     EntityFactory getEntityFactory(String entityType);
     

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/DefaultLDAPEntityManager.java Tue Sep 30 08:54:12 2008
@@ -77,7 +77,7 @@
                 fromEntityType, targetEntityType));
     }
 
-    public void addRelatedEntity(Entity sourceEntity, Entity targetEntity,
+    public void addRelation(Entity sourceEntity, Entity targetEntity,
             SecurityEntityRelationType relationType)
     {
         EntityRelationDAO relationDAO = entityRelationDAOs.get(relationType);
@@ -94,12 +94,18 @@
             }         
             if (relationDAO != null)
             {
-                relationDAO.relate(sourceDAO, targetDAO, sourceEntity,
+                relationDAO.addRelation(sourceDAO, targetDAO, sourceEntity,
                         targetEntity);
             }
         }
     }
-
+    
+    public void removeRelation(Entity entity, Entity relatedEntity, SecurityEntityRelationType relationType)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+   
     public Collection<Entity> getAllEntities(String entityType)
     {
         EntityDAO dao = entityDAOs.get(entityType);
@@ -172,7 +178,4 @@
         
         return dao != null ? dao.getEntityFactory() : null;
     }
-    
-    
-    
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/EntityRelationDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/EntityRelationDAO.java?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/EntityRelationDAO.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/EntityRelationDAO.java Tue Sep 30 08:54:12 2008
@@ -36,7 +36,9 @@
     Collection<Entity> getRelatedEntitiesTo(EntityDAO fromDao,
             EntityDAO toDao, Entity toEntity);
 
-    void relate(EntityDAO sourceDao, EntityDAO targetDao, Entity sourceEntity,
+    void addRelation(EntityDAO sourceDao, EntityDAO targetDao, Entity sourceEntity,
             Entity targetEntity);
 
+    void removeRelation(EntityDAO sourceDao, EntityDAO targetDao, Entity sourceEntity,
+                Entity targetEntity);   
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/impl/AttributeBasedRelationDAO.java Tue Sep 30 08:54:12 2008
@@ -27,83 +27,68 @@
 import org.apache.jetspeed.security.mapping.model.Entity;
 
 /**
- * DAO for fetching relationships between LDAP entities. A relationship between
- * two entities is created by adding an attribute value to either the entity on
- * the "from" site of the relationship, or the entity on the other side ("to").
- * 
- * An example: a relation "hasRole" from one entity (e.g. of type "user") to
- * another entity (e.g. of type "role"), can be defined by using an attribute
- * "role" on the user, which is a multi-value attribute. The value of that
- * attribute uniquely identifies the role (the id of the role entity). The
- * relationship can also be defined by specifying an attribute on the role which
- * holds the unique id of the user, e.g. through a multi-value "member"
- * attribute.
+ * DAO for fetching relationships between LDAP entities. A relationship between two entities is created by adding an attribute value to either the entity on the
+ * "from" site of the relationship, or the entity on the other side ("to"). An example: a relation "hasRole" from one entity (e.g. of type "user") to another
+ * entity (e.g. of type "role"), can be defined by using an attribute "role" on the user, which is a multi-value attribute. The value of that attribute uniquely
+ * identifies the role (the id of the role entity). The relationship can also be defined by specifying an attribute on the role which holds the unique id of the
+ * user, e.g. through a multi-value "member" attribute.
  * 
  * @author <a href="mailto:ddam@apache.org">Dennis Dam</a>
  * @version $Id$
  */
 public class AttributeBasedRelationDAO extends AbstractRelationDAO
 {
-
     private String relationAttribute;
-
     private boolean useFromEntityAttribute;
-
     private boolean attributeContainsInternalId; // if internal ID ( = DN) is
-                                                 // not used, then the attribute
-                                                 // contains the ID(s).
 
-    public Collection<Entity> getRelatedEntitiesFrom(EntityDAO fromDAO,
-            EntityDAO toDAO, Entity fromEntity)
+    // not used, then the attribute
+    // contains the ID(s).
+    public Collection<Entity> getRelatedEntitiesFrom(EntityDAO fromDAO, EntityDAO toDAO, Entity fromEntity)
     {
-       return internalGetRelatedEntities( fromDAO, toDAO, useFromEntityAttribute, fromEntity);               
+        return internalGetRelatedEntities(fromDAO, toDAO, useFromEntityAttribute, fromEntity);
     }
 
-    public Collection<Entity> getRelatedEntitiesTo(EntityDAO fromDAO,
-            EntityDAO toDAO, Entity toEntity)
+    public Collection<Entity> getRelatedEntitiesTo(EntityDAO fromDAO, EntityDAO toDAO, Entity toEntity)
     {
-       return internalGetRelatedEntities(toDAO, fromDAO, !useFromEntityAttribute, toEntity);               
+        return internalGetRelatedEntities(toDAO, fromDAO, !useFromEntityAttribute, toEntity);
     }
-    
-    private Collection<Entity> internalGetRelatedEntities(EntityDAO fromDAO,
-            EntityDAO toDAO, boolean useFromEntityAttribute, Entity entity)
+
+    private Collection<Entity> internalGetRelatedEntities(EntityDAO fromDAO, EntityDAO toDAO, boolean useFromEntityAttribute, Entity entity)
     {
-        
         if (useFromEntityAttribute)
         {
-            Attribute relationAttrValue = entity
-                    .getAttribute(relationAttribute);
+            Attribute relationAttrValue = entity.getAttribute(relationAttribute);
             if (relationAttrValue != null)
             {
                 Collection<String> values = relationAttrValue.getValues();
                 if (attributeContainsInternalId)
                 {
                     return toDAO.getEntitiesByInternalId(values);
-                } else
+                }
+                else
                 {
                     return toDAO.getEntitiesById(values);
                 }
             }
-        } else
+        }
+        else
         {
             // can be either the id or the internalId of the from entity
-            String fromEntityUsedIdValue = attributeContainsInternalId ? getInternalId(
-                    entity, fromDAO)
-                    : entity.getId();
+            String fromEntityUsedIdValue = attributeContainsInternalId ? getInternalId(entity, fromDAO) : entity.getId();
             // TODO : throw exception when no ID / internal ID can be found for
             // the entity
             if (!StringUtils.isEmpty(fromEntityUsedIdValue))
             {
                 // fetch entities using target Entity DAO with a specific filter
                 // on the member attribute
-                Filter roleMemberAttrFilter = new EqualsFilter(
-                        relationAttribute, fromEntityUsedIdValue);
+                Filter roleMemberAttrFilter = new EqualsFilter(relationAttribute, fromEntityUsedIdValue);
                 return toDAO.getEntities(roleMemberAttrFilter);
             }
         }
         return null;
     }
-    
+
     private String getInternalId(Entity entity, EntityDAO entityDao)
     {
         if (StringUtils.isEmpty(entity.getInternalId()))
@@ -112,19 +97,13 @@
             // LDAP store
             entity = entityDao.getEntity(entity.getId());
             return entity.getInternalId();
-        } else
+        }
+        else
         {
             return entity.getInternalId();
         }
     }
 
-    public void relate(EntityDAO sourceDao, EntityDAO targetDao,
-            Entity sourceEntity, Entity targetEntity)
-    {
-        // TODO Auto-generated method stub
-
-    }
-
     public void setRelationAttribute(String relationAttribute)
     {
         this.relationAttribute = relationAttribute;
@@ -135,10 +114,87 @@
         this.useFromEntityAttribute = useFromEntityAttribute;
     }
 
-    public void setAttributeContainsInternalId(
-            boolean attributeContainsInternalId)
+    public void setAttributeContainsInternalId(boolean attributeContainsInternalId)
     {
         this.attributeContainsInternalId = attributeContainsInternalId;
     }
 
+    private void internalAddRelation(EntityDAO fromEntityDAO, EntityDAO toEntityDAO, Entity fromEntity, Entity toEntity)
+    {
+        String attrValue = null;
+        if (attributeContainsInternalId)
+        {
+            if (toEntity.getInternalId() == null)
+            {
+                // internal ID (ldap DN) is not present, refetch the entity from LDAP to get the DN
+                toEntity = toEntityDAO.getEntity(toEntity.getId());
+            }
+            attrValue = toEntity.getInternalId();
+        }
+        else
+        {
+            attrValue = toEntity.getId();
+        }
+        Attribute relationAttribute = fromEntity.getAttribute(this.relationAttribute);
+        if (relationAttribute.getDefinition().isMultiValue())
+        {
+            relationAttribute.getValues().add(attrValue);
+        }
+        else
+        {
+            relationAttribute.setValue(attrValue);
+        }
+        fromEntityDAO.update(fromEntity);
+    }
+
+    private void internalRemoveRelation(EntityDAO fromEntityDAO, EntityDAO toEntityDAO, Entity fromEntity, Entity toEntity)
+    {
+        String attrValue = null;
+        if (attributeContainsInternalId)
+        {
+            if (toEntity.getInternalId() == null)
+            {
+                // internal ID (ldap DN) is not present, refetch the entity from LDAP to get the DN
+                toEntity = toEntityDAO.getEntity(toEntity.getId());
+            }
+            attrValue = toEntity.getInternalId();
+        }
+        else
+        {
+            attrValue = toEntity.getId();
+        }
+        Attribute relationAttribute = fromEntity.getAttribute(this.relationAttribute);
+        if (relationAttribute.getDefinition().isMultiValue())
+        {
+            relationAttribute.getValues().remove(attrValue);
+        }
+        else
+        {
+            relationAttribute.setValue(null);
+        }
+        fromEntityDAO.update(fromEntity);
+    }
+    public void addRelation(EntityDAO sourceDao, EntityDAO targetDao, Entity sourceEntity, Entity targetEntity)
+    {
+        if (useFromEntityAttribute)
+        {
+            internalAddRelation(targetDao, sourceDao, targetEntity, sourceEntity);
+        }
+        else
+        {
+            internalAddRelation(sourceDao, targetDao, sourceEntity, targetEntity);
+        }
+    }
+
+    public void removeRelation(EntityDAO sourceDao, EntityDAO targetDao, Entity sourceEntity, Entity targetEntity)
+    {
+        if (useFromEntityAttribute)
+        {
+            internalRemoveRelation(targetDao, sourceDao, targetEntity, sourceEntity);
+        }
+        else
+        {
+            internalRemoveRelation(sourceDao, targetDao, sourceEntity, targetEntity);
+        }
+    }
 }

Added: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java?rev=700511&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java Tue Sep 30 08:54:12 2008
@@ -0,0 +1,64 @@
+/*
+ * 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.jetspeed.security.spi.impl;
+
+import org.apache.jetspeed.security.JetspeedPrincipal;
+import org.apache.jetspeed.security.SecurityException;
+import org.apache.jetspeed.security.mapping.EntityFactory;
+import org.apache.jetspeed.security.mapping.SecurityEntityManager;
+import org.apache.jetspeed.security.mapping.SecurityEntityRelationType;
+import org.apache.jetspeed.security.mapping.impl.SecurityEntityRelationTypeImpl;
+import org.apache.jetspeed.security.mapping.model.Entity;
+import org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager;
+
+/**
+ * @author <a href="mailto:vkumar@apache.org">Vivek Kumar</a>
+ * @version $Id:
+ */
+public class JetspeedPrincipalLdapAssociationStorageManager implements JetspeedPrincipalAssociationStorageManager
+{
+    private SecurityEntityManager ldapEntityManager;
+
+    /**
+     * @param ldapEntityManager
+     */
+    public JetspeedPrincipalLdapAssociationStorageManager(SecurityEntityManager ldapEntityManager)
+    {
+        this.ldapEntityManager = ldapEntityManager;
+    }
+
+    public void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
+    {
+        EntityFactory entityFactory = ldapEntityManager.getEntityFactory(from.getType().getName());
+        EntityFactory relatedFactory = ldapEntityManager.getEntityFactory(to.getType().getName());
+        Entity fromEntity = entityFactory.createEntity(from);
+        Entity toEntity = relatedFactory.createEntity(to);
+        SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
+        ldapEntityManager.addRelation(fromEntity, toEntity, relationType);
+    }
+
+    public void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, String associationName) throws SecurityException
+    {
+        EntityFactory entityFactory = ldapEntityManager.getEntityFactory(from.getType().getName());
+        EntityFactory relatedFactory = ldapEntityManager.getEntityFactory(to.getType().getName());
+        Entity fromEntity = entityFactory.createEntity(from);
+        Entity toEntity = relatedFactory.createEntity(to);
+        SecurityEntityRelationType relationType = new SecurityEntityRelationTypeImpl(associationName, fromEntity.getType(), toEntity.getType());
+        ldapEntityManager.removeRelation(fromEntity, toEntity, relationType);
+        
+    }
+}

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedPrincipalLdapAssociationStorageManager.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml Tue Sep 30 08:54:12 2008
@@ -18,6 +18,33 @@
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
+  <bean id="JetspeedPrincipalStorageManager" class="org.apache.jetspeed.security.spi.impl.JetspeedPrincipalLdapStorageManager">
+  	<meta key="j2:cat" value="ldap" />
+    	<constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+  </bean>
+  
+   <bean id="org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager" parent="baseTransactionProxy">
+    <meta key="j2:cat" value="ldap" />
+    <property name="proxyInterfaces">
+      <value>org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager</value>
+    </property>
+    <property name="target">
+      <ref bean="JetspeedPrincipalStorageManager" />
+    </property>
+    <property name="transactionAttributes">
+      <props>
+        <prop key="*">PROPAGATION_REQUIRED</prop>
+      </props>
+    </property>
+  </bean>
+  
+  
+   <bean id="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" 
+  	class="org.apache.jetspeed.security.spi.impl.JetspeedPrincipalLdapAssociationStorageManager">  	
+  		<meta key="j2:cat" value="ldap" />  	
+    </bean>  	
+  
+  
   <!--
   	JetspeedPostContextLoader will load the guest user from LDAP, in-case its not in portal database
   	It would be required for loading default page  

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml Tue Sep 30 08:54:12 2008
@@ -136,7 +136,7 @@
     <constructor-arg index="1" ref="org.apache.jetspeed.security.JetspeedPrincipalType.role" />
     <constructor-arg index="2" ref="org.apache.jetspeed.security.JetspeedPrincipalType.group" />
     <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
-    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager" />
     <constructor-arg index="5" ref="org.apache.jetspeed.security.spi.UserPasswordCredentialManager" />
   </bean>
 
@@ -170,7 +170,7 @@
     <constructor-arg index="1" ref="org.apache.jetspeed.security.JetspeedPrincipalType.user" />
     <constructor-arg index="2" ref="org.apache.jetspeed.security.JetspeedPrincipalType.role" />
     <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
-    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager" />
   </bean>
 
   <!-- Security: Role Manager -->
@@ -203,12 +203,12 @@
     <constructor-arg index="1" ref="org.apache.jetspeed.security.JetspeedPrincipalType.user" />
     <constructor-arg index="2" ref="org.apache.jetspeed.security.JetspeedPrincipalType.group" />
     <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
-    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="4" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager" />
   </bean>
 
   <!-- Security: Permission Manager -->
 
-  <bean id="org.apache.jetspeed.security.PermissionManager" parent="baseTransactionProxy" name="permissionManager">
+  <bean id="org.apache.jetspeed.security.PermissionManager" parent="baseTransactionProxy">
     <meta key="j2:cat" value="default,security" />
     <property name="proxyInterfaces">
       <value>org.apache.jetspeed.security.PermissionManager</value>
@@ -262,7 +262,7 @@
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.UserManager" />
     <constructor-arg index="1" ref="org.apache.jetspeed.security.RoleManager" />
-    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
 
   <bean id="userIsMemberOfGroupAssociationHandler"
@@ -270,7 +270,7 @@
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.UserManager" />
     <constructor-arg index="1" ref="org.apache.jetspeed.security.GroupManager" />
-    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
 
   <bean id="groupIsMemberOfRoleAssociationHandler"
@@ -278,35 +278,35 @@
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
     <constructor-arg index="1" ref="org.apache.jetspeed.security.RoleManager" />
-    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
 
   <bean id="roleIsARoleAssociationHandler"
     class="org.apache.jetspeed.security.spi.impl.IsAPrincipalAssociationHandler">
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.RoleManager" />
-    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
   
   <bean id="roleIsPartOfRoleAssociationHandler"
     class="org.apache.jetspeed.security.spi.impl.IsPartOfPrincipalAssociationHandler">
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.RoleManager" />
-    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
   
   <bean id="groupIsAGroupAssociationHandler"
     class="org.apache.jetspeed.security.spi.impl.IsAPrincipalAssociationHandler">
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
-    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
   
   <bean id="groupIsPartOfGroupAssociationHandler"
     class="org.apache.jetspeed.security.spi.impl.IsPartOfPrincipalAssociationHandler">
     <meta key="j2:cat" value="default,security" />
     <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
-    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+    <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" />
   </bean>
   
   <bean id="userSubjectRolesResolver" class="org.apache.jetspeed.security.spi.impl.UserSubjectPrincipalsResolverImpl">
@@ -389,5 +389,4 @@
       </list>
     </constructor-arg>
   </bean>
-
 </beans>
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-spi.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-spi.xml?rev=700511&r1=700510&r2=700511&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-spi.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-spi.xml Tue Sep 30 08:54:12 2008
@@ -29,7 +29,9 @@
     </constructor-arg>
   </bean>
   
-  <bean id="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" parent="baseTransactionProxy">
+  <bean id="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" 
+  name="org.apache.jetspeed.security.spi.JetspeedPrincipalStorageManager,org.apache.jetspeed.security.spi.JetspeedPrincipalAssociationStorageManager" 
+  parent="baseTransactionProxy">
     <meta key="j2:cat" value="default,security" />
     <property name="proxyInterfaces">
       <value>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org