mirror of https://github.com/apache/archiva.git
[MRM-1500] Fix sample on how to use ldap in applicationContext.xml
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1176805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1e6934261c
commit
3323da7d34
|
@ -320,16 +320,12 @@
|
||||||
this component manages the connection to the ldap server
|
this component manages the connection to the ldap server
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- component>
|
<!--
|
||||||
<role>org.codehaus.plexus.redback.common.ldap.connection.LdapConnectionFactory</role>
|
<bean name="ldapConnectionFactory" class="org.codehaus.plexus.redback.common.ldap.connection.ConfigurableLdapConnectionFactory">
|
||||||
<role-hint>configurable</role-hint>
|
<property name="userConf" ref="userConfiguration"/>
|
||||||
<implementation>org.codehaus.plexus.redback.common.ldap.connection.ConfigurableLdapConnectionFactory</implementation>
|
</bean>
|
||||||
<requirements>
|
-->
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component-->
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
@ -354,24 +350,19 @@
|
||||||
* user-object-class - the objectClass used in the ldap server for indentifying users, most commonly inetOrgPerson.
|
* user-object-class - the objectClass used in the ldap server for indentifying users, most commonly inetOrgPerson.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- component>
|
<!--
|
||||||
<role>org.codehaus.plexus.redback.common.ldap.UserMapper</role>
|
<bean name="ldapUserMapper" class="org.codehaus.plexus.redback.common.ldap.LdapUserMapper">
|
||||||
<role-hint>ldap</role-hint>
|
<property name="emailAttribute" value="email"/>
|
||||||
<implementation>org.codehaus.plexus.redback.common.ldap.LdapUserMapper</implementation>
|
<property name="fullNameAttribute" value="givenName"/>
|
||||||
<configuration>
|
<property name="passwordAttribute" value="userPassword"/>
|
||||||
<email-attribute>email</email-attribute>
|
<property name="userIdAttribute" value="cn"/>
|
||||||
<full-name-attribute>givenName</full-name-attribute>
|
<property name="userBaseDn" value="o=com"/>
|
||||||
<password-attribute>userPassword</password-attribute>
|
<property name="userObjectClass" value="inetOrgPerson"/>
|
||||||
<user-id-attribute>cn</user-id-attribute>
|
<property name="userConf" ref="userConfiguration"/>
|
||||||
<user-base-dn>o=com</user-base-dn>
|
</bean>
|
||||||
<user-object-class>inetOrgPerson</user-object-class>
|
-->
|
||||||
</configuration>
|
|
||||||
<requirements>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component-->
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
@ -380,24 +371,14 @@
|
||||||
user.manager.impl=cached
|
user.manager.impl=cached
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- component>
|
<!--
|
||||||
<role>org.codehaus.plexus.redback.users.UserManager</role>
|
<bean name="userManager#cached" class="org.codehaus.plexus.redback.users.cached.CachedUserManager">
|
||||||
<role-hint>cached</role-hint>
|
<property name="userImpl" ref="userMapper#ldap"/>
|
||||||
<implementation>org.codehaus.plexus.redback.users.cached.CachedUserManager</implementation>
|
<property name="usersCache" ref="cache#users"/>
|
||||||
<description>CachedUserManager</description>
|
</bean>
|
||||||
<requirements>
|
-->
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.users.UserManager</role>
|
|
||||||
<role-hint>ldap</role-hint>
|
|
||||||
<field-name>userImpl</field-name>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.cache.Cache</role>
|
|
||||||
<role-hint>users</role-hint>
|
|
||||||
<field-name>usersCache</field-name>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component-->
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
@ -410,42 +391,26 @@
|
||||||
|
|
||||||
in the security.properties
|
in the security.properties
|
||||||
-->
|
-->
|
||||||
|
<!--
|
||||||
<!-- component>
|
<bean name="userSecurityPolicy" class="org.codehaus.plexus.redback.policy.DefaultUserSecurityPolicy">
|
||||||
<role>org.codehaus.plexus.redback.policy.UserSecurityPolicy</role>
|
<property name="config" ref="userConfiguration"/>
|
||||||
<role-hint>default</role-hint>
|
<property name="passwordEncoder" ref="passwordEncoder#sha1"/>
|
||||||
<implementation>org.codehaus.plexus.redback.policy.DefaultUserSecurityPolicy</implementation>
|
<property name="userValidationSettings" ref="userValidationSettings"/>
|
||||||
<description>User Security Policy.</description>
|
<property name="rememberMeCookieSettings" ref="cookieSettings#rememberMe"/>
|
||||||
<requirements>
|
<property name="signonCookieSettings" ref="cookieSettings#signon"/>
|
||||||
<requirement>
|
<property name="rules">
|
||||||
<role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
|
add the rules you want to applied
|
||||||
<field-name>config</field-name>
|
<list>
|
||||||
</requirement>
|
<ref bean="passwordRule#alpha-count"/>
|
||||||
<requirement>
|
<ref bean="passwordRule#alpha-numeric"/>
|
||||||
<role>org.codehaus.plexus.redback.policy.PasswordEncoder</role>
|
<ref bean="passwordRule#character-length"/>
|
||||||
<role-hint>sha1</role-hint>
|
<ref bean="passwordRule#must-have"/>
|
||||||
<field-name>passwordEncoder</field-name>
|
<ref bean="passwordRule#no-whitespaces"/>
|
||||||
</requirement>
|
<ref bean="passwordRule#numerical-count"/>
|
||||||
<requirement>
|
</list>
|
||||||
<role>org.codehaus.plexus.redback.policy.UserValidationSettings</role>
|
</property>
|
||||||
<field-name>userValidationSettings</field-name>
|
</bean>
|
||||||
</requirement>
|
-->
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.policy.CookieSettings</role>
|
|
||||||
<role-hint>rememberMe</role-hint>
|
|
||||||
<field-name>rememberMeCookieSettings</field-name>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.policy.CookieSettings</role>
|
|
||||||
<role-hint>signon</role-hint>
|
|
||||||
<field-name>signonCookieSettings</field-name>
|
|
||||||
</requirement>
|
|
||||||
<requirement>
|
|
||||||
<role>org.codehaus.plexus.redback.policy.PasswordRule</role>
|
|
||||||
<field-name>rules</field-name>
|
|
||||||
</requirement>
|
|
||||||
</requirements>
|
|
||||||
</component-->
|
|
||||||
<!-- END SNIPPET: ldap -->
|
<!-- END SNIPPET: ldap -->
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|
Loading…
Reference in New Issue