Tiry wrote:
Sean Radford a écrit :
Hi,
I may have a requirement to audit all document downloads.
Presumably a download action could be made to add an entry into the
Event Log (History) for the document?
Yes, this is not the case by default but this can be added.
The usual way to add data into the event logs is :
- send an event on the Nuxeo standard topic (should be NXPMessages)
- add the needed config to audit so that the new event is logged
The real question is from where to send the event :)
If you are only interested in logging download from the webapp I see 3
solutions :
1 - You could add a filter on the download url.
Be aware that your filter must be behind the authentication filter if
you want to be able to create the JMS message.
2 - Another solution is to modify the file download codec
(downloadFile codec) so that it point to a "home made" Seam Bean that
would send the event and then forward the call to the standard Nuxeo
one ( <actionBinding>#{documentActions.download}</actionBinding>).
3 - Another solution could be to override the Nuxeo Bean (ie : use
Seam @Install(precedence=APPLICATION)) by you own bean that derives
from Nuxeo one but sends the needed JMS event.
I would personaly vote for solution 2 since this make your dev
completely pluggable and this is quite simple.
For sending JMS events you can use the MessageProducer.
producer =
Framework.getService(DocumentMessageProducer.class);
Tiry
Any other/better ways?
Any reasons why this might be a bad thing to do?
Anyone that can point me in the direction of the relevant APIs to use?
Thanks,
Sean
I guess the intention is to differentiate between business actions that
could perform an (eventually the same) operation on the CoreSession. In
this case having an extra parameter on methods in exposed in CoreSession
could help, but is not desired since this type of audit is not common.
So your second pointed idea will fit better. And having a core
listener/JMS that get and log that info from DocumentContext.
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm