Not exactly a zend framework question so feel free to ignore or kick this
out.

I need to implement audit logging on various database tables. Sounds simple
but it's not.
There are multiple applications that connect to the database server, my
zend framework application is just one of these. Others might be desktop
application or barcode scanning application or db admin tool.
So i feel the best place to implement the audit logging is on the database
server itself. However this gives a problem with identifying which user is
making the changes.

Both zend_db and doctrine (within a zend framework application) make the
actual database connection using a common application level user account,
say admin or root (ouch).
Then users are authenticated against a table within the database. This
seems to be fairly common in web applications. However it makes it
impossible to implement database audit logging on the database server and
know who the user is.

I am making any sense? I have two questions;

1. Can i connect zend_db or doctrine using the actual user's credentials,
instead of hard-coding connection info in a config file?
2. Would this be considered good (or at least ok) practice?

(if anyone has good implementations of audit logging in MySQL or Firebird,
please share).

srayner

Reply via email to