Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top1
top1

Image Modified

Tip

A feature that would enable users/auditors to write queries for broader usecases on the UI.

For each query, the implementation will leverage the offline scheduler, that would run the cypher based on the configured frequency.

For each asset returned by the cypher, a corresponding HL/Cypher traceability report would be prepared as a PDF.

The PDF would be emailed to the list of subscribers based on the frequency. Each query on the UI to send a consolidated PDF for all the individual assets returned by the cyper.

Status
titleFeature Deprecated

Info

This feature is no longer supported and the query of Hyperledger or any other data source has been migrated to the workflow. Using the workflow feature, you will be able to query any datasource which includes Neo4j, Hyperledger and ES for now. For more details on Workflow setup and configuration, please refer to this link


Panel

Table of Contents


Panel

Details on Query Builder UI

This UI has 2 screens for addition and edit/delete.

    Addition of Cypher queries (All fields are mandatory).

    Name of the Query - Unique Report Name 

    Frequency -  daily, weekly, fortnightly, monthly to execute the Query

    Subscribers Please provide valid email address. You may use ‘,‘ to provide multiple email address

    Query Please select source of data for generating report( neo4j or hyperledger)

    Upload QueryUpload Cypher query with proper syntax

    

    Image Modified


    Edit/Delete Report Queries.

    Image Modified

Report Types

       There are 2 types of reports that can be distinguished based on Query type in UI . 

Sno

CYPHER

CYPHER and HYPHERLEDGER

1

Fetches records from NEO4j Database

Fetches records from both NEO4j and Hypherledger

2

Upload file will have 2 fields as query and table_structure

View file
nameneo-feature-build.json
height250

Upload file will have only query field as below .

View file
nameJIRA_WITH_NO_GIT_REPORT.json
height250

3

PDF will be generated based on the table_structure mapping to cypherresponse.json

PDF will be generated based on hyperledger response which is fixed for now.


Prerequisites: Create a folder named Audit-report under $INSIGHTS_HOME/.Insights/ and provide write priviledge. This is required for placing the uploaded files.

Deep dive into cypher response and Mapping.

         - Report from Cypher and its table_structure.

           Let's take the neo-feature-build.json attached above as sample.

            {
                "queryname" : "MATCH (g:GIT:DATA)-[*1..2]->(u:UCD:DATA) WHERE g.branchName <> 'master' and u.environment='PROD' RETURN g,u",
                "table_structure" : {
                           "REPO NAME" : "g.repoName",
                           "MESSAGE" : "g.message",
                           "BRANCH NAME":"g.branchName",
                           "STATUS": "u.status",
                           "ENVIRONMENT": "u.environment"    

                   }
            }

           

             Query : MATCH (g:GIT:DATA)-[*1..2]->(u:UCD:DATA) WHERE g.branchName <> 'master' and u.environment='PROD' RETURN g,u

             CypherResponse: (showing only one node for sample).

             

              Here g, u are result nodes which has corresponding results in row array index where g is mapped to 0 and u is mapped to 1 . 

              Sample Mapping :  In order to map these results to PDF we can select the key names from the cypher response as below with the resultant node.

              "REPO NAME" : "g.repoName","MESSAGE" : "g.message","BRANCH NAME":"g.branchName","STATUS": "u.status","ENVIRONMENT": "u.environment"

PDF Sample

The resultant generated PDF will look like this if all config is correct.


Attaching the whole PDF for reference (pwd:12345)

View file
nameNEO_FEATURE_BUILD.pdf
height250


Mail Config

Provide the Mail server configuration in server-config.json file present in $INSIGHTS_HOME/.InSights/ as below.

"emailConfiguration":
{
         "smtpHostServer": "",
         "smtpPort": "",
         "smtpUserName": "",
         "smtpPassword": "",
         "mailFrom": ""
}

Log Analysis

Each report will generate corresponding log as ${reportname.log} configured in UI. These can be downloaded from UI for analysis purpose which is located as one of the tab in healthcheck page.

Prerequisites : Create a folder named Reports under PlatformAuditService in ${INSIGHTS_HOME}\logs\PlatformAuditService\ and provide write access. 





Back to Top