Penrose comes with a built-in Apache DS as an LDAP service, but Penrose can also run inside a standalone Apache DS.
Embedded Apache DS
To use Apache DS edit PENROSE_SERVER_HOME/conf/server.xml then set the LDAP service as follows:
<service name="LDAP"> <service-class>org.safehaus.penrose.apacheds.ApacheDSLDAPService</service-class> <parameter> <param-name>enableLdaps</param-name> <param-value>true</param-value> </parameter> <parameter> <param-name>ldapsPort</param-name> <param-value>10636</param-value> </parameter> <parameter> <param-name>ldapsCertificateFile</param-name> <param-value>conf/penrose.keystore</param-value> </parameter> <parameter> <param-name>ldapsCertificatePassword</param-name> <param-value>secret</param-value> </parameter> </service>
Standalone Apache DS
Add the following tags into Apache DS's configuration file (server.xml):
<beans> <bean id="penroseFactory" class="org.safehaus.penrose.PenroseFactory" factory-method="getInstance"/> <bean id="penrose" factory-bean="penroseFactory" factory-method="createPenrose" init-method="start" destroy-method="stop"> <constructor-arg><value>PENROSE_SERVER_HOME</value></constructor-arg> </bean> <bean id="penroseInterceptor" class="org.safehaus.penrose.ldap.PenroseInterceptor"> <property name="penrose"><ref bean="penrose"/></property> </bean> <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration"> ... <property name="interceptorConfigurations"> <list> <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration"> <property name="name"><value>penroseService</value></property> <property name="interceptor"> <ref bean="penroseInterceptor"/> </property> </bean> ... </list> </property> </bean> </beans>
Replace the PENROSE_SERVER_HOME above with the actual Penrose Server installation directory.
Then copy all jar files in PENROSE_SERVER_HOME/lib and PENROSE_SERVER_HOME/lib/ext into ADS's lib/ext directory.
See also the example in PENROSE_SERVER_HOME/samples/apacheds.
