This content has been marked as final.
Show 4 replies
-
1. Re: Troubles when mben invokes method of a secured local ejb
anton_popov Jul 15, 2005 12:07 AM (in response to anton_popov)I found the answer.
It is here:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=22216 -
2. Re: Troubles when mben invokes method of a secured local ejb
jaikiran Jul 15, 2005 2:01 PM (in response to anton_popov)Hi,
I have a same scenario where i would like to invoke a secure session bean from MBean. Is it NECESSARY to do a Jass login?
Thank you. -
3. Re: Troubles when mben invokes method of a secured local ejb
anton_popov Jul 15, 2005 5:24 PM (in response to anton_popov)"jaikiran" wrote:
Hi,
I have a same scenario where i would like to invoke a secure session bean from MBean. Is it NECESSARY to do a Jass login?
Thank you.
I had to login, otherwise I received a lot of errors.
According to me, this is correct. Otherwise, imagine you can invoke a method of some secured ejb from MBean without login, this would be some kind of "back door".
What I did was to follow the instructions in the link:
In the MBean, I wrote:
----------------------
CallbackHandler handler = new AppCallbackHandler( scannerData.getUser(), scannerData.getPasssword().toCharArray());
LoginContext loginContext = new LoginContext( "client-login", handler );
loginContext.login();
(AppCallbackHandler just implements CallbackHandler)
------------------------
You have to be sure you have the following code in your login-config.xml:
<!-- Used by clients within the application server VM such as
mbeans and servlets that access EJBs.
-->
<application-policy name = "client-login">
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required">
</login-module>
</application-policy>
Regards -
4. Re: Troubles when mben invokes method of a secured local ejb
jaikiran Jul 16, 2005 2:51 AM (in response to anton_popov)Thank you. I did a Jaas login before invoking the bean and was able to successfully invoke it. Thanks a lot for the prompt reply