<?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: Create user and grant him search privilege on a specific index with cURL in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239659#M46583</link>
    <description>&lt;P&gt;Create a role&lt;BR /&gt;
And Attach your filter to that role...&lt;/P&gt;

&lt;P&gt;Check.. &lt;STRONG&gt;[role_&amp;lt;&amp;lt; roleName &amp;gt;&amp;gt;]  --&amp;gt; srchFilter&lt;/STRONG&gt;  in &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/authorizeconf"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/authorizeconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or &lt;BR /&gt;
Give your filter in the field &lt;STRONG&gt;Restrict search terms&lt;/STRONG&gt; in UI while creating role&lt;/P&gt;

&lt;P&gt;And Assign that role to your User&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 07:30:27 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2016-08-18T07:30:27Z</dc:date>
    <item>
      <title>Create user and grant him search privilege on a specific index with cURL</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239657#M46581</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm trying to create a user and only grant him search privileges on a specific index using cURL. So far I used these two commands:&lt;BR /&gt;
Index creation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:password &lt;A href="https://SplunkIP:8089/servicesNS/admin/search/data/indexes" target="test_blank"&gt;https://SplunkIP:8089/servicesNS/admin/search/data/indexes&lt;/A&gt; -d name=mytest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I found this command example for the user creation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:password &lt;A href="https://SplunkIP:8089/services/authentication/users" target="test_blank"&gt;https://SplunkIP:8089/services/authentication/users&lt;/A&gt; -d name=User1 -d password=changeme -d roles=role
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So as far, as I understood, I can directly affect an existing role while creating the User1 account, but I would like to create a specific role which allows him to only read and search from the mytest index.&lt;/P&gt;

&lt;P&gt;I found a "createrole" parameter for the last cURL, but it's not clear from the documentation.&lt;/P&gt;

&lt;P&gt;So is it possible to create / specify the role while creating a new user? Or is there any other cURL command which can create a role?&lt;/P&gt;

&lt;P&gt;Thank you very much !&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 05:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239657#M46581</guid>
      <dc:creator>flzftw</dc:creator>
      <dc:date>2016-08-18T05:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create user and grant him search privilege on a specific index with cURL</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239658#M46582</link>
      <description>&lt;P&gt;You can create a role for the user but not sure if you can customize the role that way. Better option is to create the role separately (before creating user) with all the customization (index access) and then assign that role to the user while creating (or update if already created). See this link for roles creation curl using Splunk REST API&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTaccessExamples#authorization.2Froles_POST"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.6/RESTREF/RESTaccessExamples#authorization.2Froles_POST&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 06:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239658#M46582</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-18T06:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create user and grant him search privilege on a specific index with cURL</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239659#M46583</link>
      <description>&lt;P&gt;Create a role&lt;BR /&gt;
And Attach your filter to that role...&lt;/P&gt;

&lt;P&gt;Check.. &lt;STRONG&gt;[role_&amp;lt;&amp;lt; roleName &amp;gt;&amp;gt;]  --&amp;gt; srchFilter&lt;/STRONG&gt;  in &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/authorizeconf"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/authorizeconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or &lt;BR /&gt;
Give your filter in the field &lt;STRONG&gt;Restrict search terms&lt;/STRONG&gt; in UI while creating role&lt;/P&gt;

&lt;P&gt;And Assign that role to your User&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 07:30:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-user-and-grant-him-search-privilege-on-a-specific-index/m-p/239659#M46583</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2016-08-18T07:30:27Z</dc:date>
    </item>
  </channel>
</rss>

