• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding run-as tag

 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I have Question as to how run as tag works. Please go through the code
in the Deployment descriptor

Sessionbean White: security-identity use-caller-id
entitySession bean Black: security-identity run-as roleC
Entity bean Blue: nothing specified
Entity bean Yellow: nothing specified
Entity bean Green: nothing specified
Assembly-descriptor
security-role roleA
security-role roleB
security-role roleC
method-permission
roleA White <method-name>*</method-name>
Blue <method-name>*</method-name>
Yellow <method-name>*</method-name>
roleB White <method-name>*</method-name>
Black <method-name>*</method-name>
Yellow <method-name>*</method-name>
roleC Blue <method-name>*</method-name>
Green <method-name>*</method-name>
Which of the following statements are TRUE regarding this deployment descriptor?
A. A client under the identity of roleA can invoke Blue and Yellow through White.
B. A client under the identity of roleA can invoke Blue and Yellow through Black.
C. A client under the identity of roleB can invoke Yellow and Green through White.
D. A client under the identity of roleB can invoke Blue and Green through Black.
E. A client under the identity of roleB can invoke Yellow and Green through Black.
ANS :-b,d

I feel that A, D are correct. Can anyone explain why b is correct

Thanks in Advance.
 
Binoj Viswanathan
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
B is wrong.A, D are correct.

With option B
"A client under the identity of roleA can invoke Blue and Yellow thru Black"

Here Balck is trying to access Blue and Yellow with role RoleC.But RoleC can only access blue and green methods.The methods of Yellow are not accessible.


binoj v
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic