I've figured it out. The spec also says:
"Note that getCallerPrincipal() returns the principal that represents the caller of the
enterprise bean, not the principal that corresponds to the run-as security identity 
for the bean,
if any."

And:
"Note that isCallerInRole(String roleName) tests the principal that represents the
caller of the enterprise bean, not the principal that corresponds to the run-as 
security identity
for the bean, if any."

Is it clear for everybody now? :)

AL>   It was discussed many times but could someone explain it once more,
AL> please.

AL> The EJB2.0 spec says:
AL> "The Application Assembler should specify the requirements for the caller�s 
principal management of
AL> enterprise bean invocations by means of the security-identity deployment 
descriptor element
AL> and as part of the description. If use-caller-identity is specified as the value 
of the security-
AL> identity element, the caller principal is propagated from the caller to the 
callee. (That is, the
AL> called enterprise bean will see the same returned value of the 
EJBContext.getCallerPrincipal()
AL> as the calling enterprise bean.) If the run-as element is specified, a security 
principal that has
AL> been assigned to the specified security role will be used for the execution of the 
bean�s methods and will
AL> be visible as the caller principal in the callee."

AL> Does "will be visible as the caller principal in the callee" mean that
AL> it will be returned as a result of getCallerPrincipal()? As it is
AL> implemented in jboss, the answer is no.

AL>   So, what's the difference between getCallerPrincipal() and "will be visible as 
the caller
AL> principal in the callee"?

AL>   TIA

-- 
Best regards,
 Alex                            mailto:[EMAIL PROTECTED]



_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to