Activar Auditoría en Alfresco 3.3
septiembre 29, 2011 1 comentario
[Actualizado el 7/10/2010 a las 15:30]
La documentación sobre auditoría en Alfresco 3.3 es bastante pobre porque llegó en un momento de transición de la 3.2 al nuevo sistema con servicios y de todo en la 3.4.
Para activar la auditoría se añadirán las siguientes opciones en
alfresco-global.properties
# Auditing # Audit configuration # from: alfresco/repository.properties audit.enabled=true audit.tagging.enabled=true audit.repository.enabled=true audit.cmischangelog.enabled=true # Setting this flag to true will cause alfresco/auditConfig.xml to be ignored # when audit is enabled. When false both alfresco/auditConfig.xml and # alfresco/audit/*.xml will be used. audit.useNewConfig=false # Setting this flag to true will force startup failure when invalid audit configurations are detected audit.config.strict=false
y activar también la auditoría en el siguiente fichero:
auditConfig.xml
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="true" auditInternal="false" mode="all">
Esto activa la auditoría antigua, pues la nueva no he conseguido que funcione.
La información de auditoría en Alfresco 3.3 se almacena en base de datos.
Para ver estos datos se pueden usar estas consultas de ejemplo:
(Queries para Informix, sí Informix, qué se le va a hacer)
Encontrar usuarios que nunca han entrado o hecho nada para ser auditado:
select * from alf_audit_fact fact right outer join alf_node_properties prop on fact.user_id = prop.string_value where prop.qname_id = 44 and fact.user_id is null ;
Encontrar todo el contenido que ha sido “visto por un usuario en los últimos 7 días:
select * from alf_audit_fact fact join alf_audit_source source on fact.audit_source_id = source.id and ( (source.service = 'ContentService' and source.method = 'getReader') or (source.service = 'FileFolderService' and source.method = 'getReader') ) where fact.user_id = 'admin' and fact.timestamp > DATE(DATE(CURRENT)-7) order by fact.id asc ;
Para el metodo crearNodo sería:
or (source.service = 'NodeService' and source.method = 'createNode')
Lista de metodos disponibles desde la tabla alf_audit_source
id application service methd 15 SystemMethodInterceptor NodeService createNode 17 SystemMethodInterceptor RuleService disableRules 28 SystemMethodInterceptor RuleService enableRules 47 SystemMethodInterceptor ContentService getWriter 64 SystemMethodInterceptor PermissionService setPermission 66 SystemMethodInterceptor NodeService addAspect 98 SystemMethodInterceptor PermissionService setInheritParentPermissions 244 SystemMethodInterceptor NodeService setProperty 2468 SystemMethodInterceptor NodeService addChild 2698 SystemMethodInterceptor WorkflowService deployDefinition 2998 SystemMethodInterceptor NodeService setProperties 3220 SystemMethodInterceptor AuthenticationService authenticate 3222 SystemMethodInterceptor AuthenticationService invalidateTicket 3251 SystemMethodInterceptor AuthorityService createAuthority 3282 SystemMethodInterceptor PersonService createPerson 3286 SystemMethodInterceptor AuthenticationService createAuthentication 3288 SystemMethodInterceptor AuthenticationService setAuthenticationEnabled 3293 SystemMethodInterceptor AuthorityService addAuthority 3370 SystemMethodInterceptor AuthenticationService validate 24934 SystemMethodInterceptor AuthenticationService authenticateAsGuest 25156 SystemMethodInterceptor FileFolderService getReader 25174 SystemMethodInterceptor NodeService deleteNode 25780 SystemMethodInterceptor TemplateService buildDefaultModel 25782 SystemMethodInterceptor ContentService getReader 25784 SystemMethodInterceptor TemplateService processTemplate
Más información de Auditoría para Alfresco 3.3
http://wiki.alfresco.com/wiki/Auditing_%28from_V3.2r%29
Espero que haya servido de ayuda.
Como se puede activar la auditoria en alfresco 3.4?
Un saludo.
Gracias.