JOnAS 5.2 / EJB3 Security - sessionContext.isCallerInRole always returns false?

"Hans J. Prueller" <[email protected]> Tue, 08 Feb 2011 08:14:54 +0100
Newsgroups gmane.comp.java.objectweb.jonas
Organization LBS logics GmbH
Message-ID <1297149294.2123.10.camel@kodos>
Hi all,

sorry I have to bother you again - another issue I have upgrading our
Java EE 1.4 EAR to JOnAS 5.2 and Java EE 5 is EJB security:

The webapp of the ear is protected, login+roles are required. Webapp
authentication works and tomcat presents the login screen,
so web.xml security seems to be configured correctly (did not change
that from JOnAS 4 to 5).

But it seems there is a problem in EJB security:

--> calling ejbContext.isCallerInRole("admin")  in my SLSB's ALWAYS
returns FALSE !

I'm not sure where the problem is - in EJB2.1 we declared all
security-role refs in the DD (ejb-jar.xml) like:

<security-role-ref>
    <role-name>admin</role-name>
    <role-link>admin</role-link>
</security-role-ref>

this is missing now as there is no ejb-jar.xml existent any more. are
the missing role-refs the problem why the SLSB does not "see" them
in sessionContext.isCallerInRole ?   

Unfortunately I did not find this topic neither in the JOnAS5 docs nor
in the examples --  any tips are appreciated! 

... the "rest" seems to work fine - webapps, ejb lookups, method
invocations, persistence -- everything already works rather smooth,
can successfully deploy and login to the application - this is hopefully
one of our last issues ;-)

regards,
Hans
face-wink.png (image/png, 1 KB) - not displayed