You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Vladimir Tsurkan <vl...@yahoo-inc.com> on 2010/03/19 23:17:17 UTC

ActiveMQ JAAS Plugin question

Anyone knows if I can get the IP address of the client inside of the login() of the LoginModule of the JAAS plugin for 5.x AMQ

Here is what I have in mind:

    public boolean login() throws LoginException
    {
        Callback[] callbacks = new Callback[3];
        callbacks[0] = new NameCallback(" ");
        callbacks[1] = new PasswordCallback(" ", false);
        callbacks[2] = new ConnectionInfoCallback();

        callbackHandler.handle(callbacks);

        InetAddress     ia =  ((ConnectionInfoCallback)callbacks[2]).getInetAddress();

 That's what Tibco EMS does.

Do we have something like it in ActiveMQ?

Thanks

Re: ActiveMQ JAAS Plugin question

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

this is currently not implemented, but it's doable. Now we have only two
CallbackHandler implementations. One that checks username and password and
other that checks certificates.

For this to work you'd need to implement right Callback handler and
appropriate broker plugin.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Fri, Mar 19, 2010 at 11:17 PM, Vladimir Tsurkan <vl...@yahoo-inc.com>wrote:

> Anyone knows if I can get the IP address of the client inside of the
> login() of the LoginModule of the JAAS plugin for 5.x AMQ
>
> Here is what I have in mind:
>
>    public boolean login() throws LoginException
>    {
>        Callback[] callbacks = new Callback[3];
>        callbacks[0] = new NameCallback(" ");
>        callbacks[1] = new PasswordCallback(" ", false);
>        callbacks[2] = new ConnectionInfoCallback();
>
>        callbackHandler.handle(callbacks);
>
>        InetAddress     ia =
>  ((ConnectionInfoCallback)callbacks[2]).getInetAddress();
>
>  That's what Tibco EMS does.
>
> Do we have something like it in ActiveMQ?
>
> Thanks
>