• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

<security-constraint> doubt

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Source : Marcus

Which statements are true of the following snippet of a deployment descriptor.



A. It is faulty becasue it has multiple security-constraint elements Incorrect
B. It is faulty because it does not supply the http-method tag Incorrect
C. Only members of the manager role will be able to access the resource Incorrect
D. Any user will be able to access the resource Correct
E. No users will be able to access the resource

Answer: D

I think it shall be E , I tested it and it was coming as E only. Can anyone explain?
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Parth,

You are correct: when more than one constraint is set for the same resource: the no-value authority is overriding.

Regards,
Frits
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok..

Don't you think there shall be an error as well because of wrong placement of
<role-name>manager</role-name>


<auth-constraint>
</auth-constraint>
<role-name>manager</role-name>
</security-constraint>



and because

<web-resource-name>Sensitive</web-resource-name>



is same in both the constraints?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Don't you think there shall be an error as well because of wrong placement of
<role-name>manager</role-name>


Yes, that won't work.....

<web-resource-name> is same in both the constraints?


This might work.... but it should not have the same name, you are right

Regards,
Frits
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic