<?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 Re: Miner shows 422 Unprocessable Entity in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/229074#M98265</link>
    <description>&lt;P&gt;HI Xhoms,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is one of my issues.&amp;nbsp; How can I see what curl command is actually created within Minemeld?&amp;nbsp; I do not see any log entry that displays that.&amp;nbsp; The standard curl request I normally use has no issue so I am sure that I do not have the prototype configured correctly to create the curl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my standard curl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl -s -D /tmp/dump-header.txt -o /tmp/curl-out.tgz -H 'NS-NTI-KEY:**************' -H 'REPUTATIONTYPE:file' -H 'TIMETYPE:month' '&lt;A href="https://host.server.com/api/v1/reputation/feedDownload/" target="_blank"&gt;https://host.server.com/api/v1/reputation/feedDownload/&lt;/A&gt;'&lt;BR /&gt;HTTP/1.1 200 OK&lt;BR /&gt;Server: nginx/1.10.2&lt;BR /&gt;Date: Fri, 31 Aug 2018 01:50:26 GMT&lt;BR /&gt;Content-Type: application/octet-stream&lt;BR /&gt;Transfer-Encoding: chunked&lt;BR /&gt;Connection: keep-alive&lt;BR /&gt;Vary: Accept, Cookie&lt;BR /&gt;Allow: POST, OPTIONS, GET&lt;BR /&gt;Content-Disposition: attachment;filename=20180831-file-month.tar.gz&lt;BR /&gt;Set-Cookie: sessionid=yrzqaml43x6ygnhuxdu0cr5r89apzelf; expires=Fri, 31-Aug-2018 02:50:02 GMT; httponly; Max-Age=3600; Path=/&lt;BR /&gt;X-Frame-Options: SAMEORIGIN&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;Strict-Transport-Security: max-age=31536000; includeSubdomains;&lt;BR /&gt;Access-Control-Allow-Origin: host.server.com&lt;BR /&gt;Access-Control-Allow-Headers: X-Requested-With&lt;BR /&gt;Access-Control-Allow-Methods: GET,POST,OPTIONS&lt;BR /&gt;X-Frame-Options: SAMEORIGIN&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;Strict-Transport-Security: max-age=31536000; includeSubdomains;&lt;BR /&gt;Access-Control-Allow-Origin: *&lt;BR /&gt;Access-Control-Allow-Headers: X-Requested-With&lt;BR /&gt;Access-Control-Allow-Methods: GET,POST,OPTIONS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;received output file: 20180831-file-month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otto38dd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Aug 2018 21:02:41 GMT</pubDate>
    <dc:creator>otto38dd</dc:creator>
    <dc:date>2018-08-31T21:02:41Z</dc:date>
    <item>
      <title>Miner shows 422 Unprocessable Entity</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/228286#M98263</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&amp;nbsp; I am trying to configure a miner that downlods a stream of IP addresses via HTTPS request.&amp;nbsp; Data stream looks like this&lt;/P&gt;&lt;P&gt;1.1.1.1&lt;/P&gt;&lt;P&gt;2.2.2.2&lt;/P&gt;&lt;P&gt;2.2.2.3&lt;/P&gt;&lt;P&gt;3.3.3.3&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created the following protype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  NSFOCUS_ip-v2:
        class: minemeld.ft.http.HttpFT
        config:
            attributes:
                NS-NTI-KEY: *****************
                REPUTATIONTYPE: ip
                TIMETYPE: week
                confidence: 80
            source_name: nsfocus_ip
            url: https://host.server.com/api/v1/reputation/feedDownload/
            verify_cert: false
        description: Detailed feed of IPs classified in different categories. You
            need a valid API to access this feed.
        development_status: EXPERIMENTAL
        indicator_types:
        - IPv4
        node_type: miner
        tags:
        - OSINT
        - Confidence High&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Created a miner from the prototype.&amp;nbsp; When the miner runs I get a&amp;nbsp;422 Unprocessable Entity error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Engine log shows&lt;/P&gt;&lt;P&gt;2018-08-25T22:11:27 (26943)basepoller._poll ERROR: Exception in polling loop for nsfocus-ip: 422 Client Error: UNPROCESSABLE ENTITY&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "/opt/minemeld/engine/0.9.50.post1/local/lib/python2.7/site-packages/minemeld/ft/basepoller.py", line 721, in _poll&lt;BR /&gt;performed = self._polling_loop()&lt;BR /&gt;File "/opt/minemeld/engine/0.9.50.post1/local/lib/python2.7/site-packages/minemeld/ft/basepoller.py", line 571, in _polling_loop&lt;BR /&gt;iterator = self._build_iterator(now)&lt;/P&gt;&lt;P&gt;File "/opt/minemeld/engine/0.9.50.post1/local/lib/python2.7/site-packages/minemeld/ft/http.py", line 205, in _build_iterator&lt;BR /&gt;r.raise_for_status()&lt;BR /&gt;File "/opt/minemeld/engine/0.9.50.post1/local/lib/python2.7/site-packages/requests/models.py", line 851, in raise_for_status&lt;BR /&gt;raise HTTPError(http_error_msg, response=self)&lt;BR /&gt;HTTPError: 422 Client Error: UNPROCESSABLE ENTITY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since documentation on error messages are a bit sparse I am not sure why the poller or models are unhappy.&amp;nbsp; Is there a way to get debug info to see what is happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case anyone asks, verify_cert: false is there because the server has a certificate chain issue.&amp;nbsp; Using the above in curl works correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 06:01:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/228286#M98263</guid>
      <dc:creator>otto38dd</dc:creator>
      <dc:date>2018-08-26T06:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Miner shows 422 Unprocessable Entity</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/228818#M98264</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/96150"&gt;@otto38dd&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as per &lt;A href="https://www.keycdn.com/support/422-unprocessable-entity/" target="_self"&gt;https://www.keycdn.com/support/422-unprocessable-entity/&lt;/A&gt;, error 422 seems to be generated by the server when the requests syntax is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try to retrieve the content from the OS hosting MineMeld using the curl tool (curl -v &amp;lt;url&amp;gt;) to get insights on the request.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 07:42:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/228818#M98264</guid>
      <dc:creator>xhoms</dc:creator>
      <dc:date>2018-08-30T07:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Miner shows 422 Unprocessable Entity</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/229074#M98265</link>
      <description>&lt;P&gt;HI Xhoms,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is one of my issues.&amp;nbsp; How can I see what curl command is actually created within Minemeld?&amp;nbsp; I do not see any log entry that displays that.&amp;nbsp; The standard curl request I normally use has no issue so I am sure that I do not have the prototype configured correctly to create the curl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my standard curl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;curl -s -D /tmp/dump-header.txt -o /tmp/curl-out.tgz -H 'NS-NTI-KEY:**************' -H 'REPUTATIONTYPE:file' -H 'TIMETYPE:month' '&lt;A href="https://host.server.com/api/v1/reputation/feedDownload/" target="_blank"&gt;https://host.server.com/api/v1/reputation/feedDownload/&lt;/A&gt;'&lt;BR /&gt;HTTP/1.1 200 OK&lt;BR /&gt;Server: nginx/1.10.2&lt;BR /&gt;Date: Fri, 31 Aug 2018 01:50:26 GMT&lt;BR /&gt;Content-Type: application/octet-stream&lt;BR /&gt;Transfer-Encoding: chunked&lt;BR /&gt;Connection: keep-alive&lt;BR /&gt;Vary: Accept, Cookie&lt;BR /&gt;Allow: POST, OPTIONS, GET&lt;BR /&gt;Content-Disposition: attachment;filename=20180831-file-month.tar.gz&lt;BR /&gt;Set-Cookie: sessionid=yrzqaml43x6ygnhuxdu0cr5r89apzelf; expires=Fri, 31-Aug-2018 02:50:02 GMT; httponly; Max-Age=3600; Path=/&lt;BR /&gt;X-Frame-Options: SAMEORIGIN&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;Strict-Transport-Security: max-age=31536000; includeSubdomains;&lt;BR /&gt;Access-Control-Allow-Origin: host.server.com&lt;BR /&gt;Access-Control-Allow-Headers: X-Requested-With&lt;BR /&gt;Access-Control-Allow-Methods: GET,POST,OPTIONS&lt;BR /&gt;X-Frame-Options: SAMEORIGIN&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;Strict-Transport-Security: max-age=31536000; includeSubdomains;&lt;BR /&gt;Access-Control-Allow-Origin: *&lt;BR /&gt;Access-Control-Allow-Headers: X-Requested-With&lt;BR /&gt;Access-Control-Allow-Methods: GET,POST,OPTIONS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;received output file: 20180831-file-month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otto38dd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 21:02:41 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/229074#M98265</guid>
      <dc:creator>otto38dd</dc:creator>
      <dc:date>2018-08-31T21:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Miner shows 422 Unprocessable Entity</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/229256#M98266</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/96150"&gt;@otto38dd&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;looks like the feed you're trying to "mine" is providing a "tgz" file instead of a HTML, JSON, CSV or plain TXT content:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Content-Type: application/octet-stream
Content-Disposition: attachment;filename=20180831-file-month.tar.gz&lt;/PRE&gt;
&lt;P&gt;The content provided by the feed should be any of the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Content-Type: text/plain
Content-Type: text/html
Content-Type: text/csv
Content-Type: application/json&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;General purpose "miner" classess (HttpFP, CSVFT and SimpleJSON) are "streaming processors". They extract the indicators while the feed content is being parsed. The easiest way to achieve your goal is to implement a CGI script in the WEB server hosting the feed to uncompress the tgz content (i.e. zcat). If that's not possible, then you'll need to create a new miner class that 1) downloads the ".tgz", 2) uncompresses the content and 3) parses the result to extract the indicators.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 13:02:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/miner-shows-422-unprocessable-entity/m-p/229256#M98266</guid>
      <dc:creator>xhoms</dc:creator>
      <dc:date>2018-09-03T13:02:16Z</dc:date>
    </item>
  </channel>
</rss>

