You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pangupta <pa...@gmail.com> on 2008/02/07 13:39:33 UTC

Setting Authentication in Active MQ

Hello All
     I am implementing JMS using NON-JNDI connectivity . Now i want to test
it with ActiveMQ server. I have one query here. In the following piece of
code
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(user, password, url);
where do we set the user and password for the connection Factory on the
active mq server. By default it works fine and takes some DEFAULT USERID and
PASSWORD. But if i need to create new user and grant him rights , how can  i
achieve this. 
    There is one more thing. When i create a queueConnection 
     connectionfactory.createQueueConnection(usr,pwd);
How is this usr different from the first one. ? Using JNDI i know the first
credentials and principals are used to authenticate JNDI and the other
params are for further authentication of the connection and queues.
Does anyone worked on it earlier? 
Thanks
pankaj
-- 
View this message in context: http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15332966.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Setting Authentication in Active MQ

Posted by ttmdev <jo...@ttmsolutions.com>.
connectionfactory.createQueueConnection(usr,pwd) is simply overriding the
userid and password that was assigned to the connectionfactory when it was
instantiated via its ActiveMQConnectionFactory(user, password, url)
constructor. AFAIK, you cannot dynamically add users; the default broker
security plugin works of a static list of users. However, one could develop
a new plugin that supports runtime updates. 

Joe
www.ttmsolutions.com  



pangupta wrote:
> 
> Hi Dejan Thanks a lot for quick response. I have already gone through this
> article. But could not get much.Earlier i have worked on jms with weblogic
> . There we can directly create a user using the ui. I was looking for
> something similar in ActiveMQ.Further this article does not tells us the
> difference between the two users. One which is used for
> ActiveMQConnectionFactory and the other one for createQueueConnection.
> Regards
> pankaj
> take a look at this article
> 
> http://activemq.apache.org/security.html
> 
> -- 
> Dejan Bosanac
> www.scriptinginjava.net
> 
> 
> On Feb 7, 2008 1:39 PM, pangupta <pa...@gmail.com> wrote:
>>
>> Hello All
>>      I am implementing JMS using NON-JNDI connectivity . Now i want to
>> test
>> it with ActiveMQ server. I have one query here. In the following piece of
>> code
>> ActiveMQConnectionFactory connectionFactory = new
>> ActiveMQConnectionFactory(user, password, url);
>> where do we set the user and password for the connection Factory on the
>> active mq server. By default it works fine and takes some DEFAULT USERID
>> and
>> PASSWORD. But if i need to create new user and grant him rights , how can 
>> i
>> achieve this.
>>     There is one more thing. When i create a queueConnection
>>      connectionfactory.createQueueConnection(usr,pwd);
>> How is this usr different from the first one. ? Using JNDI i know the
>> first
>> credentials and principals are used to authenticate JNDI and the other
>> params are for further authentication of the connection and queues.
>> Does anyone worked on it earlier?
>> Thanks
>> pankaj
>> --
>> View this message in context:
>> http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15332966.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> www.scriptinginjava.net
> 



-- 
View this message in context: http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15335371.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Setting Authentication in Active MQ

Posted by pangupta <pa...@gmail.com>.
Hi Dejan Thanks a lot for quick response. I have already gone through this
article. But could not get much.Earlier i have worked on jms with weblogic .
There we can directly create a user using the ui. I was looking for
something similar in ActiveMQ.Further this article does not tells us the
difference between the two users. One which is used for
ActiveMQConnectionFactory and the other one for createQueueConnection.
Regards
pankaj
take a look at this article

http://activemq.apache.org/security.html

-- 
Dejan Bosanac
www.scriptinginjava.net


On Feb 7, 2008 1:39 PM, pangupta <pa...@gmail.com> wrote:
>
> Hello All
>      I am implementing JMS using NON-JNDI connectivity . Now i want to
> test
> it with ActiveMQ server. I have one query here. In the following piece of
> code
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(user, password, url);
> where do we set the user and password for the connection Factory on the
> active mq server. By default it works fine and takes some DEFAULT USERID
> and
> PASSWORD. But if i need to create new user and grant him rights , how can 
> i
> achieve this.
>     There is one more thing. When i create a queueConnection
>      connectionfactory.createQueueConnection(usr,pwd);
> How is this usr different from the first one. ? Using JNDI i know the
> first
> credentials and principals are used to authenticate JNDI and the other
> params are for further authentication of the connection and queues.
> Does anyone worked on it earlier?
> Thanks
> pankaj
> --
> View this message in context:
> http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15332966.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-----
Dejan Bosanac
www.scriptinginjava.net


-- 
View this message in context: http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15334877.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Setting Authentication in Active MQ

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

take a look at this article

http://activemq.apache.org/security.html

-- 
Dejan Bosanac
www.scriptinginjava.net


On Feb 7, 2008 1:39 PM, pangupta <pa...@gmail.com> wrote:
>
> Hello All
>      I am implementing JMS using NON-JNDI connectivity . Now i want to test
> it with ActiveMQ server. I have one query here. In the following piece of
> code
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(user, password, url);
> where do we set the user and password for the connection Factory on the
> active mq server. By default it works fine and takes some DEFAULT USERID and
> PASSWORD. But if i need to create new user and grant him rights , how can  i
> achieve this.
>     There is one more thing. When i create a queueConnection
>      connectionfactory.createQueueConnection(usr,pwd);
> How is this usr different from the first one. ? Using JNDI i know the first
> credentials and principals are used to authenticate JNDI and the other
> params are for further authentication of the connection and queues.
> Does anyone worked on it earlier?
> Thanks
> pankaj
> --
> View this message in context: http://www.nabble.com/Setting-Authentication-in-Active-MQ-tp15332966s2354p15332966.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>