[pmwiki-users] Easy .htaccess authentication setup?

Kathryn Andersen kat_lists at katspace.homelinux.org
Thu Jun 22 17:20:13 CDT 2006


On Thu, Jun 22, 2006 at 09:46:38AM -0400, Alan Hoyle wrote:
> On 6/22/06, Ian Barton <lists at manor-farm.org> wrote:
> I want to have a Wiki that is readable by unauthenticated users, but
> the only people that can edit it will be authenticated by an external
> authentication method.  (
> 
> Right now, I can use a .htaccess file to create something that
> requires Apache authentication (using our kerberos infrastructure) for
> everything, but I can't set it up for unauthenticated reading.

Unfortunately, the way Apache access works, is that it controls *access*
-- that is, whether or not you can read a page -- so trying to make it
distinguish between read access and edit access is impossible.  I ran
into exactly that problem myself and I gave up.

The solution which Neil Herber suggested could work (using Location
directives rather than Directory directives) but it seems rather
inconvenient for your users to have to decide, beforehand, whether they
are going to edit the wiki (and thus choose the /edit/wiki/ path) or
just read it.  Since usually one would start off reading the wiki
and then decide whether one would edit it.

Though... thinking about this some more... if one could make it so that
edit/login had to be done via a *particular* page, and then use an
Apache Location directive to control read-access to that page, and
include the scripts/httpauth.php file in one's local/config.php
(with $EnableRemoteUserAuth = 1;) then one could actually use the Apache
authentication mechanism to do the login.

So, that leaves the question of whether one can change the action=login
action to force you to go to a particular page, to force the Apache
authentication mechanism.  Is this possible?  Checking with my own wiki,
when one does a action=login, one's URL doesn't change (which of course
is the normal desired behaviour).

So, is there a way to do that?

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe




More information about the pmwiki-users mailing list