title: Servlet authentication using Shiro, Is it possible to filter URLs having some keyword?
body: <p>I have a servlet application running in tomcat with shiro authentication. 
  My servlet URL looks like this</p>
  
  <pre><code> http://builds/Query/User?which_option=ui_data&amp;which_out=json
  </code></pre>
  
  <p>The  <strong><em>"which_option"</em></strong> in the above URL can take various values.
  I want to authenticate only those URLs having <strong><em>"which_option=ui_data"</em></strong> in shiro.
  I tried the following using regex in URL filtering in my shiro.ini.</p>
  
  <pre><code>[urls]
  /Query/User*ui_data* = authcBuilds
  </code></pre>
  
  <p>But that does not work. The <a href="http://shiro.apache.org/web.html#Web-%7B%7B%5Curls%5C%7D%7D" rel="nofollow noreferrer">Shiro URL configuration</a> page mentions that the URL expression must of <em>URL_Ant_Path_Expression</em>. The <a href="https://stackoverflow.com/questions/2952196/learning-ant-path-style">ANT path expression</a> seems to apply for matching only file names, and not part of URL string.</p>
  
  <p>Is there any other way to do this (URL regex matching)? or else I have to shift my code to another servlet like</p>
  
  <pre><code>http://builds/Query/UI_Data
  </code></pre>
  
  <p>and use the following authentication in shiro.ini</p>
  
  <pre><code>[urls]
  /Query/UI_Data* = authcBuilds
  </code></pre>