<?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: web session ID usable for rest session? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/web-session-ID-usable-for-rest-session/m-p/396405#M43665</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Here I am assuming that Custom REST is on Splunk Instance only and If your custom rest service is exposed to Splunk Web then yes you can use SplunkWeb CSRF Token for custom rest authentication.&lt;/P&gt;

&lt;P&gt;For example: &lt;BR /&gt;
I have dashboard which is using Javascript and hitting custom rest service in same Splunk instance and that custom rest is exposed to Splunk Web.&lt;/P&gt;

&lt;P&gt;So in Javascript&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xhr.setRequestHeader('X-Splunk-Form-Key', document.cookie.match(/splunkweb_csrf_token_8000=(\d+)/)[1]);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and custom rest which is exposed to Splunk Web is accessible at &lt;CODE&gt;/en-US/splunkd/__raw/services/my_custom_rest&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2019 09:16:02 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2019-01-11T09:16:02Z</dc:date>
    <item>
      <title>web session ID usable for rest session?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/web-session-ID-usable-for-rest-session/m-p/396404#M43664</link>
      <description>&lt;P&gt;is is possible to use Splunk's web session ID to authenticate a REST API call in a custom REST service?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 23:42:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/web-session-ID-usable-for-rest-session/m-p/396404#M43664</guid>
      <dc:creator>devsplunkid</dc:creator>
      <dc:date>2019-01-10T23:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: web session ID usable for rest session?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/web-session-ID-usable-for-rest-session/m-p/396405#M43665</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Here I am assuming that Custom REST is on Splunk Instance only and If your custom rest service is exposed to Splunk Web then yes you can use SplunkWeb CSRF Token for custom rest authentication.&lt;/P&gt;

&lt;P&gt;For example: &lt;BR /&gt;
I have dashboard which is using Javascript and hitting custom rest service in same Splunk instance and that custom rest is exposed to Splunk Web.&lt;/P&gt;

&lt;P&gt;So in Javascript&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;xhr.setRequestHeader('X-Splunk-Form-Key', document.cookie.match(/splunkweb_csrf_token_8000=(\d+)/)[1]);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and custom rest which is exposed to Splunk Web is accessible at &lt;CODE&gt;/en-US/splunkd/__raw/services/my_custom_rest&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 09:16:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/web-session-ID-usable-for-rest-session/m-p/396405#M43665</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-01-11T09:16:02Z</dc:date>
    </item>
  </channel>
</rss>

