Jump to content
  • 0

Authentication with LDAPAuthentication2 (LDAP Stack) in Docker Mediawiki


Leo Jiménez

Question

Hello. I am trying to configure a LDAP authentication (not Active Directory) on my new Docker Mediawiki installation. But it is not working and I don't know why.

I appreciate any suggestion you can give me.

 

The logs are theoretically activated but these don't show much information.

Logs enabled in file LocalSettings.php:

$wgShowError = true;
$wgShowErrors = true;
$wgShowSQLError = true;
$wgShowSQLErrors = true;
$wgShowException = true;
$wgShowExceptions = true;
$wgShowExceptionDetails = true;

// Groups from MediaWiki core
$wgDBerrorLog = '/var/log/mediawiki/dberror.log';
$wgDebugLogGroups = array(
  'resourceloader' => '/tmp/resourceloader.log',
  'exception' => '/tmp/exception.log',
  'error' => '/tmp/error.log',
  'ratelimit' => '/tmp/ratelimit.log',
  'exception-json' => '/tmp/exception.json',

  // Extra log groups from your extension
  'LDAPProvider' => '/tmp/LDAPProvider.log',
  'LDAPAuthentication2' => '/tmp/LDAPAuthentication2.log',
  #'somegroup' => '/var/log/mediawiki/somegroup.log',
);

 

Logs enabled in /usr/local/etc/php/php.ini-production file:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
log_errors = On

 

Plugins enabled (according to documentation):

  • PluggableAuth

  • LDAPProvider

  • LDAPAuthentication2

 

Configuration in LocalSettings.php:

(I need a user with read rights?)

# LDAP
wfLoadExtension( 'PluggableAuth' );
$wgPluggableAuth_EnableAutoLogin = false; #if true, disables the logout option
$wgPluggableAuth_EnableLocalLogin = true;

wfLoadExtension( 'LDAPProvider' );
$LDAPProviderDomainConfigs = "$IP/ldapprovider.json";

wfLoadExtension( 'LDAPAuthentication2' );
$LDAPAuthentication2AllowLocalLogin = true;

 

ldapprovider.json file:

{
  "XXX": {
    "connection": {
      "server": "ldap.xxx.yy.zz",
      "port": "636",
      "enctype": "ssl",
      "options": {
        "LDAP_OPT_DEREF": 1
      },
      "basedn": "dc=xxx,dc=yy,dc=zz",
      "userbasedn": "cn=users,cn=accounts,dc=xxx,dc=yy,dc=zz",
      "searchstring": "uid=USER-NAME,cn=users,cn=accounts,dc=xxx,dc=yy,dc=zz"
    },
    "userinfo": {
      "attributes-map": {
        "email": "mail",
        "realname": "cn"
      }
    }
  }
}
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
2 hours ago, osasuyi precious Jesus chr said:

You do not know your Lord your god I wish you know your Lord your god you gonna be telling your Lord your god that you do not know the answer to my question I'm joking go to the Holy Bible I am the Holy Bible and the Holy cro I am the one that died on the four corners of and the precious blood of Jesus the god of 92 Lord Jesus Christ the owner everything that was on earth's of the Lord the beginning was the word and the word was with God and the and it was made flesh and dwelt Among Us I'm the water was made flesh and where's I want you and the holy spirit and I'm the only cost and a measure of the world I am Sanna

Screenshot_20221005-235631_Facebook(1).jpg

Screenshot_20221005-213638_Chrome.jpg

Screenshot_20221101-225929_Ecosia.jpg

Screenshot_20221009-154533_ColorNote.jpg

Tell your messiah that I need him to turn a lot of water into wine. I need it for this Friday.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.