<?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: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166450#M47393</link>
    <description>&lt;P&gt;I'm not sure we can use regex, the error you have ,was is not the goal( to hinder a user to do such a search?) &lt;/P&gt;

&lt;P&gt;If the usage of wildcard * is more global than wath you want, try to list precise search terms.Read the note under the text box of SEARCH TERMS RESTRICTION.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2015 08:56:45 GMT</pubDate>
    <dc:creator>stephane_cyrill</dc:creator>
    <dc:date>2015-04-27T08:56:45Z</dc:date>
    <item>
      <title>How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166445#M47388</link>
      <description>&lt;P&gt;For audit and performance reasons, I want to educate (force) my users to always explicitly provide the index(es) that they want to search.&lt;BR /&gt;
First I have made sure that no default indexes are searched.&lt;/P&gt;

&lt;P&gt;Secondly I would like to limit the searches. Can I limit searches that use wildcard in index?&lt;BR /&gt;
E.g. &lt;CODE&gt;index=* index=test* index=*test&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am aware that "Access Controls &amp;gt; Roles" has a "Restrict search terms" field, but I can't find any documentation or examples on what I want to do.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 07:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166445#M47388</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-04-27T07:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166446#M47389</link>
      <description>&lt;P&gt;Hi, it is simple,just create a role for these users and make a restriction on these search terms (index =........). &lt;/P&gt;

&lt;P&gt;to do it in splunk web:&lt;/P&gt;

&lt;P&gt;setting &amp;gt; access control &amp;gt; roles &amp;gt;add new&lt;BR /&gt;
under search restrictions, put what you want to be restricted (index= index=test OR index=*test)&lt;/P&gt;

&lt;P&gt;Do not forget to specify to whom the role should be apply. &lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 07:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166446#M47389</guid>
      <dc:creator>stephane_cyrill</dc:creator>
      <dc:date>2015-04-27T07:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166447#M47390</link>
      <description>&lt;P&gt;Thank you for your answer.&lt;/P&gt;

&lt;P&gt;Can I use regular expressions in search restrictions?&lt;/P&gt;

&lt;P&gt;Also will your restriction limit a user that searches on "index=foo OR index=bar*"?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 07:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166447#M47390</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-04-27T07:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166448#M47391</link>
      <description>&lt;P&gt;I want to limit queries that match:&lt;BR /&gt;
&lt;CODE&gt;index=[^*]+&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 08:03:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166448#M47391</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-04-27T08:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166449#M47392</link>
      <description>&lt;P&gt;Doing that gives me an error on every search like this:&lt;BR /&gt;
&lt;CODE&gt;Error in 'SearchParser': Missing a search command before '^'. Error at position '46' of search query 'litsearch ( index=splunktest abc ) ( ( index=[^*]+'.&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 08:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166449#M47392</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-04-27T08:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166450#M47393</link>
      <description>&lt;P&gt;I'm not sure we can use regex, the error you have ,was is not the goal( to hinder a user to do such a search?) &lt;/P&gt;

&lt;P&gt;If the usage of wildcard * is more global than wath you want, try to list precise search terms.Read the note under the text box of SEARCH TERMS RESTRICTION.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 08:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166450#M47393</guid>
      <dc:creator>stephane_cyrill</dc:creator>
      <dc:date>2015-04-27T08:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166451#M47394</link>
      <description>&lt;P&gt;From the administration page:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Search restrictions&lt;BR /&gt;
Restrict the scope of searches run by this role. Search results for this role will only show events that also match this search string.&lt;/P&gt;

&lt;P&gt;Can include source, host, index (can be set below), eventtype, sourcetype, search fields, &lt;EM&gt;, and OR and AND. Example: "`host=web&lt;/EM&gt; OR source=/var/log/*`"&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It seems like it is impossible to limit user queries that way I want to. Naming the precise search terms is very hard and impossible to administrate when I add new indexes. Besides. Given enough valid queries, the user can still run the wildcard queries, that I wish to limit.&lt;/P&gt;

&lt;P&gt;Is there any other way to limit queries?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 09:06:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166451#M47394</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-04-27T09:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166452#M47395</link>
      <description>&lt;P&gt;Can somebody confirm if what I want is impossible?&lt;/P&gt;

&lt;P&gt;I conclude that it is impossible using "Restrict search terms", but is there another way?&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2015 08:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166452#M47395</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-05-01T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict searches that use wildcards in the index (ex: index=* index=test* index=*test)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166453#M47396</link>
      <description>&lt;P&gt;Got this answer from Splunk support:&lt;/P&gt;

&lt;P&gt;With regards to your index=* question, the answer is currently "no"&lt;/P&gt;

&lt;P&gt;With our current set of roles and capabilities, we do not have a method by which to restrict the use of wild-cards in search strings.&lt;BR /&gt;&lt;BR /&gt;
Currently, the best practice here is to define roles that restrict access to only the necessary indexes and educate your users on Search &amp;amp; Reporting best practices so that they build efficient search queries.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2015 07:07:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-restrict-searches-that-use-wildcards-in-the-index-ex/m-p/166453#M47396</guid>
      <dc:creator>lassel</dc:creator>
      <dc:date>2015-05-12T07:07:48Z</dc:date>
    </item>
  </channel>
</rss>

