• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

security-role

 
Dhruvi Manchanda
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ final mock question 43:

<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?

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. How is option B correct ?

As per my understanding, security-role may mention n-number of roles, but only those listed in auth-constriant can make a constrained request for that resource. If no member is listed by auth-constraint then no one can make constrained request and if it is * then everyone is allowed.

Please correct me if I am wrong.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if it is * then everyone is allowed.

So why do you think that B is incorrect ?
 
Dhruvi Manchanda
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satou,

I got confused with this line

allow users to access resources constrained by the security role declared


Does that mean if ever allowed users are asked then it will include all the roles from scurity role plus everyone i.e *.

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The security role declared here is only "Member", and the "*" constraint allows this role (and other as well)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic