users@glassfish.java.net

EJB Security, Roles, Principals and Run-as in GF

From: <glassfish_at_javadesktop.org>
Date: Wed, 25 Nov 2009 09:41:35 PST

Hello,

it's a question about the meaning of the "principal" xml-element of sun-ejb-jar.xml deployment descriptor and, if my feeling is right, a remark in the same time: i have the feeling that in the guide: "Sun Java System 134 Application Server 9.1 Application Deployment Guide • November 2008", these 2 descriptions of 2 xml elements are inversed, on page 134:

"principal
Defines a node that specifies a user name on the platform."


"principal-name
Contains the principal (user) name.
In an enterprise bean, specifies the principal (user) name that has the run-as role specified."

"principal" is a sub-element of "ejb" xml-element and "principal-name" is a sub-element of "security-role-mapping" xml-element.

After reading in the EJB 3.0 spec about "roles" and "run-as" functionalities, my feeling is that the "principal" xml-element in sun-ejb-jar.xml is for specifing the principal corresponding to the "run-as" xml-element of the ejb-jar.xml standard deployment descriptor.

Could someone experienced confirm or infirm? What is the "principal" element for, if I'm wrong? "principal-name" of "security-role-mapping" is clear for me.

Thank you all.
[Message sent by forum member 'vladbalan' ]

http://forums.java.net/jive/thread.jspa?messageID=373345