[dokuwiki] Re: Support for ntlm authentication under Windows.

  • From: Krzysztof Kowalczyk <kkowalczyk@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 31 May 2005 19:15:38 -0700

On 5/31/05, Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:
> 
> Krzysztof Kowalczyk <kkowalczyk@xxxxxxxxx> wrote:
> 
> > I've added a support for simple ntlm authentication under Windows.
> > NTLM is useful when you want to deploy a wiki in a Windows environment
> > (e.g. company's intranet) and allow people to use their existing
> > Windows login/password to access wiki.
> >
> > My approach:
> > * needs to install ntlm module
> > (http://www.gknw.net/development/apache/apache-1.3/win32/modules/) and
> > protect dokuwiki directory with .htaccess to require logged in user.
> > NTLM module sets REMOTE_USER env variable (but not
> > $_SERVER['REMOTE_USER'], for some reason)
> 
> Hmm isn't this a general "remote auth" module? How is it specific to NTLM? 
> The same should work for any other Apache auth module. I think such a general 
> method would be more helpful. I think there is another suggestion somewhere 
> in the bugtracker already...

This approach works for any auth module that:
* protects the pages somehow (so that dokuwiki can rely on the fact
that any request that goes through is already authenticated)
* sets $REMOTE_USER env variable to apropriate user name

I know NTLM does that. Lacking knowledge of other "remote auth"
modules, I don't know if the above is true or not.

Either way, when it comes to code, the only changes that would be
needed for the patch I've sent is re-naming 'ntlm' to some generic
name ("generic_remote_auth" ?). It's a trivial change (although
there's one ntlm-specific thing: changing name from "domain\\user" to
just "user").

I would still hope that you integrate this patch into mainline (as is
or renamed to whatever name you think is apropriate).

Krzysztof Kowalczyk | http://blog.kowalczyk.info
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: