hi all,
This will be my last question for this week (hope so ;-))
I still have a problem to propagate a principal/credential to the server.
The idea is to use the default authentication ->
org.apache.openejb.core.security.jaas.PropertiesLoginModule with a
users.properties and group.properties
and simply retrieve the Principal thru the SessionContext :

public void myMethod() {
Principal p = sessionContext.getCallerPrincipal()
}
and client side
p.setProperty(Context.SECURITY_PRINCIPAL, "user");
p.setProperty(Context.SECURITY_CREDENTIALS,"pass");


The stack returns always p as a reference to GroupPrincipal and I'd want to
get the UserPrincipal (username) ? Is there any "standard" way to get the
username ?
Previously, I have used JBoss Embedded (with JndiLoginInitialContextFactory)
and the getCallerPrincipal retrieved the right principal. Did you already
faced differences like this between appservers ?
As I want to use OpenEJB in dev mode and GlassFish or JBoss in integration,
the standard way is important for me.
thanks all

Sami

Reply via email to