1 <beans xmlns=
"http://www.springframework.org/schema/beans"
2 xmlns:
security=
"http://www.springframework.org/schema/security"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance"
4 xsi:
schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
5 http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
9 class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
10 <property name=
"systemPropertiesModeName" value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE" />
11 <property name=
"locations">
12 <value>osgibundle:ldap.properties
</value>
16 <bean id=
"passwordEncoder"
17 class=
"org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder" />
19 <bean id=
"contextSource"
20 class=
"org.springframework.security.ldap.DefaultSpringSecurityContextSource">
22 value=
"${argeo.ldap.protocol}://${argeo.ldap.host}:${argeo.ldap.port}/${argeo.ldap.rootdn}" />
23 <property name=
"userDn" value=
"${argeo.ldap.manager.userdn}" />
24 <property name=
"password" value=
"${argeo.ldap.manager.password}" />
27 <bean id=
"authenticationProvider"
28 class=
"org.springframework.security.providers.ldap.LdapAuthenticationProvider">
29 <constructor-arg ref=
"ldapAuthenticator" />
31 <bean factory-bean=
"securityDao" factory-method=
"getAuthoritiesPopulator" />
33 <property name=
"userDetailsContextMapper">
34 <bean factory-bean=
"securityDao" factory-method=
"getUserDetailsMapper" />
38 <bean id=
"securityDao" class=
"org.argeo.security.ldap.ArgeoSecurityDaoLdap">
39 <constructor-arg ref=
"contextSource" />
40 <property name=
"userNatureMappers" ref=
"userNatureMappers" />
41 <property name=
"passwordEncoder" ref=
"passwordEncoder" />
44 <bean id=
"userDetailsService" factory-bean=
"securityDao"
45 factory-method=
"getUserDetailsService">
48 <bean id=
"ldapAuthenticator"
49 class=
"org.springframework.security.providers.ldap.authenticator.PasswordComparisonAuthenticator">
50 <constructor-arg ref=
"contextSource" />
51 <property name=
"userDnPatterns">
53 <value>uid={
0},ou=People
</value>
56 <property name=
"passwordEncoder" ref=
"passwordEncoder" />