Le plugin adminauthenticationldap permet de mettre en place une authentification basé sur un LDAP. Le plugin propose aussi un daemon (désactivé par défaut) permettant d'importer les utilisateurs du LDAP vers la base de donnée Lutèce.
Ce plugin permet de paramétrer les paramètre usuel de connexion à un LDAP.
adminauthenticationldap.ldap.connectionUrl=ldap://XXX/
adminauthenticationldap.ldap.connectionName=CN=xxx_admin,OU=Service_Accounts,OU=My Organisation,DC=lutece,DC=org
adminauthenticationldap.ldap.connectionPassword=password
adminauthenticationldap.ldap.rootBase=DC=lutece,DC=org
adminauthenticationldap.ldap.userBase=CN=Users
adminauthenticationldap.ldap.userSubtree=false
# Search param
adminauthenticationldap.ldap.userSearch.filterAccesspre=(login={0})
adminauthenticationldap.ldap.userSearch.filterCriteria=(sn={0})(givenName={1})(mail={2})
adminauthenticationldap.ldap.userSearch.groupFilter=CN=xxx_group,OU=Groups
#User mapping parametter
adminauthenticationldap.ldap.dn.attributeName.accesspre=login
adminauthenticationldap.ldap.dn.attributeName.email=mail
adminauthenticationldap.ldap.dn.attributeName.family=sn
adminauthenticationldap.ldap.dn.attributeName.given=givenName
adminauthenticationldap.ldap.dn.attributeName.groupMemberOf=memberOf
adminauthenticationldap.ldap.dn.attributeName.distinguishedName=distinguishedName
# Daemons management
daemon.ImportLdapAdminUsersDaemon.interval=86400
daemon.ImportLdapAdminUsersDaemon.onstartup=0
Pour utiliser ce plugin, il faut surcharger le context spring du coeur Lutèce (dans WEB-INF/conf/override/core_context.xml) comme dans l'example ci-dessous :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- use LDAP AdminAuthentication module -->
<bean id="adminAuthenticationModule" class="fr.paris.lutece.plugins.adminauthenticationldap.AdminLdapAuthentication"/>
</beans>