You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ma...@sungard.com on 2009/07/28 23:56:40 UTC

ActiveMQ.Advisory.Connection messages includes username and password

I've been working on setting up an ActiveMQ 5.2 broker and coding
clients for it for the last few weeks, and now I need to be notified
when somebody logs in. I was hoping I could use the topic
ActiveMQ.Advisory.Connection for that, so I set up a consumer on it and
tried logging in using another client and just printing the messages to
the console to see what I get.

I was extremely surprised to see that connection messages to the topic
ActiveMQ.Advisory.Connection includes the entire ConnectionInfo object
for the connection, which includes the username and password!

I have been following the Security page
(http://activemq.apache.org/security.html), which specifically states
that "full access rights should always be given to the ActiveMQ.Advisory
destinations" which obviously includes read access. Nowhere on the
Security page does it warn you that ActiveMQ will helpfully distribute
the clients usernames and passwords around to all the other clients for
you. This seems to happen for both the SimpleAuthenticationPlugin as
well as the JaasAuthenticationPlugin.

I haven't dug around in the code yet, I was hoping that somebody would
quickly come back to me on the forum and let me know that I have missed
some option somewhere on the docs that turns this off. Thoughts?

Regards,

Mats


Re: ActiveMQ.Advisory.Connection messages includes username and password

Posted by Gary Tully <ga...@gmail.com>.
Am thinking that the fix for
http://issues.apache.org/activemq/browse/AMQ-2335 should just whack the
password. leaking or providing the user in the advisory is probally ok.
When logging connection info commands we just remove or replace with "****"
the password.
https://issues.apache.org/jira/browse/AMQ-2499


On 29 November 2012 17:21, prgtrdr <pr...@gmail.com> wrote:

> Rob,
>
> I'm stuck on something that is probably obvious but I just can't figure out
> how to do it.
>
> What I want to do is retrieve the userName from an incoming Stomp
> connection.  I am creating the broker in my code and have also set up
> monitoring Advisory messages.  The onMessage function receives the
> ConnectionInfo message but the userName and password are deleted from the
> message.  My guess is to get at the userName I have to somehow lookup the
> Connection object based on the ConnectionId contained in the Advisory
> ConnectionInfo message, then I can get the userName from the Connection.
>
> Is that right?  Or is there an easier way?  If it's right, how do I lookup
> the Connection object?
>
> Thanks,
> Bill
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Advisory-Connection-messages-includes-username-and-password-tp2365496p4659946.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://redhat.com
http://blog.garytully.com

Re: ActiveMQ.Advisory.Connection messages includes username and password

Posted by prgtrdr <pr...@gmail.com>.
Rob,

I'm stuck on something that is probably obvious but I just can't figure out
how to do it.  

What I want to do is retrieve the userName from an incoming Stomp
connection.  I am creating the broker in my code and have also set up
monitoring Advisory messages.  The onMessage function receives the
ConnectionInfo message but the userName and password are deleted from the
message.  My guess is to get at the userName I have to somehow lookup the
Connection object based on the ConnectionId contained in the Advisory
ConnectionInfo message, then I can get the userName from the Connection.

Is that right?  Or is there an easier way?  If it's right, how do I lookup
the Connection object?

Thanks,
Bill



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Advisory-Connection-messages-includes-username-and-password-tp2365496p4659946.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ.Advisory.Connection messages includes username and password

Posted by Rob Davies <ra...@gmail.com>.
On 29 Jul 2009, at 16:50, <Ma...@sungard.com> <Mats.Henrikson@sungard.com 
 > wrote:

> Hi Rob,
>
>> Crickey!!!
>> This is tracked by http://issues.apache.org/activemq/browse/ 
>> AMQ-2335 -
>> I don't think there's a work around without extending an existing
>> AuthenticationBroker (same package as AuthenticationPlugins) to copy
>> the ConnectionInfo - remove the username/password from the copy and
>> pass the copy through the BrokerFilter chain (super.addConnection());
>
> Thanks for that very quick fix!
>
> Luckily I am already developing my own plugin, so I can apply the same
> fix there so that we don't have to wait for 5.3 to be released.
>
> I'm going to assume that removing at least the password that early  
> isn't
> going to affect brokers further down the stack.
>
> Mats
>


Shouldn't do!

cheers,

Rob

Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/





RE: ActiveMQ.Advisory.Connection messages includes username and password

Posted by Ma...@sungard.com.
Hi Rob,

> Crickey!!!
> This is tracked by http://issues.apache.org/activemq/browse/AMQ-2335 -
> I don't think there's a work around without extending an existing
> AuthenticationBroker (same package as AuthenticationPlugins) to copy
> the ConnectionInfo - remove the username/password from the copy and
> pass the copy through the BrokerFilter chain (super.addConnection());

Thanks for that very quick fix!

Luckily I am already developing my own plugin, so I can apply the same
fix there so that we don't have to wait for 5.3 to be released.

I'm going to assume that removing at least the password that early isn't
going to affect brokers further down the stack.

Mats


Re: ActiveMQ.Advisory.Connection messages includes username and password

Posted by Rob Davies <ra...@gmail.com>.
On 28 Jul 2009, at 22:56, <Ma...@sungard.com> <Mats.Henrikson@sungard.com 
 > wrote:

> I've been working on setting up an ActiveMQ 5.2 broker and coding
> clients for it for the last few weeks, and now I need to be notified
> when somebody logs in. I was hoping I could use the topic
> ActiveMQ.Advisory.Connection for that, so I set up a consumer on it  
> and
> tried logging in using another client and just printing the messages  
> to
> the console to see what I get.
>
> I was extremely surprised to see that connection messages to the topic
> ActiveMQ.Advisory.Connection includes the entire ConnectionInfo object
> for the connection, which includes the username and password!
>
> I have been following the Security page
> (http://activemq.apache.org/security.html), which specifically states
> that "full access rights should always be given to the  
> ActiveMQ.Advisory
> destinations" which obviously includes read access. Nowhere on the
> Security page does it warn you that ActiveMQ will helpfully distribute
> the clients usernames and passwords around to all the other clients  
> for
> you. This seems to happen for both the SimpleAuthenticationPlugin as
> well as the JaasAuthenticationPlugin.
>
> I haven't dug around in the code yet, I was hoping that somebody would
> quickly come back to me on the forum and let me know that I have  
> missed
> some option somewhere on the docs that turns this off. Thoughts?
>
> Regards,
>
> Mats
>


Crickey!!!
This is tracked by http://issues.apache.org/activemq/browse/AMQ-2335 -  
I don't think there's a work around without extending an existing  
AuthenticationBroker (same package as AuthenticationPlugins) to copy  
the ConnectionInfo - remove the username/password from the copy and  
pass the copy through the BrokerFilter chain (super.addConnection());

cheers,

Rob

Rob Davies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/