Credential caching for Apache/mod_python

Daniel Klaffenbach <daniel.klaffenbach-jNDFPZUTrfQ+B2oLq8eQJv4efur1V5z/[email protected]> Thu, 10 Dec 2009 17:57:51 +0100
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
Hi,

in my setup mod_python is being used for authentication (with 
PythonAuthenHandler). The Authentication process is pretty complex 
(hybrid mySQL/RADIUS).

Authentication with mod_python itself works very well on this setup. 
However there are some speed and server load issues. We are serving 
mostly SVN and WebDAV stuff over https.

Now whenever a user wants to upload a large number of small files to 
his/her DAV share, quite a few WebDAV commands are being issued.

The problem is that for every simple DAV command (PROPFIND, GET, 
OPTIONS,...) the Python auth handler is being asked if the 
user-provided credentials are valid - Apache does not seem to do any caching.

As a result of this the RADIUS and mySQL Servers are being asked for a 
username/password TWICE for every single file the user uploads, 
downloads or just lists in a directory, which is *really* bad.

So my question is: Is there a good way of telling Apache and/or 
mod_python to cache the "apache.OK" reply from the Python auth handler 
for a few seconds?

BTW: I am on Scientific Linux 5.3 with Apache 2.2.3 and mod_python 3.2.8.

Thanks in advance!


- Dan Klaffenbach

_______________________________________________
Mod_python mailing list
[email protected]
http://mailman.modpython.org/mailman/listinfo/mod_python
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEABECAAYFAkshKJUACgkQM8RD99ZskA8NXACgngs6L5X8THvCWlm4vGS1Lsht
zVoAn1nHa8/soUu0HFIw8Z+2qdDKudJ1
=FyCP
-----END PGP SIGNATURE-----