I have some trouble setting up LDAPGroups on Mediawiki LTS 1.35.8. Since the discussion site to this extension seems quite inactive, I want to try my luck here.
I've set up LDAPProvider successfully without any problems. But once I activate LDAPGroups it gives me the error
Original exception: [85942cc925c78b2bb06ab606] /index.php/Hauptseite
MediaWiki\Extension\LDAPProvider\LDAPNoDomainConfigException from line
60 of
/var/www/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php:
No configuration available for domain 'domain'!
Now I can replace "LDAP" in the ldapprovider.json with the domain, that's also actually in the table mediawikildap_domains, but that only changes the error to
[a3278aaca2ec924fb8299178] /index.php/Hauptseite TypeError from line
47 of /var/www/mediawiki/includes/config/HashConfig.php: Argument 1
passed to HashConfig::__construct() must be of the type array, null
given, called in
/var/www/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php
on line 74
Backtrace:
#0 /var/www/mediawiki/extensions/LDAPProvider/src/DomainConfigFactory.php(74):
HashConfig->__construct()
#1 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(154):
MediaWiki\Extension\LDAPProvider\DomainConfigFactory->factory()
#2 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(102):
MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->setSuitableDomainConfig()
#3 /var/www/mediawiki/extensions/LDAPProvider/src/Hook/UserLoadAfterLoadFromSession.php(90):
MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession->process()
#4 /var/www/mediawiki/includes/HookContainer/HookContainer.php(329): MediaWiki\Extension\LDAPProvider\Hook\UserLoadAfterLoadFromSession::callback()
#5 /var/www/mediawiki/includes/HookContainer/HookContainer.php(132): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#6 /var/www/mediawiki/includes/HookContainer/HookRunner.php(4348): MediaWiki\HookContainer\HookContainer->run()
#7 /var/www/mediawiki/includes/user/User.php(393): MediaWiki\HookContainer\HookRunner->onUserLoadAfterLoadFromSession()
#8 /var/www/mediawiki/includes/user/User.php(2156): User->load()
#9 /var/www/mediawiki/includes/MediaWiki.php(594): User->getName()
#10 /var/www/mediawiki/includes/MediaWiki.php(545): MediaWiki->setDBProfilingAgent()
#11 /var/www/mediawiki/index.php(53): MediaWiki->run()
#12 /var/www/mediawiki/index.php(46): wfIndexMain()
#13 {main}
I already tested if the config added to ldapprovider.json makes any trouble, but everything loads fine as long as LDAPGroups is disabled. Now what am I doing wrong?
Excerpt from LocalSettings.php:
# LDAP-Authentifizierung
wfLoadExtension( 'LDAPProvider' );
$LDAPProviderDomainConfigs = "/var/www/mediawiki/ldapprovider.json";
wfLoadExtension( 'PluggableAuth' );
$wgPluggableAuth_EnableLocalLogin = false;
$wgPluggableAuth_ButtonLabel = "Anmelden";
wfLoadExtension( 'LDAPAuthentication2' );
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
wfLoadExtension( 'LDAPGroups' );
Excerpt from the ldapprovider.json where I added the config
"groupsync": {
"mechanism": "mappedgroups",
"mapping": {
"sysop": "cn=sudoers,ou=groups,dc=domain,dc=de"
}
}
Our setup:
Software |
Version |
MediaWiki |
1.35.8 |
PHP |
7.4.30 (fpm-fcgi) |
LDAPAuthentication2 |
1.0.3 |
LDAPProvider |
1.0.5 |
PluggableAuth |
5.7 |
Debian |
11.5 |