Thanks, Scott. I've got it.
SMS> The spec also says: SMS> <ejb-2.0 spec> SMS> 21.3.4.1 Run-as SMS> The Application Assembler can use the run-as element to define a run-as SMS> identity for an enterprise SMS> bean in the deployment descriptor. The run-as identity applies to the SMS> enterprise bean as a whole, that is, SMS> to all methods of the enterprise bean's home and component interfaces or to SMS> the onMessage method of SMS> a message-driven bean, and all internal methods of the bean that they might SMS> in turn call. SMS> Establishing a run-as identity for an enterprise bean does not affect the SMS> identities of its callers, which SMS> are the identities tested for permission to access the methods of the SMS> enterprise bean. The run-as identity SMS> establishes the identity the enterprise bean will use when it makes calls. SMS> Because the Application Assembler does not, in general, know the security SMS> environment of the operational SMS> environment, the run-as identity is designated by a logical role-name, which SMS> corresponds to one SMS> of the security roles defined by the Application Assembler in the deployment SMS> descriptor. SMS> The Deployer then assigns a security principal defined in the operational SMS> environment to be used as the SMS> principal for the run-as identity. The security principal assigned by the SMS> Deployer should be a principal SMS> that has been assigned to the security role specified by the role-name SMS> element. SMS> </ejb-2.0 spec> SMS> The getCallerPrincipal of the bean with the run-as will return the caller of SMS> the SMS> bean, not the run-as identity. Which contextual use of getCallerPrincipal SMS> are you SMS> talking about? SMS> xxxxxxxxxxxxxxxxxxxxxxxx SMS> Scott Stark SMS> Chief Technology Officer SMS> JBoss Group, LLC SMS> xxxxxxxxxxxxxxxxxxxxxxxx SMS> ----- Original Message ----- SMS> From: "Alex Loubyansky" <[EMAIL PROTECTED]> SMS> To: "JBoss-User" <[EMAIL PROTECTED]> SMS> Sent: Tuesday, May 07, 2002 9:54 AM SMS> Subject: [JBoss-user] getCallerPrincipal() and run-as >> It was discussed many times but could someone explain it once more, >> please. >> >> The EJB2.0 spec says: >> "The Application Assembler should specify the requirements for the SMS> caller�s principal management of >> enterprise bean invocations by means of the security-identity deployment SMS> descriptor element >> and as part of the description. If use-caller-identity is specified as the SMS> value of the security- >> identity element, the caller principal is propagated from the caller to SMS> the callee. (That is, the >> called enterprise bean will see the same returned value of the SMS> EJBContext.getCallerPrincipal() >> as the calling enterprise bean.) If the run-as element is specified, a SMS> security principal that has >> been assigned to the specified security role will be used for the SMS> execution of the bean�s methods and will >> be visible as the caller principal in the callee." >> >> Does "will be visible as the caller principal in the callee" mean that >> it will be returned as a result of getCallerPrincipal()? As it is >> implemented in jboss, the answer is no. >> >> So, what's the difference between getCallerPrincipal() and "will be SMS> visible as the caller >> principal in the callee"? >> >> 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
