You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Henri Gomez <he...@gmail.com> on 2009/01/20 15:15:50 UTC
Adding authentication plugin by program
Hi to all,
I read the security plugin information in
http://activemq.apache.org/security.html.
I wonder if we could add an authentication/authorisation plugin
programaticaly, ie on BrokerService.
Regards.
Re: Adding authentication plugin by program
Posted by Henri Gomez <he...@gmail.com>.
Great.
I only add to use our current AuthenticationPlugin.
Many thanks Dejan,
2009/1/20 Dejan Bosanac <de...@nighttale.net>:
> Sure,
>
> you can do something like this
>
> SimpleAuthenticationPlugin authentication = new
> SimpleAuthenticationPlugin();
>
> List <AuthenticationUser> users = new ArrayList <AuthenticationUser> =
> users.add(new AuthenticationUser("admin",
> "password",
> "admins,publishers,consumers"));
> users.add(new AuthenticationUser("publisher",
> "password",
> "publishers,consumers"));
> users.add(new AuthenticationUser("consumer",
> "password",
> "consumers"));
> users.add(new AuthenticationUser("guest",
> "password",
> "guests"));
> authentication.setUsers(users);
>
> broker.setPlugins(new BrokerPlugin[]{authentication});
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Tue, Jan 20, 2009 at 3:15 PM, Henri Gomez <he...@gmail.com> wrote:
>
>> Hi to all,
>>
>> I read the security plugin information in
>> http://activemq.apache.org/security.html.
>>
>> I wonder if we could add an authentication/authorisation plugin
>> programaticaly, ie on BrokerService.
>>
>> Regards.
>>
>
Re: Adding authentication plugin by program
Posted by Dejan Bosanac <de...@nighttale.net>.
Sure,
you can do something like this
SimpleAuthenticationPlugin authentication = new
SimpleAuthenticationPlugin();
List <AuthenticationUser> users = new ArrayList <AuthenticationUser> =
users.add(new AuthenticationUser("admin",
"password",
"admins,publishers,consumers"));
users.add(new AuthenticationUser("publisher",
"password",
"publishers,consumers"));
users.add(new AuthenticationUser("consumer",
"password",
"consumers"));
users.add(new AuthenticationUser("guest",
"password",
"guests"));
authentication.setUsers(users);
broker.setPlugins(new BrokerPlugin[]{authentication});
Cheers
--
Dejan Bosanac
Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
On Tue, Jan 20, 2009 at 3:15 PM, Henri Gomez <he...@gmail.com> wrote:
> Hi to all,
>
> I read the security plugin information in
> http://activemq.apache.org/security.html.
>
> I wonder if we could add an authentication/authorisation plugin
> programaticaly, ie on BrokerService.
>
> Regards.
>