Improve Apache directory server
[lgpl/argeo-commons.git] / server / modules / org.argeo.server.ads.server / META-INF / spring / ads.xml
index 593234f1b0caa2fd42f1dd46a13c59d8b18d8920..6f7f6a6150cbfb04df7bb7ebf7192305b0939d84 100644 (file)
@@ -1,9 +1,59 @@
-<beans:beans xmlns="http://www.springframework.org/schema/security"
-       xmlns:beans="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.0.xsd
-              http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
+<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">
 
-       <ldap-server root="dc=demo,dc=argeo,dc=org" port="10389"
-               ldif="file:init.ldif" />
+       <bean
+               class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+               <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+               <property name="ignoreUnresolvablePlaceholders" value="false" />
+               <property name="locations">
+                       <value>osgibundle:ads.properties
+                       </value>
+               </property>
+       </bean>
 
-</beans:beans>
+       <bean class="org.argeo.server.ads.AdsContainer">
+               <property name="workingDirectory" value="${argeo.osgi.data.dir}/apacheds" />
+               <property name="deleteWorkingDirOnExit" value="true" />
+               <property name="configuration" ref="configuration" />
+               <property name="environment" ref="environment" />
+               <property name="ldifs">
+                       <list>
+                               <value>osgibundle:init.ldif</value>
+                       </list>
+               </property>
+       </bean>
+
+       <bean id="environment"
+               class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+               <property name="properties">
+                       <props>
+                               <prop key="java.naming.security.authentication">simple</prop>
+                               <prop key="java.naming.security.principal">${argeo.ldap.manager.userdn}</prop>
+                               <prop key="java.naming.security.credentials">${argeo.ldap.manager.password}</prop>
+                               <!--<prop key="kdc.entryBaseDn">ou=users,dc=example,dc=com</prop>-->
+                               <!--<prop key="kdc.java.naming.security.credentials">secret</prop>-->
+                               <!--
+                                       <prop key="changepw.entryBaseDn">ou=users,dc=example,dc=com</prop>
+                               -->
+                               <!--
+                                       <prop key="changepw.java.naming.security.credentials">secret</prop>
+                               -->
+                               <!--
+                                       Set this key to a space delimited set of attributeType descriptions
+                                       and their OID's if you want an attributeType to be handled as
+                                       binary content. The server will use the schema to derive the set of
+                                       attributeTypes to treat as binary. The union if the values you
+                                       provide here will be taken as the set of binaries. Note to be
+                                       consistent you must add both the OID and all the names an
+                                       attributeType can have.
+                               -->
+                               <!--
+                                       <prop key="java.naming.ldap.attributes.binary"></prop>
+                               -->
+                       </props>
+               </property>
+       </bean>
+
+
+</beans>