This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about auth-constraint

 
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