<?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: Role-based search filter syntax in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753846#M242793</link>
    <description>&lt;P&gt;Limiting by search-time defined fields is pointless since any user can easily bypass such filter.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Oct 2025 18:00:56 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-10-01T18:00:56Z</dc:date>
    <item>
      <title>Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753835#M242792</link>
      <description>&lt;P&gt;I created a search filter that looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=web NOT status=404) OR (index!=web)&lt;/LI-CODE&gt;&lt;P&gt;which works to limit the role to search for events with `status!=404` in the index `web`.&lt;/P&gt;&lt;P&gt;However, Splunk document says this about the &lt;A href="https://help.splunk.com/en/splunk-enterprise/administer/manage-users-and-security/9.4/manage-splunk-platform-users-and-roles/create-and-manage-roles-with-splunk-web#ariaid-title4" target="_self"&gt;search filter syntax&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"When you specify search term filters, use the&amp;nbsp;&lt;/SPAN&gt;key::value&lt;SPAN&gt;&amp;nbsp;syntax, rather than&amp;nbsp;&lt;/SPAN&gt;key=value&lt;SPAN&gt;, where possible, to restrict search terms to indexed fields."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I changed that filter to:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index::web NOT status=404) OR (NOT index::web)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I no longer get any results at all. No error / warning either.&lt;/P&gt;&lt;P&gt;I guess I can use the `key=value` syntax instead. But I am curious why the `key::value` syntax does not work? Also, the document states that the `key::value` syntax provides better performance and security.&lt;/P&gt;&lt;P&gt;We are using Splunk Cloud, currently running&amp;nbsp;version 9.3.2411.116. The document for v9.3 and v9.4 say the same thing.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 17:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753835#M242792</guid>
      <dc:creator>ww9rivers</dc:creator>
      <dc:date>2025-10-01T17:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753846#M242793</link>
      <description>&lt;P&gt;Limiting by search-time defined fields is pointless since any user can easily bypass such filter.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 18:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753846#M242793</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-01T18:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753849#M242795</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15302"&gt;@ww9rivers&lt;/a&gt;&amp;nbsp;key::value is an index-time field which the user shouldnt be able to manipulate, however key=value is a search-time extraction, therefore they could create a private field extraction eval which would eval status=200 which would allow them to see all data in index=web - this is why the docs specify that you need to use key::value.&lt;/P&gt;&lt;P&gt;If you want to use status::404 then you need to extract this as an index-field. This is possible in Splunk Cloud but the solution depends on if you use a HF before sending to Splunk Cloud, basically wherever your data is parsed you need to create an index time field. For more info check out&amp;nbsp;&lt;A href="https://help.splunk.com/en/splunk-enterprise/get-started/get-data-in/9.4/configure-indexed-field-extraction/create-custom-fields-at-index-time" target="_blank"&gt;https://help.splunk.com/en/splunk-enterprise/get-started/get-data-in/9.4/configure-indexed-field-extraction/create-custom-fields-at-index-time&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753849#M242795</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-10-01T20:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753852#M242797</link>
      <description>&lt;P&gt;Thank you for responding.&lt;/P&gt;&lt;P&gt;My problem is not exactly with the "status=404" part.&lt;/P&gt;&lt;P&gt;My problem is that when I use the "index=web" syntax, I get results. But when I change that to "index::web" I get nothing.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 21:22:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753852#M242797</guid>
      <dc:creator>ww9rivers</dc:creator>
      <dc:date>2025-10-01T21:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753853#M242798</link>
      <description>&lt;P&gt;The :: syntax works only with indexed fields. You can't just replace = with :: for everything and expect it to work. For index you can use normal = because it's a special case.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 21:51:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753853#M242798</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-01T21:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753878#M242803</link>
      <description>&lt;P&gt;That may be true.&lt;/P&gt;&lt;P&gt;But the document I linked in the original post clearly states "&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;SPL search filter&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;field in the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;4. Restrictions&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;tab accepts any of the following search terms:" and "index::" is listed under that literally.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is the documentation wrong, then?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 14:02:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753878#M242803</guid>
      <dc:creator>ww9rivers</dc:creator>
      <dc:date>2025-10-02T14:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753879#M242804</link>
      <description>&lt;P&gt;OK. This is actually a bit surprising since I expected index to be a relatively border case. But it seems a simple&lt;/P&gt;&lt;PRE&gt;index::_internal&lt;/PRE&gt;&lt;P&gt;seems to work in your normal search.&lt;/P&gt;&lt;P&gt;So a search filter based on this condition should also work. Might need to do some testing because that is an interesting case. Can you show the literal working and not working filters?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 14:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753879#M242804</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-02T14:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753937#M242808</link>
      <description>&lt;P&gt;I think I got it figured out!&lt;/P&gt;&lt;P&gt;My search filter actually works with the :: syntax.&lt;/P&gt;&lt;P&gt;However, I initially had double-quotes around the value for source, which is part of the search. Once I removed the double-quotes, it started working.&lt;/P&gt;&lt;P&gt;So, &lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇&lt;/span&gt;this does not work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source::"value"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But this does:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;source::value&lt;/LI-CODE&gt;&lt;P&gt;Thank you all for the discussion!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Oct 2025 03:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753937#M242808</guid>
      <dc:creator>ww9rivers</dc:creator>
      <dc:date>2025-10-04T03:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753963#M242809</link>
      <description>&lt;P&gt;This is really interesting. How it works if there is indexed field which can contains also space? Or did it add as " mark in those indexed fields? Or didn't it work anyhow?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Oct 2025 13:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/753963#M242809</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-10-05T13:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Role-based search filter syntax</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/754005#M242812</link>
      <description>&lt;P&gt;I haven't tested but the "field::long value" might work. Then again it might not.&lt;/P&gt;&lt;P&gt;Just like there is currently no syntax for searching for terms with literal asterisks in them.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 17:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Role-based-search-filter-syntax/m-p/754005#M242812</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-10-06T17:32:47Z</dc:date>
    </item>
  </channel>
</rss>

