Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-2478

Tasklist doesn't show group tasks or colleagues when using AD as an LDAP provider

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0, 7.2.0-alpha4
    • Component/s: tasklist
    • Labels:
      None

      Description

      When using AD as and LDAP provider, the task list does not show any tasks that have been allocated to a group, even if you are a member of the group.

      Additionally, the colleagues section is never populated.

      I have isolated the first problem to an issue with the escaping of special characters, similar to CAM-2309. In the LdapIdentityProviderSession class, the getUserSearchFilter method also needs to escape special characters in the user id, similar to what was done in getGroupSearchFilter.

      The second issue (colleagues) is caused by the findUsersByGroupId assuming that the DN for a group member will always start with the UID:

      String userId = userDn.substring(userDn.indexOf("=")+1, userDn.indexOf(","));
      if(queriedUserId == null)

      { query.userId(userId); }

      if(queriedUserId == null || queriedUserId.equals(userId))

      { userList.addAll(findUsersWithoutGroupId(query, userBaseDn)); }

      In the case of our Active Directory, the user DN looks something like "CN=Howe\, David,OU=Users,OU=Accounts etc.". When the above code runs, it tries to find a user with the id of "Howe\" which never matches anything, leading to your list of colleagues never being populated. The solution is to just query using the DN:

      List<User> users = findUsersWithoutGroupId(query, userDn);
      if (users.size() > 0)

      { userList.add(users.get(0)); }

      In fixing this, I also noticed a bug in the loop that iterates over the group members until it reaches the maximum size. In checking the size of the list, it is using the empty userList, rather than the userDnList that it is adding to.

      while (allMembers.hasMoreElements() && userList.size() < query.getMaxResults())

      { userDnList.add((String) allMembers.nextElement()); }

      I have created a test case that demonstrates the above and updated the code with the fixes. I will submit a pull request.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            david.howe@auspost.com.au David Howe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: