Results 1 to 3 of 3

Thread: LdapPasswordAuthenticationDao assumes rolesAttributes

  1. #1
    Join Date
    Mar 2005
    Posts
    3

    Default LdapPasswordAuthenticationDao assumes rolesAttributes

    I am using an ldap server that doesn't have any roles defined. We are just using the ldap server for authentication. The LdapPasswordAuthenticationDao code assumes that there have to be roles existing.

    I may not understand enough about ldap but it seems to me that it is not unreasonable to be able to just authenticate a user.

    To be able to support this use case I had to add a check for rolesAttributes length at line 235:

    if (roles.isEmpty() && rolesAttributes.length > 0)

    and also a surround the log.debug statement at line 337:
    if(rolesString.length() > 0) {
    log.debug("Searching user context '" + userContext + "' for roles "
    + "attributes: " + rolesString.substring(1));
    }

    Does this sound like a change that should be made to the class before it is included in a release version of Acegi?

  2. #2
    Join Date
    Aug 2004
    Location
    Auburn, AL, USA.
    Posts
    106

    Default

    I am now working on extensively updating the LdapPasswordAuthenticationDao code. I just checked in a much overhauled version which has a property "defaulRole" which if set (to anything non-null) avoids the BadCredentialsException. I am open to other suggestions: for instance maybe there should be a simple boolean flag here.

  3. #3
    Join Date
    Mar 2005
    Posts
    3

    Default

    Thanks alot, rrsIPOV that will cover the changes I needed in the earlier version.

Similar Threads

  1. MBeanClientInterceptor assumes lower-case Attribute names
    By Joris Kuipers in forum Container
    Replies: 10
    Last Post: Mar 31st, 2005, 09:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •