[kforge-user] Authentication not working

Rufus Pollock rufus.pollock at okfn.org
Thu Sep 6 15:38:32 UTC 2007


Gunnar Johansson wrote:
> Hi all,
> 
> Sorry, I was too quick in my earlier post..
> So, initially I had trouble authenticating when trying to access  
> project services. Then I "hatched" the python egg for kforge which  
> solved that problem. But now authentication only works if I log in  
> through the kforge web interface - that is, not when I access a  
> service directly..  For example, accessing a svn rep. through the  
> terminal (svn co ...) doesn't work for me.  The apache error log just  
> says "user gunjo not found".
> 
> Anyone else had this problem?
> 
> I'm setting up a dedicated machine acting as a project server, so I'm  
> willing to try any linux distro as long as it works fine with  
> kforge.. Which system have you been developing and testing on?  I  
> currently used Ubuntu 6.06.

Ok, I've managed to reproduce this on an Ubuntu machine so it is a bug 
and its caused by the use of this line in the autogenerated Apache 
config file:

    AuthUserFile /dev/null

Ironically this was specifically added to get auth working under Apache 
2.2 (and does work under Apache 2.2) but obviously causes problems with 
Apache 2.0 (which is what Ubuntu 6.06 'dapper' uses). This is a little 
surprising since one of our test machines uses dapper but this kind of 
thing is hard to test automatedly and so the bug must have somehow crept 
in. Anyway the fix is simple just patch kforge/apache/apacheconfig.py as 
follows (I'll also be commiting this change into trunk and kforge-0.13 
branch asap):

--- src/kforge/apache/apacheconfig.py   (revision 1217)
+++ src/kforge/apache/apacheconfig.py   (working copy)
@@ -237,12 +237,12 @@
              PythonAccessHandler kforge.handlers.projecthost::accesshandler
              PythonAuthenHandler kforge.handlers.projecthost::authenhandler
              AuthType basic
-            AuthUserFile /dev/null
              AuthName "%s Restricted Area"
              Require valid-user
              # Only available in mod_auth_basic available in apache >= 2.1
              <IfModule mod_auth_basic.c>
                  AuthBasicAuthoritative Off
+                AuthUserFile /dev/null
              </IfModule>

Regards,

Rufus




More information about the kforge-user mailing list