Hi Mediawiki folks,
I am trying to set up authentication for our existing wiki against an external database.
I currently do this successfully for my subversion database using Apache's
mod_auth_pam module. For our wiki, I would like to use a similar approach. I tried to
use
http://www.mediawiki.org/wiki/Extension:HttpAuth. Does this make sense?
I am using
MediaWiki 1.14.0
PHP 5.2.6-1+lenny3 (apache2handler)
MySQL 5.0.51a-24+lenny1
I downloaded the HttpAuth module, added the following lines to LocalSettings.php:
session_start();
if ((!empty($_SERVER['PHP_AUTH_USER']) &&
!empty($_SERVER['REMOTE_USER'])) || $_COOKIE['fpwiki_en_UserID']) {
require_once("$IP/extensions/HttpAuthPlugin.php");
$wgAuth = new HttpAuthPlugin();
$wgHooks['UserLoadFromSession'][] =
array($wgAuth,'autoAuthenticate');
}
I then added the following lines to http.conf:
<Location /w/Special:UserLogin>
AuthType "basic"
AuthName "wiki"
AuthPAM_Enabled on
AuthPAM_FallThrough Off
SSLRequireSSL
Require valid-user
</Location>
The result is that when users visit Special:UserLogin, they get a pop-up screen and must
authenticate using PAM. They can then see the Special:UserLogin screen and must login
again (which isn't compared to our external database). This isn't quite what I
wanted. I am new to Apache and web administration. Does anyone have any advice?
Thank you.
Regards,
Melissa Soriano