portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r700814 - in /portals/jetspeed-2/portal/branches/security-refactoring: components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/ components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping...
Date Wed, 01 Oct 2008 15:36:32 GMT
Author: ddam
Date: Wed Oct  1 08:36:32 2008
New Revision: 700814

URL: http://svn.apache.org/viewvc?rev=700814&view=rev
Log:
- add property "isIdAttribute" on AttributeDef, used during addition of Entities in ldap,
to fill an ldap attribute with the entity's ID. E.g. the inetOrgPerson ldap schema requires
an SN attribute (SN = SurName). In  the default configuration (see security-ldap.xml), the
sn attribute will be set to the principal's ID.

Modified:
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/LDAPEntityDAOConfiguration.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/AttributeDef.java
    portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/AttributeDefImpl.java
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/LDAPEntityDAOConfiguration.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/LDAPEntityDAOConfiguration.java?rev=700814&r1=700813&r2=700814&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/LDAPEntityDAOConfiguration.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/ldap/dao/LDAPEntityDAOConfiguration.java
Wed Oct  1 08:36:32 2008
@@ -40,6 +40,8 @@
     private Set<AttributeDef> attributeDefinitions;
 
     private String entityType;
+    
+    private String objectClass;
 
     public String getBaseDN()
     {
@@ -101,4 +103,14 @@
         this.entityType = entityType;
     }
 
+    public String getObjectClass()
+    {
+        return objectClass;
+    }
+    
+    public void setObjectClass(String objectClass)
+    {
+        this.objectClass = objectClass;
+    }
+    
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/AttributeDef.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/model/AttributeDef.java?rev=700814&r1=700813&r2=700814&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/AttributeDef.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/AttributeDef.java
Wed Oct  1 08:36:32 2008
@@ -34,5 +34,7 @@
     boolean isRequired();
     
     String getRequiredDefaultValue();
+    
+    boolean isIdAttribute();
 
 }

Modified: portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/AttributeDefImpl.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/model/impl/AttributeDefImpl.java?rev=700814&r1=700813&r2=700814&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/AttributeDefImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/mapping/model/impl/AttributeDefImpl.java
Wed Oct  1 08:36:32 2008
@@ -37,6 +37,8 @@
 
     private String requiredDefaultValue;
     
+    private boolean idAttribute;
+    
     public AttributeDefImpl(String name)
     {
         super();
@@ -119,16 +121,33 @@
         this.requiredDefaultValue = requiredDefaultValue;
     }
 
+    
     public AttributeDefImpl cfgRequired(boolean required){
         setRequired(required);
         return this;
     }
 
+    
+    public boolean isIdAttribute()
+    {
+        return idAttribute;
+    }
+
+    public void setIdAttribute(boolean idAttribute)
+    {
+        this.idAttribute = idAttribute;
+    }
+
     public AttributeDefImpl cfgRequiredDefaultValue(String requiredDefaultValue){
         setRequiredDefaultValue(requiredDefaultValue);
         return this;
     }
 
+    public AttributeDefImpl cfgIdAttribute(boolean isIdAttribute){
+        setIdAttribute(isIdAttribute);
+        return this;
+    }
+    
     @Override
     public int hashCode()
     {

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=700814&r1=700813&r2=700814&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
Wed Oct  1 08:36:32 2008
@@ -106,21 +106,33 @@
     <property name="searchDN" value="" />
     <property name="searchFilter">
       <bean class="org.apache.jetspeed.security.mapping.ldap.filter.SimpleFilter">
-        <constructor-arg index="0" value="(objectClass=person)" />
+        <constructor-arg index="0" value="(objectClass=inetOrgPerson)" />
       </bean>
     </property>
     <property name="ldapIdAttribute" value="uid" />
+    <property name="objectClass" value="inetOrgPerson"/>
     <property name="attributeDefinitions">
       <set>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="uid" />
           <constructor-arg  index="1" value="false" />
-          <constructor-arg  index="2" value="true" />
+          <constructor-arg  index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="cn" />
           <constructor-arg  index="1" value="false" />
-          <constructor-arg  index="2" value="true" />
+          <constructor-arg  index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
+        </bean>
+        <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
+          <constructor-arg type="java.lang.String" index="0" value="sn" />
+          <constructor-arg  index="1" value="false" />
+          <constructor-arg  index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="givenName" />
@@ -142,17 +154,22 @@
       </bean>
     </property>
     <property name="ldapIdAttribute" value="cn" />
+    <property name="objectClass" value="groupOfUniqueNames"/>
     <property name="attributeDefinitions">
       <set>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String"  index="0" value="uid" />
           <constructor-arg index="1" value="false" />
-          <constructor-arg index="2" value="true" />
+          <constructor-arg index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="cn" />
-          <constructor-arg index="1" value="false" />
-          <constructor-arg index="2" value="true" />
+          <constructor-arg index="1" value="false" /> 
+          <constructor-arg index="2" value="false" /> 
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="description" />
@@ -182,17 +199,22 @@
       </bean>
     </property>
     <property name="ldapIdAttribute" value="cn" />
+    <property name="objectClass" value="groupOfUniqueNames"/>
     <property name="attributeDefinitions">
       <set>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String"  index="0" value="uid" />
           <constructor-arg index="1" value="false" />
-          <constructor-arg index="2" value="true" />
+          <constructor-arg index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="cn" />
           <constructor-arg index="1" value="false" />
-          <constructor-arg index="2" value="true" />
+          <constructor-arg index="2" value="false" />
+          <property name="required" value="true"/>
+          <property name="idAttribute" value="true"/>
         </bean>
         <bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
           <constructor-arg type="java.lang.String" index="0" value="description" />



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


Mime
View raw message