<?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: JSON Miner with basic auth and an API key in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248234#M97166</link>
    <description>&lt;P&gt;Fixed the list issue and now the miner is showing 111 indicators&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final configuration of the miner is&lt;/P&gt;
&lt;PRE&gt;    pingdom_nodes-US:
        class: minemeld.ft.json.SimpleJSON
        config:
            age_out:
                default: null
                interval: 257
                sudden_death: true
            attributes:
                confidence: 100
                share_level: green
                type: IPv4
            interval: 3600
            extractor: probes
            fields:
            - id
            - country
            - city
            - name
            - active
            - hostname
            - ip
            - countryiso
            headers:
              Authorization: Basic &amp;lt;base64&amp;gt;
              App-Key: &amp;lt;app-key&amp;gt;
            indicator: ip
            outfilters:
            -   actions:
                - accept
                conditions:
                - countryiso == 'US'
                name: accept US
            -   actions:
                - drop
                name: drop all
            url: https://api.pingdom.com/api/2.1/probes
        description: Pingdom nodes
        development_status: STABLE
        indicator_types:
        - IPv4
        node_type: miner
        tags:
        - ConfidenceHigh
        - ShareLevelGreen
&lt;/PRE&gt;
&lt;P&gt;The problem now is that neither the aggregator nor the feed have any entries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is confusing is that if I pull the data via curl, I see output like this:&lt;/P&gt;
&lt;PRE&gt;{"probes":[{"id":36,"country":"United States","city":"Chicago","name":"Chicago, IL","active":true,"hostname":"s414.pingdom.com","ip":"174.34.156.130","countryiso":"US","region":"NA"},
{"id":43,"country":"United States","city":"Denver","name":"Denver, CO","active":true,"hostname":"s421.pingdom.com","ip":"173.248.147.18","countryiso":"US","ipv6":"2607:fc88:100:26::421","region":"NA"},
{"id":47,"country":"Austria","city":"Vienna","name":"Vienna, Austria","active":true,"hostname":"s425.pingdom.com","ip":"178.255.152.2","countryiso":"AT","ipv6":"2a00:11c0:d:3::425","region":"EU"},
&lt;/PRE&gt;
&lt;P&gt;In the logs for the miner though, I see&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
    "_age_out": 4294967295000,
    "confidence": 100,
    "json_hostname": "s4054.pingdom.com",
    "json_country": "South Korea",
    "share_level": "green",
    "json_ip": "169.56.174.147",
    "_last_run": 1548903839226,
    "json_city": "Seoul",
    "sources": [
        "pingdom_nodes-US"
    ],
    "json_name": "Seoul",
    "json_active": false,
    "json_id": 259,
    "first_seen": 1548903839226,
    "json_countryiso": "KR",
    "type": "IPv4",
    "json_region": "APAC",
    "last_seen": 1548903839226
}&lt;/PRE&gt;
&lt;P&gt;If I change the field names in the miner to "json_*", the miner shows 0 indicators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My aggregator looks like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aggregator.jpg" style="width: 800px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/18521i9905F56E3B50AD06/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="aggregator.jpg" alt="aggregator.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The feed looks like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feed.jpg" style="width: 800px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/18522i82189AD5B3C0AFFB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="feed.jpg" alt="feed.jpg" /&gt;&lt;/span&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jan 2019 03:09:58 GMT</pubDate>
    <dc:creator>MichaelPDean</dc:creator>
    <dc:date>2019-01-31T03:09:58Z</dc:date>
    <item>
      <title>JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248064#M97163</link>
      <description>&lt;P&gt;I would like to have a miner to connect to the Pingdom API to pull a list of their US node addresses.&amp;nbsp; &amp;nbsp;The Pingdom API uses basic auth and requires an "app key".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Their documentation references two HTTP headers, authentication and app-key:&lt;/P&gt;
&lt;PRE class="codeblock"&gt;&amp;gt; GET /checks HTTP/1.1
&amp;gt; Host: api.pingdom.com
&amp;gt; Authentication: Zm9vQGV4YW1wbGUuY29tOnBhc3N3b3Jk
&amp;gt; App-Key: 1234567890abcdef1234567890abcdef&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using a JSON miner,&amp;nbsp;encoded our login (username:password) with Base64 encoding (my assumption on what they were expecting based on reading their info) and generated an app key via their portal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I am not sure how I add these attributes to the miner.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 01:20:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248064#M97163</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-01-30T01:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248065#M97164</link>
      <description>&lt;P&gt;This is the configuration I currently have for the miner, which I also need to restrict to US based addresses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pingdom_nodes-US:&lt;BR /&gt; class: minemeld.ft.json.SimpleJSON&lt;BR /&gt; config:&lt;BR /&gt; age_out:&lt;BR /&gt; default: null&lt;BR /&gt; interval: 257&lt;BR /&gt; sudden_death: true&lt;BR /&gt; attributes:&lt;BR /&gt; confidence: 100&lt;BR /&gt; share_level: green&lt;BR /&gt; type: IPv4&lt;BR /&gt; extractor: probes&lt;BR /&gt; fields:&lt;BR /&gt; - id&lt;BR /&gt; - country&lt;BR /&gt; - city&lt;BR /&gt; - name&lt;BR /&gt; - active&lt;BR /&gt; - hostname&lt;BR /&gt; - ip&lt;BR /&gt; - countryiso&lt;BR /&gt; headers:&lt;BR /&gt; - authorization Basic&amp;nbsp;&amp;lt;base64 encoded string&amp;gt;&lt;BR /&gt; - app-key&amp;nbsp;&amp;lt;app key&amp;gt;&lt;BR /&gt; indicator: ip&lt;BR /&gt; outfilters:&lt;BR /&gt; - actions:&lt;BR /&gt; - accept&lt;BR /&gt; conditions:&lt;BR /&gt; - countryiso == 'US'&lt;BR /&gt; name: accept US&lt;BR /&gt; - actions:&lt;BR /&gt; - drop&lt;BR /&gt; name: drop all&lt;BR /&gt; url: &lt;A href="https://api.pingdom.com/api/2.1/probes" target="_blank"&gt;https://api.pingdom.com/api/2.1/probes&lt;/A&gt;&lt;BR /&gt; description: Pingdom nodes&lt;BR /&gt; development_status: EXPERIMENTAL&lt;BR /&gt; indicator_types:&lt;BR /&gt; - IPv4&lt;BR /&gt; node_type: miner&lt;BR /&gt; tags:&lt;BR /&gt; - ConfidenceHigh&lt;BR /&gt; - ShareLevelGreen&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 01:22:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248065#M97164</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-01-30T01:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248230#M97165</link>
      <description>&lt;P&gt;I've verified the app-key and authorization string using curl, but I am getting an error with the node.&amp;nbsp; The error is&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'list' object has no attribute 'items'&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jan 2019 01:16:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248230#M97165</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-01-31T01:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248234#M97166</link>
      <description>&lt;P&gt;Fixed the list issue and now the miner is showing 111 indicators&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The final configuration of the miner is&lt;/P&gt;
&lt;PRE&gt;    pingdom_nodes-US:
        class: minemeld.ft.json.SimpleJSON
        config:
            age_out:
                default: null
                interval: 257
                sudden_death: true
            attributes:
                confidence: 100
                share_level: green
                type: IPv4
            interval: 3600
            extractor: probes
            fields:
            - id
            - country
            - city
            - name
            - active
            - hostname
            - ip
            - countryiso
            headers:
              Authorization: Basic &amp;lt;base64&amp;gt;
              App-Key: &amp;lt;app-key&amp;gt;
            indicator: ip
            outfilters:
            -   actions:
                - accept
                conditions:
                - countryiso == 'US'
                name: accept US
            -   actions:
                - drop
                name: drop all
            url: https://api.pingdom.com/api/2.1/probes
        description: Pingdom nodes
        development_status: STABLE
        indicator_types:
        - IPv4
        node_type: miner
        tags:
        - ConfidenceHigh
        - ShareLevelGreen
&lt;/PRE&gt;
&lt;P&gt;The problem now is that neither the aggregator nor the feed have any entries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is confusing is that if I pull the data via curl, I see output like this:&lt;/P&gt;
&lt;PRE&gt;{"probes":[{"id":36,"country":"United States","city":"Chicago","name":"Chicago, IL","active":true,"hostname":"s414.pingdom.com","ip":"174.34.156.130","countryiso":"US","region":"NA"},
{"id":43,"country":"United States","city":"Denver","name":"Denver, CO","active":true,"hostname":"s421.pingdom.com","ip":"173.248.147.18","countryiso":"US","ipv6":"2607:fc88:100:26::421","region":"NA"},
{"id":47,"country":"Austria","city":"Vienna","name":"Vienna, Austria","active":true,"hostname":"s425.pingdom.com","ip":"178.255.152.2","countryiso":"AT","ipv6":"2a00:11c0:d:3::425","region":"EU"},
&lt;/PRE&gt;
&lt;P&gt;In the logs for the miner though, I see&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
    "_age_out": 4294967295000,
    "confidence": 100,
    "json_hostname": "s4054.pingdom.com",
    "json_country": "South Korea",
    "share_level": "green",
    "json_ip": "169.56.174.147",
    "_last_run": 1548903839226,
    "json_city": "Seoul",
    "sources": [
        "pingdom_nodes-US"
    ],
    "json_name": "Seoul",
    "json_active": false,
    "json_id": 259,
    "first_seen": 1548903839226,
    "json_countryiso": "KR",
    "type": "IPv4",
    "json_region": "APAC",
    "last_seen": 1548903839226
}&lt;/PRE&gt;
&lt;P&gt;If I change the field names in the miner to "json_*", the miner shows 0 indicators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My aggregator looks like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aggregator.jpg" style="width: 800px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/18521i9905F56E3B50AD06/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="aggregator.jpg" alt="aggregator.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The feed looks like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feed.jpg" style="width: 800px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/18522i82189AD5B3C0AFFB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="feed.jpg" alt="feed.jpg" /&gt;&lt;/span&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 03:09:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248234#M97166</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-01-31T03:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248337#M97167</link>
      <description>&lt;P&gt;I went back to the article&amp;nbsp;&lt;A title="Using MineMeld to extract indicators from a generic API" href="https://live.paloaltonetworks.com/t5/MineMeld-Articles/Using-MineMeld-to-extract-indicators-from-a-generic-API/ta-p/218757" target="_blank"&gt;Using MineMeld to extract indicators from a generic API&lt;/A&gt;&amp;nbsp;and re-read the JSON section.&amp;nbsp; It noted the addition of the&amp;nbsp;&lt;EM&gt;json_&lt;/EM&gt; prefix to the field names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing my match criteria to use the prefix resolved the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is working as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 20:09:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/248337#M97167</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-01-31T20:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/249156#M97168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/47980"&gt;@MichaelPDean&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;would you&amp;nbsp;consider a Pull Request to our github repo for prototypes?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/PaloAltoNetworks/minemeld-node-prototypes" target="_blank"&gt;https://github.com/PaloAltoNetworks/minemeld-node-prototypes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 08:11:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/249156#M97168</guid>
      <dc:creator>lmori</dc:creator>
      <dc:date>2019-02-07T08:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/249315#M97169</link>
      <description>&lt;P&gt;Would this potentially change anything I created that is based on a system/standard prototype?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am open to it either way, but need to know if I have to watch out for potential changes to custom nodes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the command to do the pull and have the updates completed?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 19:29:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/249315#M97169</guid>
      <dc:creator>MichaelPDean</dc:creator>
      <dc:date>2019-02-07T19:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/453142#M101323</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm adding to this discussion to describe a similar problem. I'm building a custom miner to a service that requires basic authentication. The resource contains a simple flat file with a indicator in every line.&lt;/P&gt;&lt;P&gt;With curl I execute the request like this:&lt;/P&gt;&lt;PRE&gt;curl -k -H 'Authorization: Basic &amp;lt;base64&amp;gt;' https://host/siem/url/apt&lt;/PRE&gt;&lt;P&gt;And the miner configuration is this:&lt;/P&gt;&lt;PRE&gt;URLS_TIP3:&lt;BR /&gt;    class: minemeld.ft.http.HttpFT&lt;BR /&gt;    config:&lt;BR /&gt;        age_out:&lt;BR /&gt;            default: null&lt;BR /&gt;            interval: 600&lt;BR /&gt;            sudden_death: true&lt;BR /&gt;        attributes:&lt;BR /&gt;            confidence: 80&lt;BR /&gt;            direction: inbound&lt;BR /&gt;            share_level: green&lt;BR /&gt;            type: URL&lt;BR /&gt;        headers:&lt;BR /&gt;            Authorization: Basic &amp;lt;base64&amp;gt;&lt;BR /&gt;        indicator:&lt;BR /&gt;            regex: ^http.*&lt;BR /&gt;        source_name: tip.URLS&lt;BR /&gt;        url: https://host/siem/url/apt&lt;BR /&gt;        verify_cert: false&lt;BR /&gt;    description: Tip siem url apt&lt;BR /&gt;    development_status: STABLE&lt;BR /&gt;    indicator_types:&lt;BR /&gt;    - URL&lt;BR /&gt;    node_type: miner&lt;BR /&gt;    tags:&lt;BR /&gt;    - ConfidenceHigh&lt;BR /&gt;    - ShareLevelGreen&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;But I receive in LAST RUN miner row:&lt;/P&gt;&lt;PRE&gt;401: Client Error: Unouthorized for url: https://host/siem/url/apt&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:06:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/453142#M101323</guid>
      <dc:creator>jonnynux</dc:creator>
      <dc:date>2021-12-14T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Miner with basic auth and an API key</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/453158#M101324</link>
      <description>&lt;P&gt;I answer in myself, I replaced&lt;/P&gt;&lt;PRE&gt;headers:&lt;BR /&gt;    Authorization: Basic &amp;lt;base64&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;with:&lt;/P&gt;&lt;PRE&gt;username: usernamepassword: password&lt;/PRE&gt;&lt;P&gt;and everything worked perfectly.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 12:13:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/json-miner-with-basic-auth-and-an-api-key/m-p/453158#M101324</guid>
      <dc:creator>jonnynux</dc:creator>
      <dc:date>2021-12-14T12:13:14Z</dc:date>
    </item>
  </channel>
</rss>

