Hello,
I was wondering if you could give me some advice on implementing a fine-grained audit trail. By fine-grained I mean auditing when content is viewed, modified, etc.. and when and by whom (a little more functionality than the auditable aspect can provide)
Right now, I am focusing on auditing when content is viewed. I am planning on implementing a pointcut advisor that intercepts the getReader method on the Content Service, and then creating the appropriate audit trail entry. I am fairly confident that this approach is solid, however if you disagree please let me know.
Where I am really looking for advice is how to actually store the audit trail data. I can not decide whether I should:
A) go to the trouble of creating an audit table, and implementing all of the hibernate DAO layer
- or -
B) if I should just somehow store the audit trail as a node(s), and utilize the Alfresco framework that is already in place.
Right now I am leaning towards option A, but I would like to further explore option B.
If I were to use option B, does the following architecture seem sound?:
Define a new type (subtype of sys:base): auditTrailItem
auditTrailItem has the following attributes: auditEvent, timestamp, authority
In the auditable aspect, define a one-to-many association with type auditTrailItem.
Then each time an auditable event occurs, a new auditTrailItem would be created, and associated with the content with the auditable aspect.
Phew…Any comments would be greatly appreciated!!
-Ryan