title: Glassfish 3.1 default principal to role mapping
body: <p>I am working with glassfish and jaas module.</p>
  
  <p>I configured my web.xml in this way.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
          &lt;web-resource-name&gt;ALL Page for admin&lt;/web-resource-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;auth-constraint&gt;
          &lt;role-name&gt;user&lt;/role-name&gt;
      &lt;/auth-constraint&gt;
  &lt;/security-constraint&gt;
  &lt;login-config&gt;
      &lt;auth-method&gt;BASIC&lt;/auth-method&gt;
      &lt;realm-name&gt;file&lt;/realm-name&gt;
  &lt;/login-config&gt;
  &lt;security-role&gt;
      &lt;description&gt;Administrator&lt;/description&gt;
      &lt;role-name&gt;user&lt;/role-name&gt;
  &lt;/security-role&gt;
  </code></pre>
  
  <p>It means all user that want to access my web application need be of the group user.</p>
  
  <p>Then on the glassfish console I need to tick the options in:
  Configuration -> server-config -> security -> Default Principal To Role Mapping</p>
  
  <p>My question is why I need to tick this Default Principal to Role Mapping ? And how I can change my web.xml to avoid to tick it ? </p>
  
  <p>Thanks a lot</p>
  
  <p>Loic</p>