Topic on Extension talk:LDAP Authentication

Conflict with Extension:Translate

5
217.6.145.253 (talkcontribs)

Versions: Mediawiki 1.27.1, LDAPAuth 2.1.0 (Translate: MLEB 2017.01)

Problem:

I want to use this Extension and Extension:Translate, but: I cant publish Translations as long as LDAP_Authentication is active. This seems to be because LDAP_Authentication prevents the use of Translates Fuzzybot according to the php error log:

 UnexpectedValueException from line 273 of [base]\includes\auth\AuthPluginPrimaryAuthenticationProvider.php: AuthPlugin failed to reset password for Fuzzybot in the following domains: [all Domains]

According to Topic:Tfu65b5pncef5p6s this should work, but it doesn't:

$wgAuthManagerAutoConfig['primaryauth'] += [

    LdapPrimaryAuthenticationProvider::class => [

    'class' => LdapPrimaryAuthenticationProvider::class,

    'args' => [ ['authoritative' => true, ] ],

    'sort' => 50,    ],

];

What can I do?

Lsilverman (talkcontribs)

Did you ever find a solution? I'm stuck in the exact same place.

217.6.145.253 (talkcontribs)

I'm currently thinking about setting up a parallell wiki (accessing the same Database) without LDAP for Translators.

But that sucks because i'm pretty sure that would lead to some sort of conflict eventually...

Lsilverman (talkcontribs)

I abandoned LDAP_Authentication. Instead I migrated to PluggableAuth+OpenId extensions married to Google Auth, which our organization also uses. Much better and easier configuration than LdapAuth. Now users are auto-logged in just by visiting our private wiki.

Oleg.blecher (talkcontribs)

I have the same issue with LDAP-authentication on Mediawiki 1.31 and GraphViz. To solve it I commented out almost everything in the function providerRevokeAccessFor User:

      

public function providerRevokeAccessForUser( $username ) {

               # function commented out due to an issue with LDAP-authentication and newer versions of Mediawiki, preventing for example GraphViz from fucntioning properly

               # seems to be similiar to the issue described here: https://www.mediawiki.org/wiki/Topic:Tpyxsdgiheh5zqjr

               return;

               /*$username = User::getCanonicalName( $username, 'usable' );

               if ( $username === false ) {

                       return;

               }

               $user = User::newFromName( $username );

               if ( $user ) {

                       // Reset the password on every domain.

                       $curDomain = $this->auth->getDomain();

                       $domains = $this->auth->domainList() ?: [ '' ];

                       $failed = [];

                       foreach ( $domains as $domain ) {

                               $this->auth->setDomain( $domain );

                               if ( $this->testUserCanAuthenticateInternal( $user ) &&

                                       !$this->auth->setPassword( $user, null )

                               ) {

                                       $failed[] = $domain === '' ? '(default)' : $domain;

                               }

                       }

                       $this->auth->setDomain( $curDomain );

                       if ( $failed ) {

                               throw new \UnexpectedValueException(

                                       "AuthPlugin failed to reset password for $username in the following domains: "

                                               . implode( ' ', $failed )

                               );

                       }

               }*/

       }

Would be really cool if MediaWiki or the LDAP-auth peeps will make an update that will help this kind of extensions work. LDAP is very useful and would be a bummer to give up.

Reply to "Conflict with Extension:Translate"