openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sami Jaber" <sami.ja...@gmail.com>
Subject getCallerPrincipal returns always "guest"
Date Tue, 05 Aug 2008 22:21:16 GMT
hello all,

I try to do something very simple, propagate the principal and credentials
contexts from the client to the server.
Here is my client code

p.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");
p.setProperty(Context.SECURITY_AUTHENTICATION, "simple");
p.setProperty(Context.SECURITY_PRINCIPAL, "Joe");
p.setProperty(Context.SECURITY_CREDENTIALS,"secret");
new InitialContext(p);

I don't necessary need JAAS with a loginModule because the client is
supposed to be already authenticated (thru his windows username).

When I call on the EJB Impl side anywhere :
 sessionContext.getCallerPrincipal().getName() ;

getName() returns always "guest".... I have inserted "joe" and "secret" in
the default PropertiesLoginModule file.

Help appreciated ...

Sami

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