Topic on Project:Support desk

How do I configure LDAP Authentication for MediaWiki 1.33?

This topic was hidden by Jörgi123
Reason: solved by updating
3
87.123.197.159 (talkcontribs)

I am using LDAP Authentication and it worked fine with MediaWiki 1.32. This is the configuration I have used in MediaWiki 1.32 and which worked there:

$wgGroupPermissions['*']['autocreateaccount'] = true;
require_once "$IP/extensions/LdapAuthentication/LdapAuthentication.php";
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array(
	'ldap.mydomain.org'
);
$wgLDAPServerNames = array(
	'ldap.mydomain.org' => 'ldap.mydomain.org',
);
$wgLDAPUseLocal = false;
$wgLDAPEncryptionType = array(
	'ldap.mydomain.org' => 'ssl'
);
$wgLDAPPort = array(
	'ldap.mydomain.org' => '636',
);
$wgLDAPSearchStrings = array(
	'ldap.mydomain.org' => 'uid=USER-NAME,ou=people,dc=company,dc=org'
);
$wgLDAPWriterDN = array(
	'ldap.mydomain.org' => 'cn=wiki.mydomain.org,ou=services,dc=company,dc=org'
);
$wgLDAPWriterPassword = array(
	'ldap.mydomain.org' => 'VjenWj7Dsd5jN7GftJ7V3'
);

However, after the upgrade to MediaWiki 1.33 authentication stops working. Special:UserLogin tells me: "Incorrect username or password entered".

What is the problem?

I read that $wgAuth was removed in MW 1.33, but Extension:LDAP_Authentication/Configuration still mentions it.

What do I have to change in order to make LDAP Authentication work again?

Osnard (talkcontribs)
2001:16B8:1071:D300:7819:E3A6:575B:439 (talkcontribs)

Thanks for the input, Osnard!

However, I currently believe it is easier for me to try a fix in LDAP Authentication (which was working before), instead of setting up something completely new. ;-)

I have now replaced $wgAuth = new LdapAuthenticationPlugin(); with this:

$wgAuthManagerAutoConfig['primaryauth'] += [
	LdapPrimaryAuthenticationProvider::class => [
		'class' => LdapPrimaryAuthenticationProvider::class,
		'args' => [ [
			// Do not fall through to LocalPasswordPrimaryAuthenticationProvider
			'authoritative' => true,
		] ],
		'sort' => 50,
	],
];

The error message still is unchanged: "Incorrect username or password entered".

Can I give you more information so that you can help me better?