[mod_python] Setting req->user for mod_dav_svn

Deron Meranda deron.meranda at gmail.com
Mon Jul 31 15:40:06 EDT 2006


I am using a PythonAccessHandler for all my authentication and
authorization needs; and it is based on an encrypted cookie technique
rather than the normal HTTP aaa methods.  As such I have not
been using any of the Apache Auth* or Require* directives.  As
everything complex I've used until now has been Python based,
I just pass the user credentials around inside the mod_python
req object.

But I'm now trying to set up a subversion mod_dav_svn module
(C based), and I want my same authentication handler to also both
guard access to the svn location (which I can do) as well as telling
SVN what the username is (for it to record it in file revision logs, etc).
That later is what I don't know how to do.  The svn module appears
to get the username it uses from the Apache r->user pointer.

Can I set the req->user member from within mod_python (the docs
say it is read-only), and what do I need to look out for in attempting
to do so.  I essentially want to synthesize a username in the
Apache request structure, but I don't want any of the normal Apache
Auth* stuff to be invoked.

BTW, this is currently Apache 2.0.52 and mod_python 3.2.10.
-- 
Deron Meranda


More information about the Mod_python mailing list