<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to fetch HTTP Headers in HTTP Event Collector in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fetch-HTTP-Headers-in-HTTP-Event-Collector/m-p/551308#M91515</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to integrate Shodan notification (Webhook) with Splunk.&lt;/P&gt;&lt;P&gt;I have configured HTTP Even Collector in Splunk Enterprise with a Unique Index name.&lt;/P&gt;&lt;P&gt;I am using query string authentication mechanism as I wanted to use the splunk URI as Webhook in shodan settings so splunk will get data in.&lt;/P&gt;&lt;P&gt;curl -k &lt;A href="https://127.0.0.1:8088/services/collector/raw?token=5a144245-e893-4c08-8bde-94c36c0376f5" target="_blank" rel="noopener"&gt;https://127.0.0.1:8088/services/collector/raw?token=5a144245-e893-4c08-8bde-94c36c0376f5&lt;/A&gt; -d "JSON_DATA_HERE"&amp;nbsp;&amp;nbsp;-H "X-Content-Type: CustomjsonPayload"&lt;/P&gt;&lt;P&gt;when I am sending curl request for testing POST JSON data, I am able to get data in Events (Search query "index=hec")&lt;/P&gt;&lt;P&gt;Now when I was reading the shodan API documents, they have mentioned that every POST request will be having some unique HTTP Headers regarding each notification generated.&lt;/P&gt;&lt;P&gt;I do not have control on Shodan POST Request (as it is generated by their servers).&lt;BR /&gt;&lt;BR /&gt;So I wanted to capture ( HTTP Headers + POST Data ) both as well in the Splunk Events.&lt;/P&gt;&lt;P&gt;Link for reference:&lt;BR /&gt;&lt;A href="https://help.shodan.io/developer-fundamentals/monitor-webhooks" target="_blank" rel="noopener"&gt;https://help.shodan.io/developer-fundamentals/monitor-webhooks&lt;/A&gt;&lt;BR /&gt;Snippet from above Shodan link:&lt;/P&gt;&lt;P&gt;================================&amp;nbsp;&lt;/P&gt;&lt;P&gt;Receiving the data&lt;/P&gt;&lt;P&gt;You've got your web service up and running, you've registered and enabled your webhook, and now it's time to actually process the incoming data that Monitor will send. The webhook notification does a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;request to your URL where:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;body&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;request contains a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;JSON-encoded banner&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;header&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the POST request contains&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;information about the alert&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;The headers contain metadata about the alert to help you understand which alert was responsible for generating the notification. Specifically, the following headers are available in the POST request:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-ID&lt;/STRONG&gt;: unique ID for the alert&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-NAME&lt;/STRONG&gt;: name for the alert&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-TRIGGER&lt;/STRONG&gt;: trigger that caused the notification to get sent&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-SIGNATURE-SHA1&lt;/STRONG&gt;: SHA1 signature encoded using your API key to validate the notification's origin&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;================================&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So I wanted to capture HTTP Headers as well in the Splunk Events. How could I do it.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Or if there is any other way for getting data from Webhooks, please let me know.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 04:33:21 GMT</pubDate>
    <dc:creator>hmvs</dc:creator>
    <dc:date>2021-05-12T04:33:21Z</dc:date>
    <item>
      <title>How to fetch HTTP Headers in HTTP Event Collector</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-fetch-HTTP-Headers-in-HTTP-Event-Collector/m-p/551308#M91515</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to integrate Shodan notification (Webhook) with Splunk.&lt;/P&gt;&lt;P&gt;I have configured HTTP Even Collector in Splunk Enterprise with a Unique Index name.&lt;/P&gt;&lt;P&gt;I am using query string authentication mechanism as I wanted to use the splunk URI as Webhook in shodan settings so splunk will get data in.&lt;/P&gt;&lt;P&gt;curl -k &lt;A href="https://127.0.0.1:8088/services/collector/raw?token=5a144245-e893-4c08-8bde-94c36c0376f5" target="_blank" rel="noopener"&gt;https://127.0.0.1:8088/services/collector/raw?token=5a144245-e893-4c08-8bde-94c36c0376f5&lt;/A&gt; -d "JSON_DATA_HERE"&amp;nbsp;&amp;nbsp;-H "X-Content-Type: CustomjsonPayload"&lt;/P&gt;&lt;P&gt;when I am sending curl request for testing POST JSON data, I am able to get data in Events (Search query "index=hec")&lt;/P&gt;&lt;P&gt;Now when I was reading the shodan API documents, they have mentioned that every POST request will be having some unique HTTP Headers regarding each notification generated.&lt;/P&gt;&lt;P&gt;I do not have control on Shodan POST Request (as it is generated by their servers).&lt;BR /&gt;&lt;BR /&gt;So I wanted to capture ( HTTP Headers + POST Data ) both as well in the Splunk Events.&lt;/P&gt;&lt;P&gt;Link for reference:&lt;BR /&gt;&lt;A href="https://help.shodan.io/developer-fundamentals/monitor-webhooks" target="_blank" rel="noopener"&gt;https://help.shodan.io/developer-fundamentals/monitor-webhooks&lt;/A&gt;&lt;BR /&gt;Snippet from above Shodan link:&lt;/P&gt;&lt;P&gt;================================&amp;nbsp;&lt;/P&gt;&lt;P&gt;Receiving the data&lt;/P&gt;&lt;P&gt;You've got your web service up and running, you've registered and enabled your webhook, and now it's time to actually process the incoming data that Monitor will send. The webhook notification does a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;request to your URL where:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;body&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;request contains a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;JSON-encoded banner&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;header&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the POST request contains&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;information about the alert&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;............&lt;/P&gt;&lt;P&gt;The headers contain metadata about the alert to help you understand which alert was responsible for generating the notification. Specifically, the following headers are available in the POST request:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-ID&lt;/STRONG&gt;: unique ID for the alert&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-NAME&lt;/STRONG&gt;: name for the alert&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-ALERT-TRIGGER&lt;/STRONG&gt;: trigger that caused the notification to get sent&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;SHODAN-SIGNATURE-SHA1&lt;/STRONG&gt;: SHA1 signature encoded using your API key to validate the notification's origin&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;================================&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So I wanted to capture HTTP Headers as well in the Splunk Events. How could I do it.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Or if there is any other way for getting data from Webhooks, please let me know.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks in advance.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 04:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-fetch-HTTP-Headers-in-HTTP-Event-Collector/m-p/551308#M91515</guid>
      <dc:creator>hmvs</dc:creator>
      <dc:date>2021-05-12T04:33:21Z</dc:date>
    </item>
  </channel>
</rss>

