Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

auth-constraint doubt in HFSJ book

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Yes, you're right.

Thanks,

Iv�n
 
It's a tiny ad only because the water is so cold.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic