This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about auth-constraint  RSS feed

 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if two conflicting <security-constraint> elements have got the following declaration for the same resource (let's say /secureServet/*):

Security constraint A:

<auth-constraint />

Security constraint B:

<auth-constraint>
<role-name>*</role-name>
</auth-constraint>

How will the resulting table be defined? With nobody or everybody?
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Servlet 2.4 (SRV.12.8.1) spec says:
"The special case of an authorization constraint that names no roles shall combine with any other constraints to override their affects and cause access to be precluded."

So the answer is NOBODY.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!