Hello all,

   I am using the scheduler plug-in to schedule tasks from an ejb
application , say app1 which uses security-domain sec1 (as declared in the
jboss.xml file). This task itself creates a session bean and invokes a
method on that session bean. The session bean created is task specific and
may be in the same ejb application or in a different ejb application, app2
which uses security-domain sec2. These session bean methods have all been
declared as <unchecked/>. Now, if the task scheduled invokes a method on the
same app (app1), no problem, everything works. OTOH, if the task invokes a
method on app2, the following exception is thrown. "admin" is the currently
logged-in user in app1 while scheduling the task.
 
17:20:04,812 ERROR [SecurityInterceptor] Authentication exception,
principal=admin
17:20:04,812 ERROR [LogInterceptor] EJBException, causedBy:
java.lang.SecurityException: Authentication exception, principal=admin
        at
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityI
nterceptor.java:173)
        at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:94)
        at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(
CachedConnectionInterceptor.java:
215)
        at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(Stateful
SessionInstanceInterceptor.java:1
28)
        at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:111)
        at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:178)
        at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
        at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)

   It seems to me that the security credentials are passed thru to the
scheduled task and used, not for authorization, but for checking if the
principal is a valid principal for the domain. How can I solve this problem?

Cheers,
Krishna


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to