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/18 19:35:38 UTC

svn commit: r696735 - in /portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly: ldapConfig.xml security-ldap.xml

Author: vkumar
Date: Thu Sep 18 10:35:38 2008
New Revision: 696735

URL: http://svn.apache.org/viewvc?rev=696735&view=rev
Log:
Ldap config files

Added:
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml   (with props)
    portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml   (with props)

Added: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml?rev=696735&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml Thu Sep 18 10:35:38 2008
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<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="org.apache.jetspeed.security.spi.impl.ldap.LdapBindingConfig"
+      class="org.apache.jetspeed.security.spi.impl.ldap.LdapBindingConfig">
+      <!-- The LDAP initial context factory. -->
+      <constructor-arg index="0"><value>com.sun.jndi.ldap.LdapCtxFactory</value></constructor-arg>
+      <!-- The LDAP server name. -->
+      <constructor-arg index="1"><value>localhost</value></constructor-arg>
+      <!-- The LDAP server port. -->
+      <constructor-arg index="2"><value>389</value></constructor-arg>
+      <!-- The LDAP server root context. -->
+      <constructor-arg index="3"><value>o=sevenSeas</value></constructor-arg>
+      <!-- The LDAP server root dn. -->
+      <constructor-arg index="4"><value>cn=admin,o=sevenSeas</value></constructor-arg>
+      <!-- The LDAP server root password. -->
+      <constructor-arg index="5"><value>secret</value></constructor-arg>
+      <!-- The roles filter. -->
+      <constructor-arg index="6"><value>(objectclass=jetspeed-2-role)</value></constructor-arg>
+      <!-- The groups filter. -->
+      <constructor-arg index="7"><value>(objectclass=jetspeed-2-group)</value></constructor-arg>
+      <!-- The user filter. -->
+      <constructor-arg index="8"><value>(objectclass=jetspeed-2-user)</value></constructor-arg>
+      <!-- The roleMembershipAttributes. -->
+      <constructor-arg index="9"><value>j2-role</value></constructor-arg>
+      <!-- The userRoleMembershipAttributes. -->
+      <constructor-arg index="10"><value>j2-role</value></constructor-arg>
+      <!-- The groupMembershipAttributes. -->
+      <constructor-arg index="11"><value>uniqueMember</value></constructor-arg>
+      <!-- The userGroupMembershipAttributes. -->
+      <constructor-arg index="12"><value>j2-group</value></constructor-arg>
+      <!-- The groupMembershipForRoleAttributes. -->
+      <constructor-arg index="13"><value>uniqueMember</value></constructor-arg>
+      <!-- The roleGroupMembershipForRoleAttributes. -->
+      <constructor-arg index="14"><value></value></constructor-arg>     
+      <!-- The defaultSearchBase. -->
+      <constructor-arg index="15"><value>o=sevenSeas</value></constructor-arg>
+      <!-- The roleFilterBase. -->
+      <constructor-arg index="16"><value>ou=Roles,ou=rootOrg</value></constructor-arg>
+      <!-- The groupFilterBase. -->
+      <constructor-arg index="17"><value>ou=Groups,ou=rootOrg</value></constructor-arg>
+      <!-- The userFilterBase. -->
+      <constructor-arg index="18"><value>ou=People,ou=rootOrg</value></constructor-arg>
+      <!-- The roleObjectClasses. -->
+      <constructor-arg index="19"><value>top,groupOfUniqueNames,jetspeed-2-role</value></constructor-arg>
+      <!-- The groupObjectClasses. -->
+      <constructor-arg index="20"><value>top,groupOfUniqueNames,jetspeed-2-group</value></constructor-arg>
+      <!-- The userObjectClasses. -->
+      <constructor-arg index="21"><value>top,person,organizationalPerson,inetorgperson,jetspeed-2-user</value></constructor-arg>
+      <!-- The roleIdAttribute. -->
+      <constructor-arg index="22"><value>cn</value></constructor-arg>
+      <!-- The groupIdAttribute. -->
+      <constructor-arg index="23"><value>cn</value></constructor-arg>
+	  	<!-- The userIdAttribute. -->
+      <constructor-arg index="24"><value>cn</value></constructor-arg>
+      <!-- The UidAttribute. -->
+      <constructor-arg index="25"><value>uid</value></constructor-arg>
+      <!-- The MemberShipSearchScope. -->
+      <constructor-arg index="26"><value>1</value></constructor-arg>
+      <!-- The roleUidAttribute. -->
+      <constructor-arg index="27"><value>cn</value></constructor-arg>
+      <!-- The groupUidAttribute. -->
+      <constructor-arg index="28"><value>cn</value></constructor-arg>
+	  <!-- The userUidAttribute. -->
+      <constructor-arg index="29"><value>uid</value></constructor-arg>
+	  <!-- The roleObjectRequiredAttributeClasses. -->
+      <constructor-arg index="30"><value>cn,j2-classname,uid,uniquemember</value></constructor-arg>
+	  <!-- The groupObjectRequiredAttributeClasses. -->
+      <constructor-arg index="31"><value>cn,j2-classname,uid,uniqueMember</value></constructor-arg>
+	  <!-- The userAttributes. -->
+      <constructor-arg index="32"><value>sn={u},cn={u},uid={u}</value></constructor-arg>
+	  <!-- The roleAttributes. -->
+      <constructor-arg index="33"><value></value></constructor-arg>
+	  <!-- The groupAttributes. -->
+      <constructor-arg index="34"><value></value></constructor-arg>
+	  <!-- The userPasswordAttribute. -->
+      <constructor-arg index="35"><value>userPassword</value></constructor-arg>
+	  <!-- The knownAttributes. -->
+      <constructor-arg index="36"><value>cn,sn,o,uid,ou,objectClass,userPassword,member,uniqueMember,memberOf,j2-role,j2-group</value></constructor-arg>
+  </bean>
+</beans>

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/ldapConfig.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: 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=696735&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml (added)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml Thu Sep 18 10:35:38 2008
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<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="org.apache.jetspeed.security.mapping.ldap.dao"
+		class="org.apache.jetspeed.security.mapping.ldap.dao.impl.SpringLDAPEntityDAO">
+		    <property name="contextMapper">
+      			<value>org.apache.jetspeed.components.portletregistry.PortletRegistry</value>
+    		</property>
+
+		    <property name="configuration">
+      			<ref bean="portletRegistryImpl" />
+    		</property>
+    				
+		    <property name="ldapTemplate">
+      			<ref bean="portletRegistryImpl" />
+    		</property>
+
+		    <property name="configuration">
+    			<bean class="org.apache.jetspeed.security.mapping.ldap.dao.LDAPEntityDAOConfiguration">
+    				<property name=""></property>
+    				<property name=""></property>
+    			</bean>  			
+    		</property>		
+	</bean>   
+	-->
+  	<bean id="org.apache.jetspeed.security.spi.JetspeedPostContextLoader"
+	class="org.apache.jetspeed.security.spi.JetspeedPostContextLoader" init-method="init"> 
+		<constructor-arg index="0" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalSynchronizer" />
+		<constructor-arg index="1" ref="org.apache.jetspeed.security.UserManager" />
+	</bean>	
+	
+	<bean id="org.apache.jetspeed.security.spi.JetspeedPrincipalSynchronizer"
+	class="org.apache.jetspeed.security.spi.impl.DefaultJetspeedPrincipalSynchronizer"> 
+		<constructor-arg index="0" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalManagerProvider" />
+		<constructor-arg index="1" ref="org.apache.jetspeed.security.mapping.SecurityEntityManager" />
+	</bean>	
+		
+	<bean id="ldapContext" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">		
+		<property name="targetClass">
+			<value>org.apache.jetspeed.security.spi.impl.ldap.LdapContextProxy</value>
+		</property>
+   		<property name="targetMethod">
+   			<value>createProxy</value>
+   		</property>
+		<property name="arguments">
+			<list>
+				<ref bean="org.apache.jetspeed.security.spi.impl.ldap.LdapBindingConfig" />
+			</list>    
+		</property>
+ 	</bean>
+	
+
+	<bean id="org.apache.jetspeed.security.AuthenticationProvider" class="org.apache.jetspeed.security.impl.LdapAuthenticationProvider">
+		<constructor-arg index="0" value="ldapAuthenticationProvider" />
+		<constructor-arg index="1" value="Ldap Authentication Provider" />
+		<constructor-arg index="2">
+				<value>login.conf</value>
+		</constructor-arg>		
+		<constructor-arg index="3" ref="org.apache.jetspeed.security.spi.UserPasswordCredentialManager" />
+		<constructor-arg index="4" ref="org.apache.jetspeed.security.UserManager" />
+		<property name="context" ref="ldapContext" />
+		<property name="config" ref="org.apache.jetspeed.security.spi.impl.ldap.LdapBindingConfig" />
+		<property name="synchronizer" ref="JetspeedPrincipalSynchronizer" />
+	</bean>
+	<bean id="JetspeedPrincipalSynchronizer" class="org.apache.jetspeed.security.spi.impl.DefaultJetspeedPrincipalSynchronizer">
+		<constructor-arg index="0" ref="org.apache.jetspeed.security.spi.JetspeedPrincipalManagerProvider" />
+		<constructor-arg index="1" ref="org.apache.jetspeed.security.mapping.SecurityEntityManager" />
+	</bean>
+	<bean id="org.apache.jetspeed.security.mapping.SecurityEntityManager"
+	class="org.apache.jetspeed.security.mapping.ldap.dao.DefaultLDAPEntityManager" >	
+		<property name="entityDAOs">
+		    <map>
+				<entry key="user" value-ref="UserDao"/>
+		    </map>
+		</property>
+	</bean>
+	<bean id="UserDaoConfiguration" class="org.apache.jetspeed.security.mapping.ldap.dao.LDAPEntityDAOConfiguration">
+		<property name="baseDN" value=""/>
+		<property name="baseFilter">
+			<bean class="org.apache.jetspeed.security.mapping.ldap.filter.SimpleFilter">
+				<constructor-arg index="0" value="(objectClass=person)" />
+			</bean>
+		</property>
+		<property name="ldapIdAttribute" value="uid"/>
+		<property name="attributeDefinitions">	
+			<set>
+				<bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
+					<constructor-arg index="0" value="uid" />
+					<constructor-arg index="1" value="false" />
+					<constructor-arg index="2" value="true" />
+				</bean>
+				<bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
+					<constructor-arg index="0" value="cn" />
+					<constructor-arg index="1" value="false" />
+					<constructor-arg index="2" value="true" />					
+				</bean>				
+				<bean class="org.apache.jetspeed.security.mapping.model.impl.AttributeDefImpl">
+					<constructor-arg index="0" value="givenName" />
+					<constructor-arg index="1" value="false" />
+					<constructor-arg index="2" value="true" />					
+				</bean>					
+			</set>
+		</property>
+		<property name="entityType" value="user"/>
+	</bean>
+	<bean id="UserDao" class="org.apache.jetspeed.security.mapping.ldap.dao.impl.SpringLDAPEntityDAO">
+		<property name="ldapTemplate">
+			<bean class="org.springframework.ldap.core.LdapTemplate">
+				<property name="contextSource" ref="LdapSpringContext" />
+			</bean>
+		</property>
+		<property name="configuration" ref="UserDaoConfiguration"/>
+	</bean>
+	<bean id="LdapSpringContext" class="org.springframework.ldap.core.support.LdapContextSource">
+		<property name="url" value="ldap://localhost:389"/>
+		<property name="base" value="o=sevenSeas"/>
+		<property name="userDn" value="cn=admin,o=sevenSeas"/>
+		<property name="password" value="secret"/>
+	</bean>
+</beans>

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-ldap.xml
------------------------------------------------------------------------------
    svn:keywords = Id



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