<?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: Different authentications for HEC Token in Security</title>
    <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360735#M12780</link>
    <description>&lt;P&gt;Actually docs say that it should be available with 6.4.x &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2018 16:35:40 GMT</pubDate>
    <dc:creator>outcoldman</dc:creator>
    <dc:date>2018-01-03T16:35:40Z</dc:date>
    <item>
      <title>Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360732#M12777</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am following this online doc to test the three authentication for HEC tokens: &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE7G"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE7G&lt;/A&gt;. I don't understand why only HTTP authentication works while the other two gave different errors. Is it a permission issue? Please help. Thank you.&lt;/P&gt;

&lt;P&gt;HTTP Authentication:&lt;BR /&gt;
Command: curl -k &lt;A href="http://hostname:8088/services/collector"&gt;http://hostname:8088/services/collector&lt;/A&gt; -H 'Authorization: Splunk tokenId' -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}' &lt;BR /&gt;
Result: {"text":"Success","code":0}&lt;/P&gt;

&lt;P&gt;Basic Authentication:&lt;BR /&gt;
Command: curl -k -u "x:tokenID" &lt;A href="http://hostname:8088/services/collector"&gt;http://hostname:8088/services/collector&lt;/A&gt; -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}'&lt;BR /&gt;
Result: {"text":"Invalid authorization","code":3}&lt;/P&gt;

&lt;P&gt;Query String:&lt;BR /&gt;
Command: curl -k &lt;A href="http://hostname:8088/services/collector/event?token=tokenId"&gt;http://hostname:8088/services/collector/event?token=tokenId&lt;/A&gt; -d '{"sourcetype": "mysourcetype", "event":"Hello, World!"}'&lt;BR /&gt;
Result: {"text":"Token is required","code":2}&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 22:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360732#M12777</guid>
      <dc:creator>lqiao</dc:creator>
      <dc:date>2018-01-02T22:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360733#M12778</link>
      <description>&lt;P&gt;Which Splunk version are you using? I believe another two were added later, not on the initial release.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 06:26:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360733#M12778</guid>
      <dc:creator>outcoldman</dc:creator>
      <dc:date>2018-01-03T06:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360734#M12779</link>
      <description>&lt;P&gt;Thank you. I am using Splunk 6.4.3. I can test with higher version today.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:28:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360734#M12779</guid>
      <dc:creator>lqiao</dc:creator>
      <dc:date>2018-01-03T16:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360735#M12780</link>
      <description>&lt;P&gt;Actually docs say that it should be available with 6.4.x &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360735#M12780</guid>
      <dc:creator>outcoldman</dc:creator>
      <dc:date>2018-01-03T16:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360736#M12781</link>
      <description>&lt;P&gt;Basic authentication and query string authentications are new features in Splunk 6.6 and above &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth&lt;/A&gt; (documentation has misprint, that this is available starting from 6.4)&lt;/P&gt;

&lt;P&gt;Query authentication is disabled by default, see &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Inputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.1/Admin/Inputsconf&lt;/A&gt;, so you need to enable it to use the basic authentication or query parameters for authentication&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[http://name]
...
allowQueryStringAuth = [true|false]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;Updated 2018-01-03 based on @lqiao clarification&lt;/EM&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360736#M12781</guid>
      <dc:creator>outcoldman</dc:creator>
      <dc:date>2018-01-03T16:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360737#M12782</link>
      <description>&lt;P&gt;Looking at the example, it mentions:&lt;/P&gt;

&lt;H1&gt;Using Basic auth (6.5.0 and later only)&lt;/H1&gt;

&lt;P&gt;wrong in the doc?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 16:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360737#M12782</guid>
      <dc:creator>lqiao</dc:creator>
      <dc:date>2018-01-03T16:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360738#M12783</link>
      <description>&lt;P&gt;Seems like somewhere is a mistake, please send a feedback&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 01:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360738#M12783</guid>
      <dc:creator>outcoldman</dc:creator>
      <dc:date>2018-01-04T01:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360739#M12784</link>
      <description>&lt;P&gt;Hi outcoldman,&lt;/P&gt;

&lt;P&gt;You are correct. I'd like to amend something to your answers after my testing. It is not your mistake. It is a Splunk doc issue.&lt;/P&gt;

&lt;P&gt;Even in this doc &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE8Y#basicauth&lt;/A&gt;, it says that "Basic authentication and query string authentications are new features in Splunk 6.4 and above.", basic and query string authentications are not working on Splunk 6.4.3, see the result in my question. &lt;/P&gt;

&lt;P&gt;I tested on Splunk 6.5.6 (latest 6.5 version), basic authentication is working here. Query string authentication gave {"text":"Token is required","code":2} error, meaning that it is not supported on 6.5 version.&lt;/P&gt;

&lt;P&gt;I tested also on Splunk 6.6.5 (latest 6.6 version), both basic authentication and query string authentication are supported. 6.6.0 is the first version supporting configuration allowQueryStringAuth. Splunk doc says by default, allowQueryStringAuth = false, so result: {"text":"Query string authorization is not enabled","code":16}. After setting it to true, result is {"text":"Success","code":0}. This setting is not visible in the default inputs.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 23:07:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360739#M12784</guid>
      <dc:creator>lqiao</dc:creator>
      <dc:date>2018-01-04T23:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360740#M12785</link>
      <description>&lt;P&gt;I never hear my feedback back. I did more testing and added comment to your answer. Thanks for your answer. I don't want to accept it directly as the version part might confuse other people. It is not your mistake. My comment is being reviewed by the moderator.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 23:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360740#M12785</guid>
      <dc:creator>lqiao</dc:creator>
      <dc:date>2018-01-04T23:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Different authentications for HEC Token</title>
      <link>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360741#M12786</link>
      <description>&lt;P&gt;I have updated my answer, thank you for clarification!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 01:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Different-authentications-for-HEC-Token/m-p/360741#M12786</guid>
      <dc:creator>outcoldman</dc:creator>
      <dc:date>2018-01-05T01:24:38Z</dc:date>
    </item>
  </channel>
</rss>

