Hi

We are using JBoss 2.4.4. with JAAS and the DatabaseUserLoginModule.

In some part of the ejb code, we are using getContext().isCallerInRole(xxxxx)
and everything works fine... Except in this case and we wonder if
1/ it is normal behaviour
2/ it is a bug 
3/ if there is a workaround or patch...

Here is the scenario:

One Stateless Session bean, say bean1, has the security set to <unchecked/> as it is 
called by the
MBEAN Timer.
The JAAS module defines "nobody" as the unauthenticated user.
The Session bean defines <run-as>Manager</Manager> in the ejb-jar.xml as the bean will 
call other
beans, say bean2.  bean2 has security only allowing users with role "Manager" to 
access it.

The symptom:  the context in bean2 does not seem to have ANY role when it called from 
the bean1. 
bean1 can access bean2 but bean2 ALWAYS fails on getContext().isCallerInRole(xxxxx)

It works fine from a client with a JAAS login, we can test the roles if required.

getContext().getCallerPrincipal().getName() will give you "nobody" as expected.

We were under the impression that the <run-as> role should be passed to the context in 
bean2!  Is
it a know bug?  Has anyone faced something similar?

Many thanks in advance,

Benoit.

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to