title: Using wildcards in Spring Security roles
body: <p>I have a role convention mechanism in my application for which each role follows a syntax:</p>
  
  <pre><code>APP_DEPARTMENT1_USER
  APP_DEPARTMENT1_AUDITOR
  APP_DEPARTMENT1_WHATEVER
  APP_DEPARTMENT2_...
  </code></pre>
  
  <p>I want to configure Spring security in order to allow all roles that match a given suffix to be granted access to a section of my web application. I blindly tried <code>&lt;intercept-url pattern="/secure/audit/**" access="APP_*_AUDITOR,APP_ADMINISTRATOR" /&gt;</code> (where <code>APP_ADMINISTRATOR</code> is my default administrator role) but it didn't work. When I log in as administrator I can access the page, but when I try to log in with a profile with the <code>APP_DEPARTMENT1_AUDITOR</code> I can't obtain access to the page.</p>
  
  <p>I think wildcard expressions are not supported, and I don't believe Spring EL expressions could be of help (or I just don't master them enough).</p>
  
  <p>Is there any way I can configure a role pattern for Spring Security within <code>&lt;intercept-url&gt;</code> tag?</p>