Extracting source IP & values from JSON data bank
Hi,
I'm trying to create a proxy basically scenario is 2 endpoints sending info to single proxy and want to capture what endpoint has sent what data in the data source.
I want to capture source IP and info from JSON data bank in the data source that can be used as a data source correlation for other responders.
Any suggestion? Header data bank does not capture the source IP so trying to figure out how to capture that info
Sujal
Comments
-
Good morning Sujadalia,
You may use the "REST URL Databank" (introduced in 9.10.2) to capture the Host "IP" that is included in the Request. If you do not have the latest version of SoaVirt, you may also use the text databank to isolate and extract the desired information.
I recommend taking a look at the following discussion:
https://forums.parasoft.com/discussion/comment/8276#Comment_82760 -
I'm using 9.10.1 and I don't see "Rest URL Databank" so I will try to upgrade and will update this thread.
Thanks for your help
Sujal
0 -
Hi Omar,
I was able to extract the host but that is more of a destination vs the source e.g. If IP-A is sending the request to IP-B and I use "Rest URL Databank" on IP-B and extract host I'm seeing IP-B vs IP-A.
What am I doing wrong?
0 -
This is the sample traffic. I'm interested in extracting this line "Source: 127.0.0.1 - 127.0.0.1"
Source: 127.0.0.1 - 127.0.0.1
Destination: http://localhost:9080/SmartProxy_Many_To_OnePOST /SmartProxy_Many_To_One HTTP/1.0
host: localhost:9080
content-type: application/json; charset=UTF-8
content-length: 221{"ban":"xxxxxxxxxxxxxxx","lines_of_business":[],"attributes":{"workbench_order_id":"6927276","workbench_customer_id":"7620546","sfdc_opportunity_id":"O-15177701"},"customer_creation_date":"2017-10-18T12:37:21.755-04:00"}
0 -
Hello,
Please verify that you are chaining the databank as an output to the incoming transport header in order to capture the "source" details.0 -
I'm adding REST URL Data Bank for the incoming request
0 -
So is this a problem and not working as expected or setup issue?
0 -
I apologize for my confusion. The REST URL databank can capture the details contained in the request including the host where the request is being sent to (destination). However, if you wish to capture the IP of the machine where the request originated from, the IP information needs to be included as part of the request.
Currently, the easiest option would be include the IP as a custom header in the request so that you may extract it in the responder. The event details log contains the source/destination information, but I am not aware of how to access this information at the responder level.
0