Announcement Announcement Module
Collapse
No announcement yet.
LDAP Authentication Help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LDAP Authentication Help

    I am trying to allow a user to login to a page and then authenticate their login information against a LDAP server. It seems that i am connecting successfully to the server but i keep getting this error:

    [AuthenticationProcessingFilter] Authentication request failed: org.springframework.security.AuthenticationService Exception: Uncateg
    orized exception occured during LDAP processing; nested exception is javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C0906
    27, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece ]; remaining name 'dc=work, dc=com '; nested exception is org.springframework.ldap.UncategorizedLdapExceptio n: Uncategorized exception occured during LDAP processing; nested exception is
    javax.naming.NamingException: [LDAP: error code 1 - 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind mu
    st be completed on the connection., data 0, vece ]; remaining name 'dc=work, dc=com'


    I am not certain as to what is causing this error, but any help would be greatly apprecaited. Also i am very new to spring so please explain using very simple examples. Below is my application-context.xml and my jsp login snippet


    JSP
    <form action="j_spring_security_check" method="post">
    <div id="loginbox">
    <div>
    <span><label for="username">Username:</label></span>
    <span><input id="username" type="text" name="j_username"/></span>
    </div>
    <div>
    <span><label for="password">Password:</label></span>
    <span><input id="password" type="password" name="j_password"/></span>
    </div>


    APPLICATION CONTEXT.XML
    <security:http >
    <security:anonymous />
    <security:http-basic />
    <security:logout />
    <security:form-login login-page="/jsp/login.jsp"
    authentication-failure-url="/jsp/login.jsp?FAILURE"
    default-target-url='/jsp/login.jsp?SUCCESS'/>
    <security:intercept-url pattern="/spring2/**" requires-channel="https"
    access="ROLE_USER" />
    </security:http>

    <security:ldap-server id="ldap" url="myLdapServer:36536" />
    <security:ldap-authentication-provider
    server-ref="dap"
    user-search-filter="DN=(mailNickname={0})"

    user-search-base="dc=work, dc=com">
    <securityassword-compare hash="md5">
    <securityassword-encoder hash="md5"/>
    </securityassword-compare>
    </security:ldap-authentication-provider>

    Thanks for any help
    -Mike
    Last edited by bigmike11; Jul 13th, 2009, 02:14 PM.

  • #2
    I'm a bit suspicious about your user-search-filter. That's a Spring Security thingy, so you should try the Spring Security forum and see if they can help you get the filter right.

    Comment


    • #3
      Okay, thank you for your input

      Comment


      • #4
        Filters

        I have also tried using this filter on Microsoft LDP program, and it seems to work. So, i am open to any input from anybody. Thanks in advance
        -Mike

        Comment

        Working...
        X