• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

auth-constraint doubt in HFSJ book

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

In March 2008 - Second Edition on page 843


Your web application has a valid deployment descriptor in which student and sensei are the only security rolres that have been defined. The deployment descriptor contains two security constraints that declare the same resource to be constrained. the frist security constraint contains:

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

and the second:

<auth-constrint />



The books says that the right answer is this:


If the second <auth-constraint> tag is removed, the constrained resource can be accessed by both roles.



but I think it is wrong and that the right one is this:


If the second <auth-constraint> tag is removed, the constrained resource can be accessed only by student users.



What do you think?

Cheers,

Iv�n
 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

If the second <auth-constraint> tag is removed then we will have the following

<security-constraint>
</security-constraint>

So, both roles can access.

See the HFSJ page 693 ANSWERS.

Kathir
 
Iván Párraga
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you're right.

Thanks,

Iv�n
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic