• 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

authorization question (role names)

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

In the Head First (2nd edition) book, the same mock exam at the back, page 823, Question 43 is as below:


Given that a deployment descriptor has only one security role, defined as:

<security-role>
<role-name>Member</role-name>
</security-role>

Which are valid <auth-constraint> elements that will allow users to access resources constrained by the security role declared ? (choose all that apply)

A: <auth-constraint/>
B: <auth-constraint>*</auth-constraint>
C: <auth-constraint>Member</auth-constraint>
D: <auth-constraint>MEMBER</auth-constraint>
E: <auth-constraint>"Member"</auth-constraint>

The answer given is B and C. I would have thought the correct answer was only B. The reason I say this is that can you specify the role name in auth-constraint without putting the role name inside a <role-name> ? I thought not. I check the errata but found no mention of it.

I would have though that if B was as below then it would be correct:

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

Any thoughts/advice would be great.
Thanks - Ro
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't find the question in my book but what you are saying is right, role names should be in role-name tags...
 
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 Ronan,

You are right.

Have a look at the topic in another thread: auth-constraint

Regards,
Frits
 
Ronan Dowd
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great stuff, thanks Fritz..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic