<?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 access to indexer from search head without password in Security</title>
    <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379347#M13208</link>
    <description>&lt;P&gt;Thanks @harsmarvania57 ! This does the trick!&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 20:14:09 GMT</pubDate>
    <dc:creator>nhalakatti_splu</dc:creator>
    <dc:date>2019-05-21T20:14:09Z</dc:date>
    <item>
      <title>Rest access to indexer from search head without password</title>
      <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379343#M13204</link>
      <description>&lt;P&gt;I am trying to print the status and the hardware info for my indexers by executing the rest endpoint &lt;STRONG&gt;/services/server/info&lt;/STRONG&gt; for each of the indexers on the search head by getting the indexer ip's from &lt;STRONG&gt;/services/search/distributed/peers&lt;/STRONG&gt; endpoint. Given that the user has admin credentials and access, we can get the auth token to execute rest calls on search head using &lt;STRONG&gt;auth/login&lt;/STRONG&gt; endpoint. Is there a way we can access the indexers from the search head without using the auth/login endpoint which requires indexer credentials input in the rest call. So basically if the username /password are different on indexers compared to the search head I need to keep taking the input credentials for each indexer to get the indexer information on the search head. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Is there a way to accomplish this without asking indexer credentials?&lt;/STRONG&gt; or &lt;STRONG&gt;Is there a way as an admin I can get the credentials for accessing the indexers and then I can use the auth/login way?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; There is the trusted.pem that contains the public key of SH in SPLUNK_HOME/etc/auth/distServerKeys on the search that is distributed to indexers on adding the peer. But I believe this is more useful in SSH. Not sure if this can be used in a REST call to indexer&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 17:04:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379343#M13204</guid>
      <dc:creator>nhalakatti_splu</dc:creator>
      <dc:date>2019-05-20T17:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rest access to indexer from search head without password</title>
      <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379344#M13205</link>
      <description>&lt;P&gt;You do this via &lt;CODE&gt;| rest&lt;/CODE&gt; search command or using &lt;CODE&gt;curl&lt;/CODE&gt; (or any other rest tool)?&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 18:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379344#M13205</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-05-20T18:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rest access to indexer from search head without password</title>
      <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379345#M13206</link>
      <description>&lt;P&gt;curl like mechanism&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 19:33:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379345#M13206</guid>
      <dc:creator>nhalakatti_splu</dc:creator>
      <dc:date>2019-05-20T19:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rest access to indexer from search head without password</title>
      <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379346#M13207</link>
      <description>&lt;P&gt;Yes you can achieve this but it will still require you to fetch Session Key for each Indexer first on SH. When you hit &lt;CODE&gt;/services/search/distributed/peers&lt;/CODE&gt; REST endpoint on SH, you will get list of all Indexers and for each Indexer there is &lt;CODE&gt;remote_session&lt;/CODE&gt; which is Session Key.&lt;/P&gt;

&lt;P&gt;So you can use that &lt;CODE&gt;remote_session&lt;/CODE&gt; in curl as given below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -H "Authorization: Splunk INDEXER_REMOTE_SESSION_KEY" &lt;A href="https://&amp;lt;indexer_host_ip&amp;gt;:8089/services/server/info" target="test_blank"&gt;https://&amp;lt;indexer_host_ip&amp;gt;:8089/services/server/info&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 May 2019 08:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379346#M13207</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-05-21T08:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rest access to indexer from search head without password</title>
      <link>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379347#M13208</link>
      <description>&lt;P&gt;Thanks @harsmarvania57 ! This does the trick!&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 20:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Rest-access-to-indexer-from-search-head-without-password/m-p/379347#M13208</guid>
      <dc:creator>nhalakatti_splu</dc:creator>
      <dc:date>2019-05-21T20:14:09Z</dc:date>
    </item>
  </channel>
</rss>

