Topic on Extension talk:LDAPProvider

Using 1.39.6 mediawiki, php 8 -- someone help?

3
2601:447:D080:22C5:65D4:CAC4:7441:16F9 (talkcontribs)

When I try using my configuration I get this error:

[121fdde4262ac3efdca31459] 2024-02-05 15:34:10: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

and My LDAP log tells me this:


*****

2024-02-05 15:30:10 xxx my_wiki: In execute()

2024-02-05 15:30:10 xxx my_wiki: Getting PluggableAuth instance

2024-02-05 15:30:10 xxx my_wiki: Plugin name: LDAPAuthentication2

2024-02-05 15:30:10 xxx my_wiki: Try to authenticate user: username

2024-02-05 15:30:10 xxx my_wiki: Not local login. Checking LDAP...

2024-02-05 15:30:10 xxx my_wiki: LDAP domain: 123

2024-02-05 15:30:11 xxx my_wiki: LDAP login succeeded.


Here is my configuration:

wfLoadExtensions( [

'LDAPProvider',

'PluggableAuth',

'LDAPAuthentication2'

] );

$LDAPAuthentication2AllowLocalLogin = true;

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                "123" => [ // lowercase domain name--uses case-sensitive match

                        "connection" => [

                                "server"            => "privateinfo", // LDAP server (AD server for me)

                                "basedn"            => "dc=123,dc=core,dc=privateinfo,dc=com", // Base DN for searching for user attributes

                                "groupbasedn"       => "dc=123,dc=core,dc=privateinfo,dc=com", // Present, but I don't use

                                "userbasedn"        => "dc=123,dc=core,dc=privateinfo,dc=com", // Used for authentication

                                "searchattribute"   => "samaccountname", // lowercase (case-sensitive)

                                "searchstring"      => "123\\USER-NAME", // The form for AD

                                "usernameattribute" => "samaccountname", // For AD

                                "realnameattribute" => "cn",

                                "emailattribute"    => "mail"

                        ],

                        "groupsync" => [ // Intentionally empty for me, not using

                        ],

                        "userinfo" => [ // Already have the three fields above I want

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};

$wgPluggableAuth_Config['Log In (123)'] = [

    'plugin' => 'LDAPAuthentication2',

    'data' => [

        'domain' => '123'

    ]

];

2601:447:D080:22C5:65D4:CAC4:7441:16F9 (talkcontribs)

I fixed this issue. I was reading in the wrong database.

Sorry about that!

Osnard (talkcontribs)

Thanks for the feedback!