<?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: rest api auth in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22523#M3490</link>
    <description>&lt;P&gt;ok well good luck!&lt;/P&gt;</description>
    <pubDate>Sun, 27 Nov 2011 18:15:14 GMT</pubDate>
    <dc:creator>MHibbin</dc:creator>
    <dc:date>2011-11-27T18:15:14Z</dc:date>
    <item>
      <title>rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22517#M3484</link>
      <description>&lt;P&gt;How you could request a session key from splunks rest api without hardcoding passwords in your code?  &lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2011 16:50:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22517#M3484</guid>
      <dc:creator>bsteelz93</dc:creator>
      <dc:date>2011-11-25T16:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22518#M3485</link>
      <description>&lt;P&gt;This may be of use...&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.4/Developer/RESTAuthToken"&gt;http://docs.splunk.com/Documentation/Splunk/4.2.4/Developer/RESTAuthToken&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You could run the CLI command one-off and use the resulting sessionKey in subsequent searches (etc.)&lt;/P&gt;

&lt;P&gt;e.g. (from the URI above)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/auth/login/" target="test_blank"&gt;https://localhost:8089/services/auth/login/&lt;/A&gt; -d"username=admin&amp;amp;password=changeme"
&amp;lt;response&amp;gt;
&amp;lt;sessionKey&amp;gt;30774f9d502004b5c655c08b5362bdca&amp;lt;/sessionKey&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Nov 2011 17:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22518#M3485</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2011-11-25T17:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22519#M3486</link>
      <description>&lt;P&gt;Thanks for that answer.  I should have been a little clearer in my questions. Sorry.  I saw the docs you mention, but my understanding of that is you still need to hardcode the user and password in the script to get the auth code.  Am I misunderstanding something?  Is there a way to get the auth code without loggin in?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2011 01:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22519#M3486</guid>
      <dc:creator>bsteelz93</dc:creator>
      <dc:date>2011-11-26T01:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22520#M3487</link>
      <description>&lt;P&gt;I doubt there is a way to get the auth code without logging in at least once (otherwise there would be no point having login details).&lt;/P&gt;

&lt;P&gt;If you run the above command ("curl...." on *nix style systems) outside of a script/code, and copy-paste your generated sessionKey into the script/code (as shown in the docs, except without the user/password parts) it should work fine... Or have you already tried this?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2011 15:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22520#M3487</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2011-11-26T15:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22521#M3488</link>
      <description>&lt;P&gt;Same way as you would with any code handling login procedures. This is not a Splunk issue, rather a coding 'issue'. The most common ways to do this are probably either to prompt for username/password interactively when the script is run, or store the credentials in a configuration file separate from your script (and make sure only the appropriate users have read access).&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2011 16:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22521#M3488</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-11-26T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22522#M3489</link>
      <description>&lt;P&gt;That makes sense I was thinking of something a little different.  I have had success with the session key before.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2011 18:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22522#M3489</guid>
      <dc:creator>bsteelz93</dc:creator>
      <dc:date>2011-11-27T18:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22523#M3490</link>
      <description>&lt;P&gt;ok well good luck!&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2011 18:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/22523#M3490</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2011-11-27T18:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: rest api auth</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/530089#M89254</link>
      <description>&lt;P&gt;Could you please tell me how to call authentication rest api for "Splunk Cloude version"&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;DMC&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 14:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rest-api-auth/m-p/530089#M89254</guid>
      <dc:creator>Dhiraj37</dc:creator>
      <dc:date>2020-11-19T14:02:55Z</dc:date>
    </item>
  </channel>
</rss>

