[Zope] Re: exUserFolder and PAM - caching?

Andrew Kenneth Milton akm@theinternet.com.au
Tue, 25 Sep 2001 02:22:29 +1000


+-------[ Mayers, Philip J ]----------------------
| All,
| 
| Just a recipe for exUserFolder with PAM authentication that works for me.

[snip]

| The one problem is that the usRemoteAuthMethod gets called on every page
| request, it isn't cached, which means for remote auth methods (e.g.

This is the zope mechanism, and indeed the http mechanism. Basic Auth
is sent for every page as well.

| Kerberos/LDAP/SMB PAM modules) the load might be quite high. Any ideas, let
| me know.

That's why remote things are best done with persistent sources ala an PAM
AuthSource, where you can cache user stuff (the IMAP/POP sources also
do this).

You could also I guess set a property on yourself or dummy object with 
username as the key and the last time checked, so you can avoid the 
overhead if last checked was within 5 minutes say.

It's trivial to convert one of the other AuthSources, if you've already
got an External Method to do the hard work, then you don't even need
have proxy roles d;)

Actually converting usAuthSource would be the easiest, since it's basically
empty already, and it heavily commented.

-- 
Totally Holistic Enterprises Internet|                      | Andrew Milton
The Internet (Aust) Pty Ltd          |                      |
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068    |akm@theinternet.com.au|