Announcement Announcement Module
No announcement yet.
Issue on LDAP Authentication with Spring Security 3.0. Pls help. Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue on LDAP Authentication with Spring Security 3.0. Pls help.

    I've pasted my applicationContext-security.xml below. Am I missing any other configuration? Need your help.

    <?xml version="1.0" encoding="UTF-8" ?>

    <beans:beans xmlns=""
    xmlns:xsi="" xmlns:beans=""
    xmlns:jdbc="" xsi:schemaLocation="">

    <http auto-config="true" use-expressions="true">
    <intercept-url pattern="/secure/extreme/**" access="hasRole('ROLE_SUPERVISOR')"/>
    <intercept-url pattern="/secure/**" access="isAuthenticated()" />
    <!-- Disable web URI authorization, as we're using <global-method-security> and have @Secured the services layer instead
    <intercept-url pattern="/listAccounts.html" access="isRememberMe()" />
    <intercept-url pattern="/post.html" access="hasRole('ROLE_TELLER')" />
    <intercept-url pattern="/**" access="permitAll" />
    <form-login />
    <logout />

    <session-management invalid-session-url="/timeout.jsp">
    <concurrency-control max-sessions="1" error-if-maximum-exceeded="true" />


    <ldap-server url="ldap://,dc=org" id="ldapLocal" root="dc=something,dc=org"/>

    <ldap-authentication-provider server-ref="ldapLocal" user-dn-pattern="uid={0},ou=system" group-search-base="ou=system" />
    <!-- <ldap-user-service id="ldapUserService" server-ref="ldapLocal" user-search-filter="(uid={0})" user-search-base="dc=something,dc=org" group-search-base="ou=system,dc=something,dc=org"/> -->


    <ldap-user-service id="ldapUserService" server-ref="ldapLocal" user-search-filter="(uid={0})" group-search-base="ou=system"/>

  • #2
    What sort of issue are you having?


    • #3
      hi mularien,
      Thanks for ur spontaneous response.
      Actually I'm new to Spring & LDAP. I've visited many sites and I've created the above mentioned XML file. My requirement is LDAP authentication has to happen using Spring Security. Im running this sample application using JBOSS server and there is no issue on server start up and its running properly. But when I logging in It says Bad Credential. I'm not sure the whether it happens beause of incomplete configuration or wrong password. And even I dont know how to get know password of an user id in LDAP server.


      • #4
        Well, a forum isn't really the best way to explain how to get up and running from scratch

        I'd suggest reviewing the documentation and the unit tests that deal with LDAP authentication (using the embedded LDAP server). It sounds like you may not be too familiar with LDAP either, so I'd suggest finding a good resource to learn about how LDAP works.

        Hope that helps,


        • #5
          Can u suggest any links for that?