AnsweredAssumed Answered

How to get READ audit data on cm:content?

Question asked by lex91 on Mar 27, 2018
Latest reply on Apr 2, 2018 by lex91

Hello

 

I am trying to get audit data for READ events on nodes of type cm:content.

I'm using an alfresco-all-in-one project (artifactId is alfresco-all-in-one) created with the maven alfresco sdk so I added two files in "alfresco-all-in-one/alfresco-all-in-one-platform-jar/src/main/resources/alfresco/module/alfresco-all-in-one-platform-jar/" namely:

alfresco-global.properties

audit.enabled=true
audit.alfresco-access.enabled=true
audit.filter.alfresco-access.transaction.action=READ
audit.filter.alfresco-access.transaction.type=cm:content

log4j.properties

log4j.logger.org.alfresco.repo.audit.AuditComponentImpl=DEBUG
log4j.logger.org.alfresco.repo.audit.inbound=DEBUG
log4j.logger.org.alfresco.repo.audit.access=DEBUG

Then i tried to redo the steps from this Example Audit Trail. Not only did I not see the READ events on cm:content I was looking for (from step 3), it seems the audit.filter properties I defined didn't have any effect...I got CREATE events, READ events for other types like cm:person. I went over the logs a bunch of times so I know I didn't miss anything. I even tried using the audit query API http://localhost:8080/alfresco/s/api/audit/query/alfresco-access?verbose=true but the results were the same.

 

Now I know from Axel Faust's reply to this question that filters should act on inbound audit values generated by the two producers: "alfresco-access" and "alfresco-api" so data shouldn't even appear in the "alfresco-access" audit application. I even tried with 

audit.alfresco-access.enabled=false

but I still got unwanted data from the alfresco-access producer as inbound audit values in the logs.

 

So my two questions so far are:

- how to make audit filters work?

- how to make alfresco-access producer generate READ audit data for cm:content types?

 

Thank you!

 

P.S.: I know the data I am looking for should be accessible because when I go to an alfresco site I created there is that "Site activites" dashlet that clearly shows:

Outcomes