Announcement Announcement Module
No announcement yet.
customize AD binding Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • customize AD binding

    Hi all, I'm very new here.

    I have tested AD authentication using ACEGI ldap package, the issue for me is that, our sAMAccountName is not the same as CN, but our users are only aware of sAMAccountName (use it to login). So I can not use DN (cn=....) to bind in order to authenticate a user.

    What I have to do is, use a service account to bind to AD, then search based on user's login name (sAMAccountName) to retrieve DN back, then bind using this DN to authenticate.

    My question is, is there a configurable way to do this using LDAPAuthenticationProvider, rather than customizing it? or alternative approach?


  • #2
    Please search the forum - there have been discussions on this before - e.g.

    There have been some package changes since then (e.g. some classes have moved to org.acegisecurity.ldap) but the essence should be the same.


    • #3
      thanks Luke, I have tested it and working great, yes there is a package change and it requires Spring 2.0.

      I love this forum!


      • #4
        There shouldn't be any requirement for Spring 2.0. There was an issue in the 1.0 release but it should be fixed in the nightly builds.


        • #5
          I got the following NoClassDefFoundError exception:
          Error registering bean with name 'userSearch' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: Class that bean class [ earch] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/springframework/dao/EmptyResultDataAccessException

          The EmptyResultDataAccessException is from 2.0, did I do anything wrong if I got this exception?


          • #6
            As I said, there was a problem with the 1.0 release but it should be fixed in the nightly builds...

            Have you tried with a nightly build? e.g.


            or are you using 1.0?


            • #7
              I was using 1.0 prod release, and I just rolled back to spring 1.2.8 with the nightly acegi build, it's working fine.

              Thank you for the advise.