On 6/19/2012 8:57 AM, Heiko W.Rupp wrote:
Am 19.06.2012 um 14:36 schrieb John Mazzitelli:
> This is something Jay talked about (and others) a while ago. What we should have done
in the beginning was create a generic "Audit Trail" subsystem - and have all the
other subsystems log messages there. That way, we don't have N different, isolated
"history" trails and N different ways to purge and query them. Unfortunately, we
didn't do that - so we have things like (what you see) the operation history audit, we
also have rsource config history, plugin config history, etc.
Yep. And what "bothers" me most here, is that it is no "real" audit
in sort of a "write-only" mode.
> It would be alot of work (though probably doable - maybe not easy to upgrade from old
schema to new however) - we could rip out all these isolated history tables and design and
build an "Audit" subsystem that all other subsystems can share.
What we could do is to have a central audit subsystem with a relatively simple table
id,timestamp,user,subsystem,<code>,<message>
where the code is some subsystem specific code (e.g. 'alert' or
'alertdefiniton') to denote the internal part of the subsystem.
We would add a simple "Audit.submit()" method, that internally adds data to the
audit table, and which can be accessed a little bit
like a Logger call.
So when above "deleteOperationHistory" runs, it could call
Audit.submit("operations","delete history","Item with id xyz and
status bla");
So even if the operation history item itself is deleted, a trail of its existence is
still there.
Similar for changes in alert conditions.
Audit.submit("alert","condition","Changed conditions from abc to
xyz");
Right, I was arguing a while back for a global (i.e. central) audit that
could replace or supplement some of the history stuff we have today.
And also add more security auditing, like tracking login/logouts and
whatever other actions deemed interesting.
The original proposal was motivated by the desire to remove the DELETED
status we have in place, and support with lots of special case code,
only to preserve some history information if a resource is removed and
then shows up again (which is a horrible feature).
Heiko