Tags:
authentication1Add my vote for this tag create new tag
view all tags

Question

I would like to use WebAuth and Kerberos in front of TWiki to authenticate users. The problem is that we can't easily set the value for the variable REMOTE_USER, which is what TWiki seems to use for authentication. A previous user had a similar problem reported here, in which he replaced all instances of REMOTE_USER with HTTP_AUTH_USER. This seems like a possible solution, but it involves hacking the base code. Before attempting to do so, I would like to ask:

  • Is this indeed the proper method for solving this problem? Wouldn't this jeopardize the TWiki instance for future upgrades? Or is there another, better way to do this?
  • If this is the way, which of the base TWiki files should be modified in order to efficiently and effectively change the authentication variable?

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL4u5 Linux
Web server: Apache 2
Client OS: RHEL4
Web Browser: Firefox 2
Categories: Authentication, Authorisation

-- JohnDeStefano - 13 Aug 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

The solution you found seems a bit over-engineering the wrong way.

I'd simply add a line to bin/LocalLib.cfg:

   $ENV{REMOTE_USER} ||= $ENV{WEBAUTH_USER};

Probably you will need to "escape" the @ sign which occurs in Kerberos principals so that TWiki will not mis-interpret it as a Mail address, with an additional line:

   $ENV{REMOTE_USER} =~ tr/@/_/;

Changes in bin/LocalLib.cfg are robust to upgrades since this file is supposed to hold installation specific data.

-- HaraldJoerg - 13 Aug 2007

Good fix, closing...

-- PeterThoeny - 03 Oct 2007

One comment to add, this method is what I used to integrate SUN's Identity Manager using the Apache Policy Agent v2.1. Works perfectly. But, I am still working on the Idm Group and TWiki Group integration.

-- AdamRoybal - 07 Aug 2008

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-08-07 - AdamRoybal
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.