09-07-2009 04:31 PM
<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">
<Service name="ContentService" mode="none">
<Method name="getWriter" mode="all"/>
<Method name="transform" mode="all"/>
<Method name="getReader" mode="all"/>
</Service>
09-08-2009 08:20 AM
10-19-2009 02:48 AM
10-19-2009 03:24 AM
10-20-2009 10:13 AM
DEBUG [org.alfresco.repo.audit.model.AuditEntry] Audit configuration
DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Audit Mode = ALL
DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Enabled = TRUE
10-20-2009 10:30 AM
10-20-2009 10:44 AM
10-21-2009 01:47 AM
tmp.user SystemMethodInterceptor NodeService getAspects Oct 21, 2009 10:24:10 AM OK workspace://SpacesStore/c6697a21-f7d0-4d6d-834a-39a3b8850b6c [{http://www.alfresco.org/model/content/1.0}auditable, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/content/1.0}titled, {http://www.alfresco.org/model/content/1.0}lockable, {http://www.alfresco.org/model/content/1.0}author, {http://www.alfresco.org/model/content/1.0}templatable] e4aba8e7-49a6-4273-ac05-edcbc27659db
10-21-2009 02:03 AM
…
<PathMappings>
…
<PathMap source="/alfresco-api" target="/api-test"/>
</PathMappings>
….
<Application name="API Test" key="api-test">
<AuditPath key="post">
<AuditPath key="AuthenticationService">
<AuditPath key="authenticate">
<AuditPath key="args">
<AuditPath key="userName">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
</Application>
The audit code is now split up into data producers and data consumers. The config declares which data is to be consumed and persisted for later retrieval. In the RM use-case, we had to audit data produced by non-API code (RM actions) as well as do things like store the changes to node properties before and after a change to a node. The RM audit config looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<!– Default Audit Configuration –>
<Audit
xmlns="http://www.alfresco.org/repo/audit/model/3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd"
>
<DataExtractors>
<DataExtractor name="simpleValue" registeredName="auditModel.extractor.simpleValue"/>
<DataExtractor name="nullValue" registeredName="auditModel.extractor.nullValue"/>
<DataExtractor name="nodeName" registeredName="auditModel.extractor.nodeName"/>
<DataExtractor name="nodeType" registeredName="auditModel.extractor.nodeType"/>
<DataExtractor name="userRoles" registeredName="org_alfresco_module_dod5015_userRolesExtractor"/>
<DataExtractor name="namePath" registeredName="org_alfresco_module_dod5015_namePathExtractor"/>
<DataExtractor name="nodeRefPath" registeredName="org_alfresco_module_dod5015_nodeRefPathExtractor"/>
<DataExtractor name="nodeIdentifier" registeredName="org_alfresco_module_dod5015_identifierExtractor"/>
</DataExtractors>
<DataGenerators>
<DataGenerator name="personFullName" registeredName="auditModel.generator.personFullName"/>
</DataGenerators>
<PathMappings>
<PathMap source="/DOD5015" target="/DOD5015"/>
<!– Force the fullName generator to trigger –>
<PathMap source="/DOD5015/event/node" target="/DOD5015/event/person"/>
<PathMap source="/alfresco-api/post/AuthenticationService/authenticate" target="/DOD5015/login"/>
</PathMappings>
<Application name="DOD5015" key="DOD5015">
<AuditPath key="event">
<!– Record user details –>
<AuditPath key="person">
<RecordValue key="roles" dataExtractor="userRoles"/>
<GenerateValue key="fullName" dataGenerator="personFullName"/>
</AuditPath>
<!– Record a description of the event –>
<AuditPath key="name">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
<!– Record the node's details –>
<AuditPath key="node">
<RecordValue key="noderef" dataExtractor="simpleValue"/>
<RecordValue key="name" dataExtractor="nodeName"/>
<RecordValue key="type" dataExtractor="nodeType"/>
<RecordValue key="namePath" dataExtractor="namePath"/>
<RecordValue key="nodeRefPath" dataExtractor="nodeRefPath"/>
<RecordValue key="identifier" dataExtractor="nodeIdentifier"/>
<AuditPath key="changes">
<AuditPath key="before">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
<AuditPath key="after">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
<!–
RM action parameters
* Keyed by action name to be more selective
* Only record the parameters if they are of interest
–>
<!– A test action –>
<AuditPath key="testAction">
<AuditPath key="parameters">
<AuditPath key="testActionParam">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
<AuditPath key="login">
<AuditPath key="args">
<AuditPath key="userName">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
<AuditPath key="no-error">
<GenerateValue key="fullName" dataGenerator="personFullName"/>
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="nullValue"/>
</AuditPath>
</AuditPath>
</Application>
</Audit>
11-10-2009 08:55 AM
audit.enabled=true
audit.useNewConfig=false
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
enabled="false" auditInternal="false" mode="all">
to<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">
14:53:42,337 DEBUG [org.alfresco.repo.audit.model.AuditEntry] Audit configuration
14:53:42,341 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Audit Mode = ALL
14:53:42,343 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Enabled = TRUE
14:53:42,344 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Audit Internal = FALSE
14:53:42,349 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Record Options = Record Options(Filters=FALSE,Path=FALSE,Exception=FALSE,PropertiesBefore=FALSE,PropertiesAfter=FALSE,Args=FALSE,Return=FALSE)
14:53:42,352 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Filter = null
14:53:42,353 DEBUG [org.alfresco.repo.audit.model.AuditEntry] Adding services …
14:53:42,359 DEBUG [org.alfresco.repo.audit.model.AbstractNamedAuditEntry] Name = ServiceRegistry
14:53:42,361 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Audit Mode = NONE
14:53:42,362 DEBUG [org.alfresco.repo.audit.model.AbstractAuditEntry] Enabled = FALSE
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.