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
17 <bean id=
"passwordEncoder"
18 class=
"org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder" />
20 <bean id=
"contextSource"
21 class=
"org.springframework.security.ldap.DefaultSpringSecurityContextSource">
23 value=
"${argeo.ldap.protocol}://${argeo.ldap.host}:${argeo.ldap.port}/${argeo.ldap.rootdn}" />
24 <property name=
"userDn" value=
"${argeo.ldap.manager.userdn}" />
25 <property name=
"password" value=
"${argeo.ldap.manager.password}" />
28 <bean id=
"authenticationProvider"
29 class=
"org.springframework.security.providers.ldap.LdapAuthenticationProvider">
30 <constructor-arg ref=
"ldapAuthenticator" />
32 <bean factory-bean=
"securityDao" factory-method=
"getAuthoritiesPopulator" />
34 <property name=
"userDetailsContextMapper">
35 <bean factory-bean=
"securityDao" factory-method=
"getUserDetailsMapper" />
39 <bean id=
"securityDao" class=
"org.argeo.security.ldap.ArgeoSecurityDaoLdap">
40 <constructor-arg ref=
"contextSource" />
41 <property name=
"userNatureMappers" ref=
"userNatureMappers" />
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">
58 class=
"org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder" />