Topic on Extension talk:LDAP Authentication

1.34 Login fails, but test will work (Active Directory)

3
Tuxwiki (talkcontribs)

Hi,

I try to migrate the ldap login from 1.32 to 1.34 using the new ldap system.

My problem is that the test from LDAP hub#Debugging will work, but the log in from the web page will fails.

The ldap login itself looks , because I will see the user ldap data in it.

In the debug log I see this error:

Ran LDAP search for '(sAMAccountName=XXX)' in 0.0094449520111084 seconds.

Authenticated new user:

Authenticated new user: MediaWiki\Extension\LDAPProvider\Client::getUserDN: search with array (

  'base' => 'dc=foo,dc=foo',

  'filter' => '(sAMAccountName=)',

  'attributes' =>

  array (

   0 => '*',

   1 => 'memberof',

  ),

)

ldap_search( $linkID, $baseDN = 'dc=foo,dc=foo', $filter = '(sAMAccountName=)', $attributes = [ '*', 'memberof' ], $attrsonly = , $sizelimit = , $timelimit = , $deref =  );

# returns Resource id #38

ldap_count_entries( $linkiID, $result = 'Resource id #38' );

# returns 0

Could not get user DN!


Versions:

Installed software

Product Version
MediaWiki 1.34.0
PHP 7.3.13 (fpm-fcgi)
MariaDB 10.3.21-MariaDB
ICU 62.1

Installed extensions:

LDAPAuthentication2 1.0.1 (cb07184)

LDAPAuthorization 1.0.0 (95d34b2)

LDAPProvider 1.0.1 (04dc101)

LDAPUserInfo 1.0.0 (2107f5a)

PluggableAuth5.7 (17fb1ea)


Plugin config:


Have anybody an idea what the problem is?

Tuxwiki (talkcontribs)

After change sAMAccountName to samaccountname, now the error "Could not get user DN!" is gone and the log will end with:

User is authorized

Real name and email address did not change.


But the on the webpage itself only an error is shown:

MediaWiki\Extension\LDAPProvider\LDAPNoDomainConfigException from line 61 of /usr/share/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php: No configuration available for domain 'invaliddomain'!

Backtrace:

#0 /usr/share/mediawiki/extensions/LDAPProvider/src/ClientFactory.php(55): MediaWiki\Extension\LDAPProvider\DomainConfigFactory->factory(string, string)

#1 /usr/share/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(145): MediaWiki\Extension\LDAPProvider\ClientFactory->getForDomain(string)

#2 /usr/share/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(101): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->createLdapClientForDomain()

#3 /usr/share/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(90): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->process()

#4 /usr/share/mediawiki/includes/Hooks.php(174): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession::callback(User)

#5 /usr/share/mediawiki/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)

#6 /usr/share/mediawiki/includes/user/User.php(375): Hooks::run(string, array)

#7 /usr/share/mediawiki/includes/user/User.php(2238): User->load()

#8 /usr/share/mediawiki/includes/MediaWiki.php(570): User->getName()

#9 /usr/share/mediawiki/includes/MediaWiki.php(525): MediaWiki->setDBProfilingAgent()

#10 /usr/share/mediawiki/index.php(44): MediaWiki->run()

#11 {main}

Eduhernandezm (talkcontribs)

Hi,

I have been looking in the forums to find a solution to the error that is being presented to me. I am trying to upgrade from version 1.32.2 to version 1.34.4 which is the last of the 1.34 branch. Following the instructions, which are simple, when launching php update.php to update the database with the changes to be made internally, it returns the following error:


[error] 32436 # 32436: * 11154 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'AuthPlugin' not found in /var/www/wiki/extensions/LdapAuthentication/LdapAuthenticationPlugin.php on line 21


I have validation configured with the "LdapAuthenticacion" plugin against three different LDAPs that work perfectly in version 1.32. I have verified that inside the includes folder I have the file "AuthPlugin" What may be missing or why the update is failing?


Kind regards.

Reply to "1.34 Login fails, but test will work (Active Directory)"