Announcement Announcement Module
Collapse
No announcement yet.
customize AD binding Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • 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?

    Thanks

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

    http://forum.springframework.org/sho...t=20969&page=2

    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.

    Comment


    • #3
      Awesome!
      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!

      Comment


      • #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.

        Comment


        • #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 [org.acegisecurity.ldap.search.FilterBasedLdapUserS 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?

          Comment


          • #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.

            http://acegisecurity.sourceforge.net...538-bin.tar.gz

            or are you using 1.0?

            Comment


            • #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.

              Comment

              Working...
              X