cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Fine-grained audit trail

rberg
Champ in-the-making
Champ in-the-making
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
6 REPLIES 6

rberg
Champ in-the-making
Champ in-the-making
Quick Addition:

In regards to:

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.

I believe that another approach instead of intercepting the getReader method would be to implement a new Content Service Policy of onContentRead, and then bind a behaviour within the AuditableAspect to handle that.  Another decision….argh!

davidc
Star Contributor
Star Contributor
Hi Ryan,

In the latest code lines, there are some new policies associated with Content including Content Read.  There's an example called ContentHits (in the new 'Extension Samples' project showing its use.

With regards to storing your audit trail, it really depends on how you want to access it.  If you decide to store it in the Repository, you'll be able search, transform, export etc.  One suggestion is that you could dedicate a new repository store to the audit trail - that way it'll have its own search index and   the nodes will be kept seperate from the primary store of folders and content.

csiege
Champ in-the-making
Champ in-the-making
Any plans on this functionality being included in alfresco? 🙂  This is exactly what I am looking for to satisfy compliance.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Auditing should be in 1.4.
See http://wiki.alfresco.com/wiki/Audit for an idea of what is planned.

Regards

Andy

csiege
Champ in-the-making
Champ in-the-making
Sounds great!  Can't wait 😉

chandu7ee
Champ in-the-making
Champ in-the-making
Hi.
here i written some useful settings for audit info this may more helpful to you..!

http://aboutalfresco.blogspot.com/2009/12/audit-configuration-in-alfresco.html
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.