<?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: Python SDK: How to create a user that can only write to specific indexes? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199539#M2691</link>
    <description>&lt;P&gt;We have a similar use case, and are running into the same problem, on 6.4.0. I have a user with a role that grants the below capabilities, but has no allowed indexes for search (only for testing, in real life, it would be able to search a subset of the available indexes):&lt;BR /&gt;&lt;BR /&gt;
    change_own_password&lt;BR /&gt;
    edit_tcp&lt;BR /&gt;
    output_file&lt;BR /&gt;
    schedule_rtsearch&lt;BR /&gt;
    search&lt;/P&gt;

&lt;P&gt;This role inherits from no other roles, and the user has no other roles.&lt;/P&gt;

&lt;P&gt;When authenticated as this user, I get no search results, and cannot use the &lt;CODE&gt;collect&lt;/CODE&gt; command to write into any index, as is expected (or, when I have indexes allowed for the associated role, I can only use &lt;CODE&gt;collect&lt;/CODE&gt; to write into the indexes that I am permitted to search). &lt;/P&gt;

&lt;P&gt;However, using the Splunk Python SDK (via &lt;CODE&gt;clientInstance.index[&amp;lt;index_name&amp;gt;].submit()&lt;/CODE&gt;) or the REST API (via &lt;CODE&gt;/services/receivers/{simple,streaming}&lt;/CODE&gt;), while authenticated as this user, I am able to write into any index, regardless of which indexes I am permitted to search.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:43:21 GMT</pubDate>
    <dc:creator>donaldson8</dc:creator>
    <dc:date>2020-09-29T09:43:21Z</dc:date>
    <item>
      <title>Python SDK: How to create a user that can only write to specific indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199536#M2688</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am working with code that sends data to Splunk indexes via the Python SDK (splunklib.client). I want to create a custom user for the purpose of this code. That is, a user who's privileges are strictly that of writing data into a small number of indexes and be otherwise restricted from writing elsewhere.&lt;/P&gt;

&lt;P&gt;I currently have a user with just the capability 'edit_tcp' and the 4 indexes I want specified for search capability, but this does not seem to restrict the write capability when using the .send() python function.&lt;/P&gt;

&lt;P&gt;Any help would be apreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2014 21:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199536#M2688</guid>
      <dc:creator>asherman</dc:creator>
      <dc:date>2014-09-02T21:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK: How to create a user that can only write to specific indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199537#M2689</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a similar concern, I am building a  Splunk app to capture user input and then POST it to an index. Users have edit_tcp capability and they can post data to any index irrespective of whether which they have read access to it or not. &lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2015 18:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199537#M2689</guid>
      <dc:creator>0verhaul</dc:creator>
      <dc:date>2015-08-06T18:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK: How to create a user that can only write to specific indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199538#M2690</link>
      <description>&lt;P&gt;When you created your user, what role did you give it? Did this role Inherit from another role? If yes, then the user will be able to write into any indexes that were allowed for all the "parent" roles in the inheritance tree.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2015 21:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199538#M2690</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-08T21:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK: How to create a user that can only write to specific indexes?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199539#M2691</link>
      <description>&lt;P&gt;We have a similar use case, and are running into the same problem, on 6.4.0. I have a user with a role that grants the below capabilities, but has no allowed indexes for search (only for testing, in real life, it would be able to search a subset of the available indexes):&lt;BR /&gt;&lt;BR /&gt;
    change_own_password&lt;BR /&gt;
    edit_tcp&lt;BR /&gt;
    output_file&lt;BR /&gt;
    schedule_rtsearch&lt;BR /&gt;
    search&lt;/P&gt;

&lt;P&gt;This role inherits from no other roles, and the user has no other roles.&lt;/P&gt;

&lt;P&gt;When authenticated as this user, I get no search results, and cannot use the &lt;CODE&gt;collect&lt;/CODE&gt; command to write into any index, as is expected (or, when I have indexes allowed for the associated role, I can only use &lt;CODE&gt;collect&lt;/CODE&gt; to write into the indexes that I am permitted to search). &lt;/P&gt;

&lt;P&gt;However, using the Splunk Python SDK (via &lt;CODE&gt;clientInstance.index[&amp;lt;index_name&amp;gt;].submit()&lt;/CODE&gt;) or the REST API (via &lt;CODE&gt;/services/receivers/{simple,streaming}&lt;/CODE&gt;), while authenticated as this user, I am able to write into any index, regardless of which indexes I am permitted to search.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-How-to-create-a-user-that-can-only-write-to-specific/m-p/199539#M2691</guid>
      <dc:creator>donaldson8</dc:creator>
      <dc:date>2020-09-29T09:43:21Z</dc:date>
    </item>
  </channel>
</rss>

