Page MenuHomePhabricator

Add `wgLDAPGroupUseFullDN` replacement
Open, MediumPublic

Description

By user "Dimassc"

I'm migrating from the old LdapAuthentication to the new stack and it didn't work. I need a replacement for $wgLDAPGroupUseFullDN = array( "LDAP"=>false)
I need to search members in groups like this: (&(objectclass={GROUPOBJECTCLASS})({GROUPATTRIBUTE}=$username))
Instead of this this plugin is doing this search: (&(objectclass={GROUPOBJECTCLASS})({GROUPATTRIBUTE}=$userDN))

I did an ugly fix, adding this line just after $userDN is set in getUserGroup ($username ):

public function getUserGroups( $username ) {
      $userDN = new EscapedString( $this->ldapClient->getUserDN( $username ) );
      $userDN = $username;
      ...

I think we need to add a $wgLDAPGroupUseFullDN substitute in the $LDAPProviderDomainConfigProvider config:

$LDAPProviderDomainConfigProvider = function() {
   $config = [
       'LDAP' => [
           'connection' => [
               "groupusefulldn" => false,
...

See https://www.mediawiki.org/wiki/Topic:Vh0ssod5bin73ptd

Event Timeline

Osnard triaged this task as Medium priority.Feb 20 2020, 7:33 AM

Hi @Dimassc, if you'd like to write a patch you are very welcome to use developer access to submit the proposed code changes as a Git branch directly into Gerrit which makes it easier to review and provide feedback. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks.

Removing task assignee due to inactivity as this open task has been assigned for more than two years. See the email sent to the task assignee on August 22nd, 2022.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!