Can you provide us with the InitialContext creation? You should do before calling new InitialContext (...) And provide some properties.
Jean-Louis -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Wed, Aug 6, 2014 at 4:12 PM, Olivier Paquet <[email protected]> wrote: > Hi, > > Unfortunately even when following the way of other solutions found on this > forum, using JAAS or putting > p.put("openejb.ejbd.authenticate-with-request", > "true"); in remote lookup properties, I'm getting always the principal > "guest" in my EJB using EJBContext.getCallerPrincipal(). > > I use the TomEE 1.7.0-SNAPSHOT version and I defined the JAAS module a > mentionned here > (http://rmannibucau.wordpress.com/2012/05/09/tomee-and-its-ssh-connector/) > , > before I tried the JDBCRealm and so on, but result is still the same -> > guest > > I'm calling my remote EJB as follow: > > > It always works fine, I could see in the console(with JDBCRealm and > DatasourceRealm) that the correct EJB User has been authenticated, but in > my > EJB the user is always guest and my @RolesAllowed does not work. > > Any hints how to solve this issue? > > > Best regards, > > Olivier > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Principal-in-EJB-returns-always-guest-even-with-JAAS-module-tp4670862.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
