Capture HTTP Header service Data using Insight

CAPTURING OF HTTP HEADERS/ IS SERVICE RELATED DATA FOR SOAP/REST SERVICE CALLS USING WEBMETHODS INSIGHT

This article consists of detailed steps of how to capture service-specific HTTP header/ service DATA using webMethods Insight when a SOAP/Rest Service is invoked

Requirement: To capture HTTP header field, Interaction ID, Date of call, Host, service name, operation, Request data, Reply data, Reply & Request content_type and Query Flow map for Rest and SOAP services.

  1. Invoke the Rest service REST_multiplies:_get and make sure service traffic is visible in Insight server


     
  2. Create the Message fields to view the Request, Reply date and to capture header field values.
    1. Create a Message field to capture HTTP header 'Proxy-Authenticate' field value
      ► Navigate to Insight server -> Configure -> Fields -> Message Fields tab and click ADD to create a new message field.
      Provide an appropriate name and description click Finish
      Name: Proxy-Authenticate
      Description: HTTP Public Key Pinning, announces hash of website's authentic TLS certificate


      ►Now Add Message Field Evaluators


      ► Click Add, Select Service Package or service on which this field is applied and click OK



      ► Click Next and select the Message Field evaluator type as 'Transport evaluator'


      ► Click Next and provide the Transport Header name as valid HTTP header field name like ‘Proxy-Authenticate’ and click Finish and DONE


      ► Provision the managed node


      Note:
      ► Like this create as many as Message Fields based upon which header field value needs to be captured.
      ►Other HTTP header names and what it captures can be obtained from the link provided below.
      HTTP header field name: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields

      Similarly, I have created the Message fields for other HTTP header fields ‘Accept, Accept- Charset, Accept-DateTime, Accept-Encoding, Accept-Language, Authorization, Cache- Control, Connection, Content-Length, Content-MD5, Cookie, Expect’

    2. Create a Message field to capture Request and Reply data field

      Here the Message Field name and XPath evaluator value depends upon the service Request data

      Request data for REST_multiplies:_get is

      <?xml version="1.0" encoding="UTF-8"?>

      <IDataXMLCoder version="1.0">
      <record javaclass="com.wm.util.Values">
      <value name="interface"> REST_multiplies</value>
      <value name="service">
      _get</value>
      <value name="withargs"> true</value>
      <value name="Num1"> 1</value>
      <value name="Num2"> 3</value>
      </record>
      </IDataXMLCoder>

      To obtain the Input value of NUM1 the Xpath evaluator value is
      /IDataXMLCoder/record/value[4]/text()
       
      To obtain the Input value of NUM2 the Xpath evaluator value is
      /IDataXMLCoder/record/value[5]/text()

      To obtain the Input value of Service the Xpath evaluator value is
      /IDataXMLCoder/record/value[2]/text()

      Using this value create a Message field with Message type as Xpath evaluator









      Similarly, we can create the Message Fields based upon the Reply Data
       
    3. Create a Policy to capture all Audit log
      Navigate to Insight Server -> Configure -> Policies and click Add



      Provide Policy Group name, Type and description and click Finish



      ► Under Rule sets click Add, provide name and description and click Finish



      ► Click Add under Rules



      ► Select Rule Evaluation criteria as Always on Request and click Next



      ► Select Conditional expression as Always performed and click Next



      ► If any alert or Warning is required we can configure it else select none and click Next 



      ► Select what to audit:



      ► Click Next -> Next -> Finish



      Click Done and click ADD policies and select the specific site on which this policy needs to be applied and click Next.



      Apply policy for every message and click Next



      By default Audit All rule set is selected, click Finish





      Click Activate this Revision and click DONE and then provision the managed node.
       
    4. Invoke the Rest service REST_multiplies:_get



      Test with inputs


       
    5. In Insight Server check the traffic for this Rest service


       
    6. Check the audit log report for this Rest service
      To view Navigate to Manage->Logs->Audit Logs configure the columns you want to view in your Audit log report and then click Show Report




       
    7. In Reports available select the report for the service: Rest_multiples:_get

Audit log Report

The highlighted message names are HTTP header fields



In Audit log report we can also view Query Flow diagram (Flow diagram to particular service with particular time)

Click on Query Flow diagram

<img alt="" src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/techcommunity/original/2X/a/acb3d7264baa97cdffbd47d348162086c79c7f08.jpeg"

Overall view:

Traffic View:

Sequence Map:

Sequence Table:

Auditing Records:

NOTE: Follow the same steps for SOAP Service.

Run the SOAP Service:


 

Audit log Report: