01-26-2010 08:54 AM
01-26-2010 09:35 AM
01-27-2010 10:58 AM
audit.enabled=true
audit.useNewConfig=true
<?xml version='1.0' encoding='UTF-8'?>
<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" class="org.alfresco.repo.audit.extractor.SimpleValueDataExtractor"/>
</DataExtractors>
<DataGenerators>
<DataGenerator name="transactionId" class="org.alfresco.repo.audit.generator.TransactionIdDataGenerator"/>
</DataGenerators>
<PathMappings>
<PathMap source="/repository" target="/repository"/>
</PathMappings>
<Application name="Alfresco Repository" key="repository">
<AuditPath key="services">
<GenerateValue key="txn" dataGenerator="transactionId"/>
<AuditPath key="contentservice">
<AuditPath key="getreader">
<AuditPath key="return">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
</Application>
</Audit>
# Audit debugging
log4j.logger.org.alfresco.repo.audit.PublicServiceIdentifierImpl=INFO, Audit
log4j.logger.org.alfresco.repo.audit=DEBUG, Audit
log4j.logger.org.alfresco.repo.audit.AuditMethodInterceptor=DEBUG, Audit
log4j.appender.Audit=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Audit.File=audit.log
log4j.appender.Audit.Append=true
log4j.appender.Audit.DatePattern='.'yyyy-MM-dd
log4j.appender.Audit.layout=org.apache.log4j.PatternLayout
log4j.appender.Audit.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
01-27-2010 11:39 AM
/**
* Issue an audit query using the given parameters and consuming results in the callback.
*
* @param callback the callback that will handle results
* @param parameters the parameters for the query (may not be <tt>null</tt>)
* @param maxResults the maximum number of results to retrieve (zero or negative to ignore)
*
* @since 3.3
*/
void auditQuery(AuditQueryCallback callback, AuditQueryParameters parameters, int maxResults);
That should say "@since 3.2", though 😞
02-26-2010 07:55 AM
<DataExtractors>
<DataExtractor name="simpleValue" class="org.alfresco.repo.audit.extractor.SimpleValueDataExtractor"/>
</DataExtractors>
<DataGenerators>
<DataGenerator name="transactionId" class="org.alfresco.repo.audit.generator.TransactionIdDataGenerator"/>
</DataGenerators>
<PathMappings>
<PathMap source="/alfresco-api" target="/alfresco-api"/>
</PathMappings>
<Application name="Alfresco Api" key="alfresco-api">
<AuditPath key="post">
<GenerateValue key="txn" dataGenerator="transactionId"/>
<AuditPath key="NodeService">
<AuditPath key="createNode">
<AuditPath key="result">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
</Application>
// Generate data
Map<String, DataGenerator> generators = application.getDataGenerators(values.keySet());
and watch the values passed to this method. 02-26-2010 08:18 AM
<bean id="auditModel.mine" class="org.alfresco.repo.audit.model.AuditModelReader">
<property name="auditModelUrl">
<value>classpath:alfresco/extension/alfresco-audit-mine.xml</value>
</property>
<property name="auditModelRegistry" ref="auditModel.modelRegistry"/>
</bean>
Your config file must define a new application e.g.:
<PathMappings>
<PathMap source="/alfresco-api" target="/mine"/>
</PathMappings>
<Application name="Mine" key="mine">
<AuditPath key="post">
<GenerateValue key="txn" dataGenerator="transactionId"/>
<AuditPath key="NodeService">
<AuditPath key="createNode">
<AuditPath key="result">
<RecordValue key="value" dataExtractor="simpleValue"/>
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
</Application>
03-18-2010 05:23 PM
03-18-2010 05:37 PM
audit.enabled=true
audit.useNewConfig=false
04-05-2010 03:06 PM
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– The configuration of the audit model –>
<bean id="auditConfiguration" class="org.alfresco.repo.audit.AuditConfigurationImpl">
<property name="config">
<value>alfresco/extension/auditConfig.xml</value>
</property>
</bean>
<bean id="auditModel.custom" class="org.alfresco.repo.audit.model.AuditModelReader">
<property name="auditModelUrl">
<value>classpath:alfresco/extension/custom-alfresco-audit-repository.xml</value>
</property>
<property name="auditModelRegistry" ref="auditModel.modelRegistry"/>
</bean>
</beans>
<?xml version='1.0' encoding='UTF-8'?>
<!– Default Audit Configuration –>
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="true" auditInternal="true" mode="all">
<!– –>
<!– Global options –>
<!– –>
<!– Do not record any additional information –>
<RecordOptions>
<recordPath>true</recordPath>
<recordFilters>true</recordFilters>
<recordSerializedReturnValue>true</recordSerializedReturnValue>
<recordSerializedExceptions>true</recordSerializedExceptions>
<recordSerializedMethodArguments>true</recordSerializedMethodArguments>
<recordSerializedKeyPropertiesBeforeInvocation>true</recordSerializedKeyPropertiesBeforeInvocation>
<recordSerializedKeyPropertiesAferInvocation>true</recordSerializedKeyPropertiesAferInvocation>
</RecordOptions>
<!– –>
<!– Specific service options –>
<!– –>
<Service name="ServiceRegistry" mode="none" enabled="true"/>
<!– The action service –>
<Service name="ActionService" mode="none">
<Method name="executeAction" mode="all" auditInternal="true"/>
<Method name="saveAction" mode="all"/>
<Method name="removeAction" mode="all"/>
<Method name="removeAllActions" mode="all"/>
</Service>
<!– The COCI Service –>
<Service name="CheckoutCheckinService">
<Method name="getWorkingCopy" mode="none"/>
</Service>
<!– The DictionaryService –>
<!– There are no audtiable methods in the data dictionary service –>
<Service name="DictionaryService" mode="none" enabled="true"/>
<!– The Lock Service –>
<Service name="LockService">
<Method name="getLockStatus" mode="none"/>
<Method name="getLockType" mode="none"/>
<Method name="getLocks" mode="none"/>
</Service>
<!– The File/Folder Service –>
<Service name="FileFolderService" mode="none">
<Method name="rename" mode="all"/>
<Method name="move" mode="all"/>
<Method name="copy" mode="all" auditInternal="true"/>
<Method name="create" mode="all"/>
<Method name="delete" mode="all"/>
<Method name="makeFolders" mode="all"/>
<Method name="getWriter" mode="all"/>
</Service>
<Service name="ContentService" mode="none">
<Method name="getWriter" mode="all"/>
<Method name="transform" mode="all"/>
</Service>
<Service name="CopyService" mode="none">
<Method name="copy" mode="all" auditInternal="true"/>
</Service>
<!– The MimetypeService –>
<!– There are no audtiable methods in the mime type service –>
<Service name="MimetypeService" mode="none" enabled="false"/>
<!– The ContentFilterLanguagesService –>
<Service name="ContentFilterLanguagesService" mode="none" >
<Method name="getFilterLanguages" mode="all"/>
<Method name="getMissingLanguages" mode="all"/>
<Method name="getDefaultLanguage" mode="all"/>
</Service>
<Service name="NodeService" mode="none">
<Method name="createStore" mode="all"/>
<Method name="createNode" mode="all"/>
<Method name="moveNode" mode="all"/>
<Method name="setChildAssociationIndex" mode="all"/>
<Method name="setType" mode="all"/>
<Method name="addAspect" mode="all"/>
<Method name="removeAspect" mode="all"/>
<Method name="deleteNode" mode="all"/>
<Method name="addChild" mode="all"/>
<Method name="removeChild" mode="all"/>
<Method name="setProperties" mode="all"/>
<Method name="setProperty" mode="all"/>
<Method name="createAssociation" mode="all"/>
<Method name="removeAssociation" mode="all"/>
<Method name="restoreNode" mode="all"/>
</Service>
<Service name="ScriptService" auditInternal="true"/>
<Service name="TemplateService" auditInternal="true">
<Method name="getTemplateProcessor" mode="none"/>
</Service>
<Service name="RuleService" mode="none" auditInternal="true">
<Method name="disableRules" mode="all"/>
<Method name="enableRules" mode="all"/>
<Method name="disableRule" mode="all"/>
<Method name="enableRule" mode="all"/>
<Method name="createRule" mode="all"/>
<Method name="saveRule" mode="all"/>
<Method name="removeRule" mode="all"/>
<Method name="removeAllRules" mode="all"/>
</Service>
<Service name="CategoryService" mode="none">
<Method name="createClassifiction" mode="all"/>
<Method name="createRootCategory" mode="all"/>
<Method name="createCategory" mode="all"/>
<Method name="deleteClassification" mode="all"/>
<Method name="deleteCategory" mode="all"/>
</Service>
<Service name="SearchService" mode="none" enabled="true"/>
<Service name="AuthenticationService" mode="none">
<Method name="createAuthentication" mode="all"/>
<Method name="updateAuthentication" mode="all"/>
<Method name="setAuthentication" mode="all"/>
<Method name="deleteAuthentication" mode="all"/>
<Method name="setAuthenticationEnabled" mode="all"/>
<Method name="authenticate" mode="all" auditInternal="true"/>
<Method name="authenticateAsGuest" mode="all"/>
<Method name="authenticationExists" mode="all"/>
<Method name="invalidateUserSession" mode="all"/>
<Method name="invalidateTicket" mode="all"/>
<Method name="validate" mode="all"/>
<Method name="clearCurrentSecurityContext" mode="all"/>
<!– audit the creation of new tickets to follow SSO –>
<Method name="getNewTicket" mode="all" />
<Method name="getCurrentTicket" mode="none" auditInternal="true"/>
</Service>
<Service name="AuthorityService" mode="none">
<Method name="createAuthority" mode="all"/>
<Method name="addAuthority" mode="all"/>
<Method name="removeAuthority" mode="all"/>
<Method name="deleteAuthority" mode="all"/>
</Service>
<Service name="OwnableService" mode="none">
<Method name="setOwner" mode="all"/>
<Method name="takeOwnership" mode="all"/>
</Service>
<Service name="PermissionService" mode="none">
<Method name="deletePermissions" mode="all"/>
<Method name="clearPermission" mode="all"/>
<Method name="deletePermission" mode="all"/>
<Method name="setPermission" mode="all"/>
<Method name="setInheritParentPermissions" mode="all"/>
</Service>
<Service name="PersonService" mode="none">
<Method name="setCreateMissingPeople" mode="all"/>
<Method name="setPersonProperties" mode="all"/>
<Method name="createPerson" mode="all"/>
<Method name="deletePerson" mode="all"/>
</Service>
<Service name="VersionService" mode="none">
<Method name="createVersion" mode="all"/>
<Method name="revert" mode="all"/>
<Method name="restore" mode="all"/>
<Method name="deleteVersionHistory" mode="all"/>
</Service>
<Service name="ExporterService"/>
<Service name="ImporterService"/>
<Service name="RepositoryExporterService"/>
<Service name="DescriptorService" mode="none" enabled="true"/>
<Service name="LicenseService" mode="none" enabled="true"/>
<Service name="NamespaceService" mode="none" enabled="true"/>
<Service name="TransactionService" mode="none" enabled="true"/>
<Service name="WorkflowService" auditInternal="true">
<Method name="isDefinitionDeployed" mode="none"/>
<Method name="getDefinitions" mode="none"/>
<Method name="getDefinitionById" mode="none"/>
<Method name="getDefinitionByName" mode="none"/>
<Method name="getActiveWorkflows" mode="none"/>
<Method name="getWorkflowPaths" mode="none"/>
<Method name="getTasksForWorkflowPath" mode="none"/>
<Method name="getTaskById" mode="none"/>
<Method name="getAssignedTasks" mode="none"/>
<Method name="getPooledTasks" mode="none"/>
</Service>
</Audit>
<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"
class="org.alfresco.repo.audit.extractor.SimpleValueDataExtractor" />
<!–
<DataExtractor name="stackTrace"
class="org.alfresco.repo.audit.extractor.StackTraceDataExtractor"/>
<DataExtractor name="storeRootNode"
class="org.alfresco.repo.audit.extractor.StoreRootNodeDataExtractor"/>
–>
</DataExtractors>
<DataGenerators>
<DataGenerator name="transactionId"
class="org.alfresco.repo.audit.generator.TransactionIdDataGenerator" />
</DataGenerators>
<PathMappings>
<PathMap source="/alfresco-api" target="/custom" />
</PathMappings>
<Application name="Custom" key="custom">
<AuditPath key="post">
<GenerateValue key="txn" dataGenerator="transactionId" />
<AuditPath key="NodeService">
<AuditPath key="createNode">
<AuditPath key="result">
<RecordValue key="value" dataExtractor="simpleValue" />
</AuditPath>
</AuditPath>
</AuditPath>
</AuditPath>
</Application>
</Audit>
auditService.audit("AuditLogMigration", "Audit log migration",
nodeRef, logs);
04-06-2010 05:22 AM
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.