[Zope-DB] Automatic capture of user ids for auditing

Charlie Clark charlie at egenix.com
Tue Nov 6 15:26:21 EST 2007


Am 06.11.2007, 20:12 Uhr, schrieb Ken Winter <ken at sunward.org>:

Hi Ken,

an interesting problem although probably not unique!

> It seems like the components that might be able to pass this info to the
> database are the ZSQL methods and/or the database adapter (PsycopgDA, in
> this case).  So, questions:
> 1. Is there any way to get the info across with either of these  
> components
> as they currently exist?  If so, how?

Not currently as far as I know.

> 2. Would it be possible to modify or add on to either of the to do what  
> is
> needed?  If so, how?

Yes, you could quite easily extend the DA to pass the current Zope user  
and possibly extend any statements as required. Not sure if that is how  
you would want to do it that way. Have you an idea how you want to do this  
on the PostgreSQL side? Any chance of accepting an additional parameter?

> 3. Is having one Dhatabase user per Zope-level end user an alternative  
> worth
> considering?

I would think not as it is very much against the connection pool principle.

> 4. Any other ideas about how to solve this problem?

You might want to authenticate users for PostrgreSQL and Zope against the  
same system say using mod_auth? for apache and either XUF or PAS for Zope,  
as both allow you to hold your users outside of Zope. I'm not sure whether  
you wouldn't still be stuck with the problem of having the connection tied  
to a one user while wanting to log another.

Charlie
-- 
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::

     eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611


More information about the Zope-DB mailing list