I want to audit search parameters used in alfresco search form

171 views Asked by At

I want to audit search parameters used in alfresco search form.

I am using version : Alfresco Enterprise v5.1.1

If i search jbong then in alfresco log i want to see something like this: /alfresco-api/post/SearchService/query/args/searchParameters=jbong*

but it is showing /alfresco-api/pre/SearchService/query/args=null

Any help or suggestion will be highly appriciated. thnaks a lot.

Here is the detail of my steps and configurations

  1. suppose i am searching "jbong" enter image description here

2. But the alfresco log is showing something like below: alfresco.log

    2020-09-08 16:58:20,480  DEBUG [repo.jscript.ScriptLogger] [http-apr-8080-exec-16] Query  :
    jbong
    Sortby:
     2020-09-08 16:58:20,483  DEBUG [repo.audit.inbound] [http-apr-8080-exec-16]
    Inbound audit values:
            /alfresco-api/pre/SearchService/query/args=null
     2020-09-08 16:58:20,757  DEBUG [repo.audit.inbound] [http-apr-8080-exec-16]
    Inbound audit values:
            /alfresco-api/post/SearchService/query/args=null
            /alfresco-api/post/SearchService/query/no-error=null
     2020-09-08 16:58:20,761  DEBUG [repo.audit.AuditComponentImpl] [http-apr-8080-exec-16]
    Extracted audit data:
            Application:    AuditApplication[ name=SearchAudit, id=12, disabledPathsId=8473501]
            Values:
                    /searchaudit/query/args=null
                    /searchaudit/query/no-error=null
    
    New Data:
    2020-09-08 16:58:20,761  DEBUG [repo.audit.AuditComponentImpl] [http-apr-8080-exec-16]
    
    Nothing audited:
            Application ID: 12
            Entry ID:       null
            Values:
                    /searchaudit/query/args=null
                    /searchaudit/query/no-error=null
    
     2020-09-08 16:58:20,765  DEBUG [repo.jscript.ScriptLogger] [http-apr-8080-exec-16] Processing resultset of length: 0
     2020-09-08 16:58:20,765  DEBUG [repo.jscript.ScriptLogger] [http-apr-8080-exec-16] Filtered resultset to length: 0. Discarded item count: 0
    

3. Here are my custom audit configuration:

A. alfresco-home/tomcat/shared/classes/alfresco/extension/audit/SearchAudit.xml

 <?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" registeredName="auditModel.extractor.simpleValue" />
        <DataExtractor name="nullValue" registeredName="auditModel.extractor.nullValue" />
    </DataExtractors>


    <PathMappings>
        <PathMap source="/alfresco-api/post/SearchService/query" target="/searchaudit/query" />
    </PathMappings>
 
    <Application name="SearchAudit" key="searchaudit">
        <AuditPath key="query">
            <RecordValue key="store" dataExtractor="simpleValue"
                        dataSource="/searchaudit/query/args/store" dataTrigger="/searchaudit/query/no-error" />
            <RecordValue key="language" dataExtractor="simpleValue"
                        dataSource="/searchaudit/query/args/language" dataTrigger="/searchaudit/query/no-error" />
            <RecordValue key="query" dataExtractor="simpleValue"
                        dataSource="/searchaudit/query/args/query" dataTrigger="/searchaudit/query/no-error" />
        </AuditPath>
    </Application>
</Audit>

B. alfresco-global.properties

 # Audit configuration
audit.enabled=true
audit.tagging.enabled=true
audit.alfresco-access.enabled=true
audit.alfresco-access.sub-actions.enabled=true
audit.cmischangelog.enabled=true

0

There are 0 answers