Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-687

The GroupDrivenLdapGroupsManager doesn't handle memberUid attributes

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.5.4, 2.7, 3.9
    • 2.3
    • None
    • None

      The ldap search includes the the people dn...

          [RUNTIME-687] The GroupDrivenLdapGroupsManager doesn't handle memberUid attributes

          Users are not listed in the group.
          The problem must be at the request.

          Laurence Perier added a comment - Users are not listed in the group. The problem must be at the request.

          memberUid attributes are now supported.

          Nicolas Gavalda (Inactive) added a comment - memberUid attributes are now supported.

          Handling membership attributes containing only the person uid (memberUid) is an improvement.

          Nicolas Gavalda (Inactive) added a comment - Handling membership attributes containing only the person uid (memberUid) is an improvement.

          Nicolas Gavalda (Inactive) added a comment - - edited

          The current GroupDrivenLdapGroupsManager currently handles only LDAP groups of class "groupOfNames", where memberships are defined as absolute or relative DN:

          dn: cn=student,ou=groups,dc=anycontent,dc=anyware
          objectClass: groupOfNames
          cn: student
          member: uid=ngavalda,ou=people,dc=anycontent,dc=anyware    # absolute
          member: uid=raphael                                        # relative
          

          Hence the query to retrieve a user's groups: (member=uid={0},ou=people,dc=anycontent,dc=anyware)

          If you have only the user uid as the memberUid group attribute, you must have a "posixGroup" class, which is not handled for the moment.

          Nicolas Gavalda (Inactive) added a comment - - edited The current GroupDrivenLdapGroupsManager currently handles only LDAP groups of class "groupOfNames", where memberships are defined as absolute or relative DN: dn: cn=student,ou=groups,dc=anycontent,dc=anyware objectClass: groupOfNames cn: student member: uid=ngavalda,ou=people,dc=anycontent,dc=anyware # absolute member: uid=raphael # relative Hence the query to retrieve a user's groups: (member=uid={0},ou=people,dc=anycontent,dc=anyware) If you have only the user uid as the memberUid group attribute, you must have a "posixGroup" class, which is not handled for the moment.

          and again this is strange

                              String userDN = (String) members.next();
                              
                              // Récuperer le login
                              Matcher matcher = _loginExtractionPattern.matcher(userDN);
                              if (matcher.matches())
                              {
                                  // Ajouter le login de l'utilisateur courant
                                  group.addUser(matcher.group(1));
                              }
                              else
                              {
                                  if (getLogger().isWarnEnabled())
                                  {
                                      getLogger().warn("Unable to get the uid from the LDAP RDN entry : " + userDN);
                                  }
                              }
          

          In our ldap, the userDN is directly the login...

          Raphaël Franchet added a comment - and again this is strange String userDN = ( String ) members.next(); // Récuperer le login Matcher matcher = _loginExtractionPattern.matcher(userDN); if (matcher.matches()) { // Ajouter le login de l'utilisateur courant group.addUser(matcher.group(1)); } else { if (getLogger().isWarnEnabled()) { getLogger().warn( "Unable to get the uid from the LDAP RDN entry : " + userDN); } } In our ldap, the userDN is directly the login...

          The field _usersRelativeDN is useless for such an impl ?
          So the associated config parameter is also useless

          Moreover
          filter.append(_groupsMemberAttribute);
          filter.append("=" + _usersLoginAttribute + "=

          {0},");
          should be
          filter.append(_groupsMemberAttribute);
          filter.append("={0}

          ,");

          Raphaël Franchet added a comment - The field _usersRelativeDN is useless for such an impl ? So the associated config parameter is also useless Moreover filter.append(_groupsMemberAttribute); filter.append("=" + _usersLoginAttribute + "= {0},"); should be filter.append(_groupsMemberAttribute); filter.append("={0} ,");

            ngavalda Nicolas Gavalda (Inactive)
            raphael Raphaël Franchet
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: