• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

run-as question.

 
gabriele rigamonti
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

my question..

If i use <run-as> with the role-name User for exmaple in Bean A and i make

a getCallerPrincipal on a method of Bean B (B is called from A) i see the

Principal associated with the run as, but if i have more principals

associated to the User role-name what is the result?


I hope to be clear

Thanks!!

Gabriele
 
Severin Stoeckli
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Spec 21.6.4:

The EJB Container must be capable of allowing the Deployer to specify that a run-as principal be used
for the execution of the home and component methods of a session or entity bean or for the onMessage
method of a message-driven bean.




I would say that this run-as principal is used, and not a principal that corresponds to the role. Did you try it out?

Severin
 
Severin Stoeckli
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... yes, the confirmation is in

21.4.3

If the Application Assembler specifies that a run-as identity be used on behalf of a particular enterprise
bean, the Deployer must configure the enterprise beans such that the run-as principal is used as the
caller principal on any calls that the enterprise bean makes to other beans, and that the run-as principal
is propagated along the call-chain of those other beans (in the absence of the specification of any further
run-as elements).


/Severin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic