Announcement Announcement Module
Collapse
No announcement yet.
spring security configuration with LDAP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring security configuration with LDAP

    HI,
    I tried configuring the Spring security ldap
    My file is as follows:*******************

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:security="http://www.springframework.org/schema/security"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.1.xsd">

    <bean id="contextSource"
    class="org.springframework.security.ldap.DefaultSp ringSecurityContextSource">
    <constructor-arg value="ldap://192.168.198.131:389/dc=xtensus,dc=com"/>
    <property name="userDn" value="cn=admin,dc=xtensus,dc=com"/>
    <property name="password" value="ikhlass"/>
    </bean>

    <bean id="ldapAuthProvider"
    class="org.springframework.security.ldap.authentic ation.LdapAuthenticationProvider">
    <constructor-arg>
    <bean class="org.springframework.security.ldap.authentic ation.BindAuthenticator">
    <constructor-arg ref="contextSource"/>
    <property name="userDnPatterns">
    <list><value>uid={0},ou=people</value></list>
    </property>
    </bean>
    </constructor-arg>
    <constructor-arg>
    <bean
    class="org.springframework.security.ldap.userdetai ls.DefaultLdapAuthoritiesPopulator">
    <constructor-arg ref="contextSource"/>
    <constructor-arg value="ou=Groups"/>
    <property name="groupRoleAttribute" value="ou"/>
    </bean>
    </constructor-arg>
    </bean>

    <bean
    class="org.springframework.security.ldap.userdetai ls.DefaultLdapAuthoritiesPopulator">
    <constructor-arg ref="contextSource"/>
    <constructor-arg value="ou=groups"/>
    <property name="groupRoleAttribute" value="ou"/>
    </bean>
    <bean id="userSearch"
    class="org.springframework.security.ldap.search.Fi lterBasedLdapUserSearch">
    <constructor-arg index="0" value=""/>
    <constructor-arg index="1" value="(uid={0})"/>
    <constructor-arg index="2" ref="contextSource" />
    </bean>



    </beans>

    **************************
    and as I have error when I run my tomcat server:


    org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd schema with Spring Security 3.1. Please update your schema declarations to the 3.1 schema.
    How can help me please??

  • #2
    any one can help me please ??no reponse??

    Comment

    Working...
    X