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

related to auth constraint

 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


a. It is faulty becasue it has multiple security-constraint elements
b. It is faulty because it does not supply the http-method tag
c. Only members of the manager role will be able to access theresource
d. Any user will be able to access the resource
e. No users will be able to access the resource

The answer turned out to be e. However, I thought it should be d. Can anyone clarify ?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chapter SRV.12.8 of the Servlet 2.4 specification covers this. In particular "An authorization constraint that names no roles indicates that access to the constrained requests must not be permitted under any circumstances." and in SRV.12.8.1 you'll find that "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."

However, it seems that in the past this was not always implemented corrrectly by Tomcat (which is the reference implementation for the Servlet Spec); see here.

Also, if you post questions like these, please QuoteYourSources.
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The source is Marcus Greens site at http://www.examulator.com/moodle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic