openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sami Jaber" <sami.ja...@gmail.com>
Subject Security and GroupPrincipal
Date Thu, 07 Aug 2008 12:28:54 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message