Auditing searchservice in Alfresco Enterprise v5.1.1

cancel
Showing results for 
Search instead for 
Did you mean: 
deshdeepak1947
Active Member

Re: Auditing searchservice in Alfresco Enterprise v5.1.1


@deshdeepak1947 wrote:

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"

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=trueaudit.tagging.enabled=trueaudit.alfresco-access.enabled=trueaudit.alfresco-access.sub-actions.enabled=trueaudit.cmischangelog.enabled=true

 


Any insight or suggestions please. Smiley Happy

deshdeepak1947
Active Member

Re: Auditing searchservice in Alfresco Enterprise v5.1.1

With all resects to all intelligenta and brilliant alfresco scientist, users and users.

I am surprised that there is not a single suggestions. Atleast i should be suggested that the question is worng or in sufficient data.

Regards,