Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

MediaWIKI integration with Active Directory

Leer en espanol
MediaWIKI integration with Active Directory

Table of contents

https://www.mediawiki.org/wiki/Special:ExtensionDistributor/LdapAuthentication We can also download it through git at the following URL: https:// ===

We download the LdapAuthentication extension:

https://www.mediawiki.org/wiki/Special:ExtensionDistributor/LdapAuthentication

We can also download it through git at the following URL:

https://gerrit.wikimedia.org/r/#/q/status%3Aopen+project%3Amediawiki/extensions/LdapAuthentication

In my case, since I have MediaWiki 1.27 installed under centOS 7, I download that version

bash
wget https://extdist.wmflabs.org/dist/extensions/LdapAuthentication-REL1_27-b0dba33.tar.gz

We unzip the package

bash
tar -xzf LdapAuthentication-REL1_27-b0dba33.tar.gz -C /var/www/html/extensions

Database configuration

We create the tables in the wikimedia database.

sql
CREATE TABLE /*_*/ldap_domains (

— IF for domain

domain_id int not null primary key auto_increment,
— domain itself

domain varchar(255) binary not null,
— User to which this domain belongs

user_id int not null
) /*$wgDBTableOptions*/;
CREATE INDEX /*i*/user_id on /*_*/ldap_domains (user_id);

We configure MediaWiki

We add in the configuration file (LocalSettings.php) the following lines:

bash
vi /var/www/html/LocalSettings.php
require_once( «$IP/extensions/LdapAuthentication/LdapAuthentication.php» );

$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array( ‘redorbita.es’ );
$wgLDAPServerNames = array( ‘redorbita.es’ => ‘CDP01.redorbita.es’ );
$wgLDAPSearchStrings = array(

‘redorbita.es’ => ‘USER-NAME@redorbita.es’,

‘exampleNonADDomain’ => ‘CN=USER-NAME,CN=Users,DC=redorbita,DC=es’

);
$wgLDAPSearchAttributes = array(

‘redorbita.es’ => ‘sAMAccountName’

);
$wgLDAPBaseDNs = array(

‘redorbita.es’ => ‘CN=users,DC=redorbita,DC=es’

);
$wgLDAPEncryptionType = array( ‘redorbita.es’ => ‘clear’ );
$wgLDAPUseLocal = true;

$wgMinimalPasswordLength = 1;

All the best

:wq!

Comments