You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Avinash <av...@gmail.com> on 2006/11/06 15:57:07 UTC

Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Hi,

We have an AMQ Broker [4.1.0 incubator SNAPSHOT] running as a standalone
java application.
 
The AMQ Broker has Authentication and Authorization plugins installed by
virtue of which only users with the correct credentials may get
authenticated onto the Broker, and further Access roles and permissions with
respect to users and admin have been set up using the Authorization plugin.

The above broker supports both TCP and STOMP.


CASE 1:

When we connect using TCP and a JAVA written client, both the plugins work
correctly and as expected.


CASE 2:

When we connect using STOMP and the Java written client:

 - The program stalls at "connection.start(); Does not proceed further from
here...


CASE 3:

When we use C++ and STOMP following are our observations:


[1] When connecting using the STOMP client with incorrect credentials, the
AMQ Broker throws SecurityException [which is expected], however the STOMP
client receives a message 'CONNECTED'

[2] The STOMP client does not get notified that there was a
SecurityException while connecting [when connecting using wrong
credentials].



Questions are:

[1] Why does the program execution not proceed in case of CASE 2 ?

[2] How does the C++ STOMP client get notified of any Authentication or
Authorization exceptions that may be generated at the AMQ Broker end ?

Thanks in anticipation.

Aditya
-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7200017
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Avinash <av...@gmail.com>.
Hi Nate,
Thanks for your reply.
Its working with apache-activemq-4.2-incubator-SNAPSHOT.jar file. The C++
client is now able to receive the STOMP ERROR messages when trying to
connect to Java AMQ Broker with wrong credentials.

Thanks

Aditya & Avinash




Avinash wrote:
> 
> Hi Nate,
> Here is the link that points to the JIR issue that has been created for
> this problem.
>       "https://issues.apache.org/activemq/browse/AMQ-1035".
> 
> Thanks,
> 
> Avinash
> 
> nmittler wrote:
>> 
>> BTW, can you guys point me to the JIRA issue that has been created for
>> this?
>> 
>> Thanks,
>> Nate
>> 
>> On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
>>>
>>> Ok guys,
>>> I've got a build that I'd like you to try:
>>>
>>> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>>>
>>> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
>>>
>>>
>>> Let me know how it goes.
>>>
>>> Regards,
>>> Nate
>>>
>>> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>> >
>>> >
>>> >
>>> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
>>> > don't
>>> > know if anyone has claimed it however, nor an ETA.
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > nmittler wrote:
>>> > >
>>> > > As far as I can tell, the activemq-cpp client should handle this
>>> > properly
>>> > > (
>>> > > i.e. throw an exception on receipt of a stomp error frame).
>>> > >
>>> > > It sounds like this problem has been brought up before - has a JIRA
>>> > issue
>>> > > been created?  If not, please create one, and I'll take a crack at
>>> it.
>>> >
>>> > >
>>> > > Thanks,
>>> > > Nate
>>> > >
>>> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>> > >>
>>> > >>
>>> > >> Hi I'll chime in here as this work discussed is being done for me.
>>> > >>
>>> > >> First, you are correct that the CONNECTED msg is coming from the
>>> > >> broker...I
>>> > >> think that was just a typing error by my developer.
>>> > >>
>>> > >> As for the issue, the C++ call createConnection() creates a low
>>> level
>>> >
>>> > >> connection(assume), and passes credentials. Then the broker should
>>> > send a
>>> > >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
>>> > seems
>>> > >> this has already been discussed with regard to the RUBY client:
>>> > >>
>>> > >>
>>> > >>
>>> >
>>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>>> > >>
>>> > >> If the C++ app. upon receiving ERROR then wants to create an
>>> > exception, I
>>> > >> suppose it could.
>>> > >>
>>> > >> Any ETA for this fix?
>>> > >>
>>> > >> Thanks.
>>> > >>
>>> > >> Hiram Chirino wrote:
>>> > >> >
>>> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT
>>> is
>>> > >> > given and then the connection should just get terminated.
>>> > >> >
>>> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>>> > >> >>
>>> > >> >> >
>>> > >> >> > Thanks for your reply.
>>> > >> >> >
>>> > >> >> > We are not getting any errors when we are trying to
>>> send/receive
>>> > >> >> message.
>>> > >> >> >
>>> > >> >> > What we require here is that, when we are sending wrong
>>> > credentials
>>> > >> to
>>> > >> >> the
>>> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>>> > >> >> > Authentication
>>> > >> >> > failed error code.
>>> > >> >>
>>> > >> >> Right we get that, we just wanted to know how much functionality
>>> > the
>>> > >> >> stomp
>>> > >> >> client had when connected with bad credentials.  Sounds like
>>> none
>>> > is
>>> > >> what
>>> > >> >> you're seeing.
>>> > >> >>
>>> > >> >> >
>>> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at
>>> all,
>>> > as
>>> > >> the
>>> > >> >> > plug-in is installed in the Broker.
>>> > >> >> >
>>> > >> >> > This 'CONNECTED' message we are receiving in the
>>> > >> SocketInputStream.cpp
>>> > >> >> > class
>>> > >> >> > present under C++ ActiveMQ client.
>>> > >> >>
>>> > >> >> The connected message would have to be coming from the Broker as
>>> > the
>>> > >> CPP
>>> > >> >> client wouldn't spuriously create one for you.  We are looking
>>> > into
>>> > >> what
>>> > >> >> the
>>> > >> >> correct behavior should be given the limitations of the stomp
>>> > >> protocol.
>>> > >> >>
>>> > >> >> We'll keep you posted on the fix.
>>> > >> >>
>>> > >> >> Regards
>>> > >> >> Tim
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >
>>> > >> >
>>> > >> > --
>>> > >> > Regards,
>>> > >> > Hiram
>>> > >> >
>>> > >> > Blog: http://hiramchirino.com
>>> > >> >
>>> > >> >
>>> > >>
>>> > >> --
>>> > >> View this message in context:
>>> > >>
>>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>>> >
>>> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> > >>
>>> > >>
>>> > >
>>> > >
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
>>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> >
>>> >
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7357969
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Avinash <av...@gmail.com>.
Hi Nate,
Here is the link that points to the JIR issue that has been created for this
problem.
      "https://issues.apache.org/activemq/browse/AMQ-1035".

Thanks,

Avinash

nmittler wrote:
> 
> BTW, can you guys point me to the JIRA issue that has been created for
> this?
> 
> Thanks,
> Nate
> 
> On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
>>
>> Ok guys,
>> I've got a build that I'd like you to try:
>>
>> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>>
>> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
>>
>>
>> Let me know how it goes.
>>
>> Regards,
>> Nate
>>
>> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>> >
>> >
>> >
>> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
>> > don't
>> > know if anyone has claimed it however, nor an ETA.
>> >
>> > Thanks.
>> >
>> >
>> > nmittler wrote:
>> > >
>> > > As far as I can tell, the activemq-cpp client should handle this
>> > properly
>> > > (
>> > > i.e. throw an exception on receipt of a stomp error frame).
>> > >
>> > > It sounds like this problem has been brought up before - has a JIRA
>> > issue
>> > > been created?  If not, please create one, and I'll take a crack at
>> it.
>> >
>> > >
>> > > Thanks,
>> > > Nate
>> > >
>> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
>> > >>
>> > >>
>> > >> Hi I'll chime in here as this work discussed is being done for me.
>> > >>
>> > >> First, you are correct that the CONNECTED msg is coming from the
>> > >> broker...I
>> > >> think that was just a typing error by my developer.
>> > >>
>> > >> As for the issue, the C++ call createConnection() creates a low
>> level
>> >
>> > >> connection(assume), and passes credentials. Then the broker should
>> > send a
>> > >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
>> > seems
>> > >> this has already been discussed with regard to the RUBY client:
>> > >>
>> > >>
>> > >>
>> >
>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>> > >>
>> > >> If the C++ app. upon receiving ERROR then wants to create an
>> > exception, I
>> > >> suppose it could.
>> > >>
>> > >> Any ETA for this fix?
>> > >>
>> > >> Thanks.
>> > >>
>> > >> Hiram Chirino wrote:
>> > >> >
>> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
>> > >> > given and then the connection should just get terminated.
>> > >> >
>> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>> > >> >>
>> > >> >> >
>> > >> >> > Thanks for your reply.
>> > >> >> >
>> > >> >> > We are not getting any errors when we are trying to
>> send/receive
>> > >> >> message.
>> > >> >> >
>> > >> >> > What we require here is that, when we are sending wrong
>> > credentials
>> > >> to
>> > >> >> the
>> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>> > >> >> > Authentication
>> > >> >> > failed error code.
>> > >> >>
>> > >> >> Right we get that, we just wanted to know how much functionality
>> > the
>> > >> >> stomp
>> > >> >> client had when connected with bad credentials.  Sounds like none
>> > is
>> > >> what
>> > >> >> you're seeing.
>> > >> >>
>> > >> >> >
>> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all,
>> > as
>> > >> the
>> > >> >> > plug-in is installed in the Broker.
>> > >> >> >
>> > >> >> > This 'CONNECTED' message we are receiving in the
>> > >> SocketInputStream.cpp
>> > >> >> > class
>> > >> >> > present under C++ ActiveMQ client.
>> > >> >>
>> > >> >> The connected message would have to be coming from the Broker as
>> > the
>> > >> CPP
>> > >> >> client wouldn't spuriously create one for you.  We are looking
>> > into
>> > >> what
>> > >> >> the
>> > >> >> correct behavior should be given the limitations of the stomp
>> > >> protocol.
>> > >> >>
>> > >> >> We'll keep you posted on the fix.
>> > >> >>
>> > >> >> Regards
>> > >> >> Tim
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Regards,
>> > >> > Hiram
>> > >> >
>> > >> > Blog: http://hiramchirino.com
>> > >> >
>> > >> >
>> > >>
>> > >> --
>> > >> View this message in context:
>> > >>
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>> >
>> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> > >>
>> > >>
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7355573
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Nathan Mittler <na...@gmail.com>.
Sorry that I haven't gotten back to you - I've had a full plate the last
couple of weeks.  Unfortunately, I don't have the time right now to work on
this, so if you want to take a look that would be great!  So here's where I
posted the patch of the changes I made to the broker for the first
go-around: http://people.apache.org/~nmittler/patch.txt.  This would be a
good place to start.  If you're not familiar with how subversion patches
work, it's pretty simple ... just a diff file.  Check out this link and
search for "svn diff" http://svnbook.red-bean.com/nightly/en/svn-book.html

The connected response message is sent from from ProtocolConverter.java (
https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java
)

The ProtocolConverter is down in the stomp transport.  When it receives a
connect request, it repackages it into an ActiveMQ command and then forwards
it up to the ActiveMQ broker which bubbles the request to
TransportConnection.service().  This is where I had added code to handle the
security exception.

TransportConnector can be found here
https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java

Take a look and see if you can figure out a good solution.  If you're
willing, we always welcome patches! :)

Thanks,
Nate

On 12/2/06, aditya_c <ac...@juventustech.com> wrote:
>
>
> Hi Nate,
>
> Just following up on Brian's [bhartsb] post below.
>
> Would you be having some time to fix the build so that the "Broker sends
> an
> ERROR msg and disconnects, instead  of sending a CONNECTED message first
> and
> subsequently an ERROR in case a Client tries to connect using the wrong
> credentials"?
>
> We are stuck at this point with our development and would be grateful if
> you
> could help us out here.
>
> Alternatively if you are not able to find time now, could you guide me as
> to
> where would I need to make the changes in the source code, so that I could
> try and patch it.
>
> Hoping for a reply.
>
> Regards
>
> Aditya Choudhuri
>
>
>
>
>
>
> bhartsb wrote:
> >
> > Hi Nate,
> >
> > Thanks for making the changes.  However, it is still not quite working
> > 100% as it should.  Right now when a connection is created using invalid
> > credentials, the broker is sending back a CONNECTED msg first and then
> an
> > ERROR msg.  The correct behaviour should be to send an ERROR msg and
> > disconnect.  Not send CONNECTED first.
> >
> > THis was also discussed in another thread and the behaviour agreed on
> was
> > as I describe:
> >
> >
> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
> >
> > Hopefully you can send another JAR soon.
> >
> > Thanks again.
> >
> > nmittler wrote:
> >>
> >> BTW, can you guys point me to the JIRA issue that has been created for
> >> this?
> >>
> >> Thanks,
> >> Nate
> >>
> >> On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
> >>>
> >>> Ok guys,
> >>> I've got a build that I'd like you to try:
> >>>
> >>> http://people.apache.org/~nmittler/<
> http://people.apache.org/%7Enmittler/>
> apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
> >>>
> >>> <
> http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
> >.
> >>>
> >>>
> >>> Let me know how it goes.
> >>>
> >>> Regards,
> >>> Nate
> >>>
> >>> On 11/10/06, bhartsb <bh...@cox.net> wrote:
> >>> >
> >>> >
> >>> >
> >>> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
> >>> > don't
> >>> > know if anyone has claimed it however, nor an ETA.
> >>> >
> >>> > Thanks.
> >>> >
> >>> >
> >>> > nmittler wrote:
> >>> > >
> >>> > > As far as I can tell, the activemq-cpp client should handle this
> >>> > properly
> >>> > > (
> >>> > > i.e. throw an exception on receipt of a stomp error frame).
> >>> > >
> >>> > > It sounds like this problem has been brought up before - has a
> JIRA
> >>> > issue
> >>> > > been created?  If not, please create one, and I'll take a crack at
> >>> it.
> >>> >
> >>> > >
> >>> > > Thanks,
> >>> > > Nate
> >>> > >
> >>> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
> >>> > >>
> >>> > >>
> >>> > >> Hi I'll chime in here as this work discussed is being done for
> me.
> >>> > >>
> >>> > >> First, you are correct that the CONNECTED msg is coming from the
> >>> > >> broker...I
> >>> > >> think that was just a typing error by my developer.
> >>> > >>
> >>> > >> As for the issue, the C++ call createConnection() creates a low
> >>> level
> >>> >
> >>> > >> connection(assume), and passes credentials. Then the broker
> should
> >>> > send a
> >>> > >> STOMP ERROR msg back (if credentials are wrong) and
> disconnect.  It
> >>> > seems
> >>> > >> this has already been discussed with regard to the RUBY client:
> >>> > >>
> >>> > >>
> >>> > >>
> >>> >
> >>>
> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
> >>> > >>
> >>> > >> If the C++ app. upon receiving ERROR then wants to create an
> >>> > exception, I
> >>> > >> suppose it could.
> >>> > >>
> >>> > >> Any ETA for this fix?
> >>> > >>
> >>> > >> Thanks.
> >>> > >>
> >>> > >> Hiram Chirino wrote:
> >>> > >> >
> >>> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT
> >>> is
> >>> > >> > given and then the connection should just get terminated.
> >>> > >> >
> >>> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
> >>> > >> >>
> >>> > >> >> >
> >>> > >> >> > Thanks for your reply.
> >>> > >> >> >
> >>> > >> >> > We are not getting any errors when we are trying to
> >>> send/receive
> >>> > >> >> message.
> >>> > >> >> >
> >>> > >> >> > What we require here is that, when we are sending wrong
> >>> > credentials
> >>> > >> to
> >>> > >> >> the
> >>> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get
> the
> >>> > >> >> > Authentication
> >>> > >> >> > failed error code.
> >>> > >> >>
> >>> > >> >> Right we get that, we just wanted to know how much
> functionality
> >>> > the
> >>> > >> >> stomp
> >>> > >> >> client had when connected with bad credentials.  Sounds like
> >>> none
> >>> > is
> >>> > >> what
> >>> > >> >> you're seeing.
> >>> > >> >>
> >>> > >> >> >
> >>> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at
> >>> all,
> >>> > as
> >>> > >> the
> >>> > >> >> > plug-in is installed in the Broker.
> >>> > >> >> >
> >>> > >> >> > This 'CONNECTED' message we are receiving in the
> >>> > >> SocketInputStream.cpp
> >>> > >> >> > class
> >>> > >> >> > present under C++ ActiveMQ client.
> >>> > >> >>
> >>> > >> >> The connected message would have to be coming from the Broker
> as
> >>> > the
> >>> > >> CPP
> >>> > >> >> client wouldn't spuriously create one for you.  We are looking
> >>> > into
> >>> > >> what
> >>> > >> >> the
> >>> > >> >> correct behavior should be given the limitations of the stomp
> >>> > >> protocol.
> >>> > >> >>
> >>> > >> >> We'll keep you posted on the fix.
> >>> > >> >>
> >>> > >> >> Regards
> >>> > >> >> Tim
> >>> > >> >>
> >>> > >> >>
> >>> > >> >>
> >>> > >> >>
> >>> > >> >
> >>> > >> >
> >>> > >> > --
> >>> > >> > Regards,
> >>> > >> > Hiram
> >>> > >> >
> >>> > >> > Blog: http://hiramchirino.com
> >>> > >> >
> >>> > >> >
> >>> > >>
> >>> > >> --
> >>> > >> View this message in context:
> >>> > >>
> >>>
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
> >>> >
> >>> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>> > >>
> >>> > >>
> >>> > >
> >>> > >
> >>> >
> >>> > --
> >>> > View this message in context:
> >>> >
> >>>
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
> >>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>> >
> >>> >
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7652115
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by aditya_c <ac...@juventustech.com>.
Hi Nate,

Just following up on Brian's [bhartsb] post below.

Would you be having some time to fix the build so that the "Broker sends an
ERROR msg and disconnects, instead  of sending a CONNECTED message first and
subsequently an ERROR in case a Client tries to connect using the wrong
credentials"?

We are stuck at this point with our development and would be grateful if you
could help us out here.

Alternatively if you are not able to find time now, could you guide me as to
where would I need to make the changes in the source code, so that I could
try and patch it.

Hoping for a reply.

Regards

Aditya Choudhuri






bhartsb wrote:
> 
> Hi Nate,
> 
> Thanks for making the changes.  However, it is still not quite working
> 100% as it should.  Right now when a connection is created using invalid
> credentials, the broker is sending back a CONNECTED msg first and then an
> ERROR msg.  The correct behaviour should be to send an ERROR msg and
> disconnect.  Not send CONNECTED first.
> 
> THis was also discussed in another thread and the behaviour agreed on was
> as I describe:
> 
> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
> 
> Hopefully you can send another JAR soon.
> 
> Thanks again. 
> 
> nmittler wrote:
>> 
>> BTW, can you guys point me to the JIRA issue that has been created for
>> this?
>> 
>> Thanks,
>> Nate
>> 
>> On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
>>>
>>> Ok guys,
>>> I've got a build that I'd like you to try:
>>>
>>> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>>>
>>> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
>>>
>>>
>>> Let me know how it goes.
>>>
>>> Regards,
>>> Nate
>>>
>>> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>> >
>>> >
>>> >
>>> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
>>> > don't
>>> > know if anyone has claimed it however, nor an ETA.
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > nmittler wrote:
>>> > >
>>> > > As far as I can tell, the activemq-cpp client should handle this
>>> > properly
>>> > > (
>>> > > i.e. throw an exception on receipt of a stomp error frame).
>>> > >
>>> > > It sounds like this problem has been brought up before - has a JIRA
>>> > issue
>>> > > been created?  If not, please create one, and I'll take a crack at
>>> it.
>>> >
>>> > >
>>> > > Thanks,
>>> > > Nate
>>> > >
>>> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>> > >>
>>> > >>
>>> > >> Hi I'll chime in here as this work discussed is being done for me.
>>> > >>
>>> > >> First, you are correct that the CONNECTED msg is coming from the
>>> > >> broker...I
>>> > >> think that was just a typing error by my developer.
>>> > >>
>>> > >> As for the issue, the C++ call createConnection() creates a low
>>> level
>>> >
>>> > >> connection(assume), and passes credentials. Then the broker should
>>> > send a
>>> > >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
>>> > seems
>>> > >> this has already been discussed with regard to the RUBY client:
>>> > >>
>>> > >>
>>> > >>
>>> >
>>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>>> > >>
>>> > >> If the C++ app. upon receiving ERROR then wants to create an
>>> > exception, I
>>> > >> suppose it could.
>>> > >>
>>> > >> Any ETA for this fix?
>>> > >>
>>> > >> Thanks.
>>> > >>
>>> > >> Hiram Chirino wrote:
>>> > >> >
>>> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT
>>> is
>>> > >> > given and then the connection should just get terminated.
>>> > >> >
>>> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>>> > >> >>
>>> > >> >> >
>>> > >> >> > Thanks for your reply.
>>> > >> >> >
>>> > >> >> > We are not getting any errors when we are trying to
>>> send/receive
>>> > >> >> message.
>>> > >> >> >
>>> > >> >> > What we require here is that, when we are sending wrong
>>> > credentials
>>> > >> to
>>> > >> >> the
>>> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>>> > >> >> > Authentication
>>> > >> >> > failed error code.
>>> > >> >>
>>> > >> >> Right we get that, we just wanted to know how much functionality
>>> > the
>>> > >> >> stomp
>>> > >> >> client had when connected with bad credentials.  Sounds like
>>> none
>>> > is
>>> > >> what
>>> > >> >> you're seeing.
>>> > >> >>
>>> > >> >> >
>>> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at
>>> all,
>>> > as
>>> > >> the
>>> > >> >> > plug-in is installed in the Broker.
>>> > >> >> >
>>> > >> >> > This 'CONNECTED' message we are receiving in the
>>> > >> SocketInputStream.cpp
>>> > >> >> > class
>>> > >> >> > present under C++ ActiveMQ client.
>>> > >> >>
>>> > >> >> The connected message would have to be coming from the Broker as
>>> > the
>>> > >> CPP
>>> > >> >> client wouldn't spuriously create one for you.  We are looking
>>> > into
>>> > >> what
>>> > >> >> the
>>> > >> >> correct behavior should be given the limitations of the stomp
>>> > >> protocol.
>>> > >> >>
>>> > >> >> We'll keep you posted on the fix.
>>> > >> >>
>>> > >> >> Regards
>>> > >> >> Tim
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >>
>>> > >> >
>>> > >> >
>>> > >> > --
>>> > >> > Regards,
>>> > >> > Hiram
>>> > >> >
>>> > >> > Blog: http://hiramchirino.com
>>> > >> >
>>> > >> >
>>> > >>
>>> > >> --
>>> > >> View this message in context:
>>> > >>
>>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>>> >
>>> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> > >>
>>> > >>
>>> > >
>>> > >
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
>>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>> >
>>> >
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7652115
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by bhartsb <bh...@cox.net>.
Hi Nate,

Thanks for making the changes.  However, it is still not quite working 100%
as it should.  Right now when a connection is created using invalid
credentials, the broker is sending back a CONNECTED msg first and then an
ERROR msg.  The correct behaviour should be to send an ERROR msg and
disconnect.  Not send CONNECTED first.

THis was also discussed in another thread and the behaviour agreed on was as
I describe:

http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html

Hopefully you can send another JAR soon.

Thanks again. 

nmittler wrote:
> 
> BTW, can you guys point me to the JIRA issue that has been created for
> this?
> 
> Thanks,
> Nate
> 
> On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
>>
>> Ok guys,
>> I've got a build that I'd like you to try:
>>
>> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>>
>> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
>>
>>
>> Let me know how it goes.
>>
>> Regards,
>> Nate
>>
>> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>> >
>> >
>> >
>> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
>> > don't
>> > know if anyone has claimed it however, nor an ETA.
>> >
>> > Thanks.
>> >
>> >
>> > nmittler wrote:
>> > >
>> > > As far as I can tell, the activemq-cpp client should handle this
>> > properly
>> > > (
>> > > i.e. throw an exception on receipt of a stomp error frame).
>> > >
>> > > It sounds like this problem has been brought up before - has a JIRA
>> > issue
>> > > been created?  If not, please create one, and I'll take a crack at
>> it.
>> >
>> > >
>> > > Thanks,
>> > > Nate
>> > >
>> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
>> > >>
>> > >>
>> > >> Hi I'll chime in here as this work discussed is being done for me.
>> > >>
>> > >> First, you are correct that the CONNECTED msg is coming from the
>> > >> broker...I
>> > >> think that was just a typing error by my developer.
>> > >>
>> > >> As for the issue, the C++ call createConnection() creates a low
>> level
>> >
>> > >> connection(assume), and passes credentials. Then the broker should
>> > send a
>> > >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
>> > seems
>> > >> this has already been discussed with regard to the RUBY client:
>> > >>
>> > >>
>> > >>
>> >
>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>> > >>
>> > >> If the C++ app. upon receiving ERROR then wants to create an
>> > exception, I
>> > >> suppose it could.
>> > >>
>> > >> Any ETA for this fix?
>> > >>
>> > >> Thanks.
>> > >>
>> > >> Hiram Chirino wrote:
>> > >> >
>> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
>> > >> > given and then the connection should just get terminated.
>> > >> >
>> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>> > >> >>
>> > >> >> >
>> > >> >> > Thanks for your reply.
>> > >> >> >
>> > >> >> > We are not getting any errors when we are trying to
>> send/receive
>> > >> >> message.
>> > >> >> >
>> > >> >> > What we require here is that, when we are sending wrong
>> > credentials
>> > >> to
>> > >> >> the
>> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>> > >> >> > Authentication
>> > >> >> > failed error code.
>> > >> >>
>> > >> >> Right we get that, we just wanted to know how much functionality
>> > the
>> > >> >> stomp
>> > >> >> client had when connected with bad credentials.  Sounds like none
>> > is
>> > >> what
>> > >> >> you're seeing.
>> > >> >>
>> > >> >> >
>> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all,
>> > as
>> > >> the
>> > >> >> > plug-in is installed in the Broker.
>> > >> >> >
>> > >> >> > This 'CONNECTED' message we are receiving in the
>> > >> SocketInputStream.cpp
>> > >> >> > class
>> > >> >> > present under C++ ActiveMQ client.
>> > >> >>
>> > >> >> The connected message would have to be coming from the Broker as
>> > the
>> > >> CPP
>> > >> >> client wouldn't spuriously create one for you.  We are looking
>> > into
>> > >> what
>> > >> >> the
>> > >> >> correct behavior should be given the limitations of the stomp
>> > >> protocol.
>> > >> >>
>> > >> >> We'll keep you posted on the fix.
>> > >> >>
>> > >> >> Regards
>> > >> >> Tim
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Regards,
>> > >> > Hiram
>> > >> >
>> > >> > Blog: http://hiramchirino.com
>> > >> >
>> > >> >
>> > >>
>> > >> --
>> > >> View this message in context:
>> > >>
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>> >
>> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> > >>
>> > >>
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7373730
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Nathan Mittler <na...@gmail.com>.
BTW, can you guys point me to the JIRA issue that has been created for this?

Thanks,
Nate

On 11/11/06, Nathan Mittler <na...@gmail.com> wrote:
>
> Ok guys,
> I've got a build that I'd like you to try:
>
> http://people.apache.org/~nmittler/<http://people.apache.org/%7Enmittler/>apache-activemq-4.2-incubator-SNAPSHOT.tar.gz
>
> <http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
>
>
> Let me know how it goes.
>
> Regards,
> Nate
>
> On 11/10/06, bhartsb <bh...@cox.net> wrote:
> >
> >
> >
> > Yes either Avinash or Aditya has previously opened a JIRA issue.  I
> > don't
> > know if anyone has claimed it however, nor an ETA.
> >
> > Thanks.
> >
> >
> > nmittler wrote:
> > >
> > > As far as I can tell, the activemq-cpp client should handle this
> > properly
> > > (
> > > i.e. throw an exception on receipt of a stomp error frame).
> > >
> > > It sounds like this problem has been brought up before - has a JIRA
> > issue
> > > been created?  If not, please create one, and I'll take a crack at it.
> >
> > >
> > > Thanks,
> > > Nate
> > >
> > > On 11/10/06, bhartsb <bh...@cox.net> wrote:
> > >>
> > >>
> > >> Hi I'll chime in here as this work discussed is being done for me.
> > >>
> > >> First, you are correct that the CONNECTED msg is coming from the
> > >> broker...I
> > >> think that was just a typing error by my developer.
> > >>
> > >> As for the issue, the C++ call createConnection() creates a low level
> >
> > >> connection(assume), and passes credentials. Then the broker should
> > send a
> > >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
> > seems
> > >> this has already been discussed with regard to the RUBY client:
> > >>
> > >>
> > >>
> > http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
> > >>
> > >> If the C++ app. upon receiving ERROR then wants to create an
> > exception, I
> > >> suppose it could.
> > >>
> > >> Any ETA for this fix?
> > >>
> > >> Thanks.
> > >>
> > >> Hiram Chirino wrote:
> > >> >
> > >> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
> > >> > given and then the connection should just get terminated.
> > >> >
> > >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
> > >> >>
> > >> >> >
> > >> >> > Thanks for your reply.
> > >> >> >
> > >> >> > We are not getting any errors when we are trying to send/receive
> > >> >> message.
> > >> >> >
> > >> >> > What we require here is that, when we are sending wrong
> > credentials
> > >> to
> > >> >> the
> > >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
> > >> >> > Authentication
> > >> >> > failed error code.
> > >> >>
> > >> >> Right we get that, we just wanted to know how much functionality
> > the
> > >> >> stomp
> > >> >> client had when connected with bad credentials.  Sounds like none
> > is
> > >> what
> > >> >> you're seeing.
> > >> >>
> > >> >> >
> > >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all,
> > as
> > >> the
> > >> >> > plug-in is installed in the Broker.
> > >> >> >
> > >> >> > This 'CONNECTED' message we are receiving in the
> > >> SocketInputStream.cpp
> > >> >> > class
> > >> >> > present under C++ ActiveMQ client.
> > >> >>
> > >> >> The connected message would have to be coming from the Broker as
> > the
> > >> CPP
> > >> >> client wouldn't spuriously create one for you.  We are looking
> > into
> > >> what
> > >> >> the
> > >> >> correct behavior should be given the limitations of the stomp
> > >> protocol.
> > >> >>
> > >> >> We'll keep you posted on the fix.
> > >> >>
> > >> >> Regards
> > >> >> Tim
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> > --
> > >> > Regards,
> > >> > Hiram
> > >> >
> > >> > Blog: http://hiramchirino.com
> > >> >
> > >> >
> > >>
> > >> --
> > >> View this message in context:
> > >> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
> >
> > >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>

Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by bhartsb <bh...@cox.net>.
Hi Nate, 

Thanks for making the changes.  However, it is still not quite working 100%
as it should.  Right now when a connection is created using invalid
credentials, the broker is sending back a CONNECTED msg first and then an
ERROR msg.  The correct behaviour should be to send an ERROR msg and
disconnect.  Not send CONNECTED first.

THis was also discussed in another thread and the behaviour agreed on was as
I describe:

http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html

Hopefully you can send another JAR soon.

Thanks again.

nmittler wrote:
> 
> Ok guys,
> I've got a build that I'd like you to try:
> 
> http://people.apache.org/~nmittler/
> apache-activemq-4.2-incubator-SNAPSHOT.tar.gz<http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.
> 
> 
> Let me know how it goes.
> 
> Regards,
> Nate
> 
> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>
>>
>>
>> Yes either Avinash or Aditya has previously opened a JIRA issue.  I don't
>> know if anyone has claimed it however, nor an ETA.
>>
>> Thanks.
>>
>>
>> nmittler wrote:
>> >
>> > As far as I can tell, the activemq-cpp client should handle this
>> properly
>> > (
>> > i.e. throw an exception on receipt of a stomp error frame).
>> >
>> > It sounds like this problem has been brought up before - has a JIRA
>> issue
>> > been created?  If not, please create one, and I'll take a crack at it.
>> >
>> > Thanks,
>> > Nate
>> >
>> > On 11/10/06, bhartsb <bh...@cox.net> wrote:
>> >>
>> >>
>> >> Hi I'll chime in here as this work discussed is being done for me.
>> >>
>> >> First, you are correct that the CONNECTED msg is coming from the
>> >> broker...I
>> >> think that was just a typing error by my developer.
>> >>
>> >> As for the issue, the C++ call createConnection() creates a low level
>> >> connection(assume), and passes credentials. Then the broker should
>> send
>> a
>> >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
>> seems
>> >> this has already been discussed with regard to the RUBY client:
>> >>
>> >>
>> >>
>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>> >>
>> >> If the C++ app. upon receiving ERROR then wants to create an
>> exception,
>> I
>> >> suppose it could.
>> >>
>> >> Any ETA for this fix?
>> >>
>> >> Thanks.
>> >>
>> >> Hiram Chirino wrote:
>> >> >
>> >> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
>> >> > given and then the connection should just get terminated.
>> >> >
>> >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>> >> >>
>> >> >> >
>> >> >> > Thanks for your reply.
>> >> >> >
>> >> >> > We are not getting any errors when we are trying to send/receive
>> >> >> message.
>> >> >> >
>> >> >> > What we require here is that, when we are sending wrong
>> credentials
>> >> to
>> >> >> the
>> >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>> >> >> > Authentication
>> >> >> > failed error code.
>> >> >>
>> >> >> Right we get that, we just wanted to know how much functionality
>> the
>> >> >> stomp
>> >> >> client had when connected with bad credentials.  Sounds like none
>> is
>> >> what
>> >> >> you're seeing.
>> >> >>
>> >> >> >
>> >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all,
>> as
>> >> the
>> >> >> > plug-in is installed in the Broker.
>> >> >> >
>> >> >> > This 'CONNECTED' message we are receiving in the
>> >> SocketInputStream.cpp
>> >> >> > class
>> >> >> > present under C++ ActiveMQ client.
>> >> >>
>> >> >> The connected message would have to be coming from the Broker as
>> the
>> >> CPP
>> >> >> client wouldn't spuriously create one for you.  We are looking into
>> >> what
>> >> >> the
>> >> >> correct behavior should be given the limitations of the stomp
>> >> protocol.
>> >> >>
>> >> >> We'll keep you posted on the fix.
>> >> >>
>> >> >> Regards
>> >> >> Tim
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > Regards,
>> >> > Hiram
>> >> >
>> >> > Blog: http://hiramchirino.com
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7373685
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Nathan Mittler <na...@gmail.com>.
Ok guys,
I've got a build that I'd like you to try:

http://people.apache.org/~nmittler/
apache-activemq-4.2-incubator-SNAPSHOT.tar.gz<http://people.apache.org/%7Enmittler/apache-activemq-4.2-incubator-SNAPSHOT.tar.gz>.


Let me know how it goes.

Regards,
Nate

On 11/10/06, bhartsb <bh...@cox.net> wrote:
>
>
>
> Yes either Avinash or Aditya has previously opened a JIRA issue.  I don't
> know if anyone has claimed it however, nor an ETA.
>
> Thanks.
>
>
> nmittler wrote:
> >
> > As far as I can tell, the activemq-cpp client should handle this
> properly
> > (
> > i.e. throw an exception on receipt of a stomp error frame).
> >
> > It sounds like this problem has been brought up before - has a JIRA
> issue
> > been created?  If not, please create one, and I'll take a crack at it.
> >
> > Thanks,
> > Nate
> >
> > On 11/10/06, bhartsb <bh...@cox.net> wrote:
> >>
> >>
> >> Hi I'll chime in here as this work discussed is being done for me.
> >>
> >> First, you are correct that the CONNECTED msg is coming from the
> >> broker...I
> >> think that was just a typing error by my developer.
> >>
> >> As for the issue, the C++ call createConnection() creates a low level
> >> connection(assume), and passes credentials. Then the broker should send
> a
> >> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It
> seems
> >> this has already been discussed with regard to the RUBY client:
> >>
> >>
> >>
> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
> >>
> >> If the C++ app. upon receiving ERROR then wants to create an exception,
> I
> >> suppose it could.
> >>
> >> Any ETA for this fix?
> >>
> >> Thanks.
> >>
> >> Hiram Chirino wrote:
> >> >
> >> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
> >> > given and then the connection should just get terminated.
> >> >
> >> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
> >> >>
> >> >> >
> >> >> > Thanks for your reply.
> >> >> >
> >> >> > We are not getting any errors when we are trying to send/receive
> >> >> message.
> >> >> >
> >> >> > What we require here is that, when we are sending wrong
> credentials
> >> to
> >> >> the
> >> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
> >> >> > Authentication
> >> >> > failed error code.
> >> >>
> >> >> Right we get that, we just wanted to know how much functionality the
> >> >> stomp
> >> >> client had when connected with bad credentials.  Sounds like none is
> >> what
> >> >> you're seeing.
> >> >>
> >> >> >
> >> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all, as
> >> the
> >> >> > plug-in is installed in the Broker.
> >> >> >
> >> >> > This 'CONNECTED' message we are receiving in the
> >> SocketInputStream.cpp
> >> >> > class
> >> >> > present under C++ ActiveMQ client.
> >> >>
> >> >> The connected message would have to be coming from the Broker as the
> >> CPP
> >> >> client wouldn't spuriously create one for you.  We are looking into
> >> what
> >> >> the
> >> >> correct behavior should be given the limitations of the stomp
> >> protocol.
> >> >>
> >> >> We'll keep you posted on the fix.
> >> >>
> >> >> Regards
> >> >> Tim
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > Hiram
> >> >
> >> > Blog: http://hiramchirino.com
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by bhartsb <bh...@cox.net>.

Yes either Avinash or Aditya has previously opened a JIRA issue.  I don't
know if anyone has claimed it however, nor an ETA.

Thanks.


nmittler wrote:
> 
> As far as I can tell, the activemq-cpp client should handle this properly
> (
> i.e. throw an exception on receipt of a stomp error frame).
> 
> It sounds like this problem has been brought up before - has a JIRA issue
> been created?  If not, please create one, and I'll take a crack at it.
> 
> Thanks,
> Nate
> 
> On 11/10/06, bhartsb <bh...@cox.net> wrote:
>>
>>
>> Hi I'll chime in here as this work discussed is being done for me.
>>
>> First, you are correct that the CONNECTED msg is coming from the
>> broker...I
>> think that was just a typing error by my developer.
>>
>> As for the issue, the C++ call createConnection() creates a low level
>> connection(assume), and passes credentials. Then the broker should send a
>> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It seems
>> this has already been discussed with regard to the RUBY client:
>>
>>
>> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>>
>> If the C++ app. upon receiving ERROR then wants to create an exception, I
>> suppose it could.
>>
>> Any ETA for this fix?
>>
>> Thanks.
>>
>> Hiram Chirino wrote:
>> >
>> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
>> > given and then the connection should just get terminated.
>> >
>> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>> >>
>> >> >
>> >> > Thanks for your reply.
>> >> >
>> >> > We are not getting any errors when we are trying to send/receive
>> >> message.
>> >> >
>> >> > What we require here is that, when we are sending wrong credentials
>> to
>> >> the
>> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>> >> > Authentication
>> >> > failed error code.
>> >>
>> >> Right we get that, we just wanted to know how much functionality the
>> >> stomp
>> >> client had when connected with bad credentials.  Sounds like none is
>> what
>> >> you're seeing.
>> >>
>> >> >
>> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all, as
>> the
>> >> > plug-in is installed in the Broker.
>> >> >
>> >> > This 'CONNECTED' message we are receiving in the
>> SocketInputStream.cpp
>> >> > class
>> >> > present under C++ ActiveMQ client.
>> >>
>> >> The connected message would have to be coming from the Broker as the
>> CPP
>> >> client wouldn't spuriously create one for you.  We are looking into
>> what
>> >> the
>> >> correct behavior should be given the limitations of the stomp
>> protocol.
>> >>
>> >> We'll keep you posted on the fix.
>> >>
>> >> Regards
>> >> Tim
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards,
>> > Hiram
>> >
>> > Blog: http://hiramchirino.com
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7284666
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Nathan Mittler <na...@gmail.com>.
As far as I can tell, the activemq-cpp client should handle this properly (
i.e. throw an exception on receipt of a stomp error frame).

It sounds like this problem has been brought up before - has a JIRA issue
been created?  If not, please create one, and I'll take a crack at it.

Thanks,
Nate

On 11/10/06, bhartsb <bh...@cox.net> wrote:
>
>
> Hi I'll chime in here as this work discussed is being done for me.
>
> First, you are correct that the CONNECTED msg is coming from the
> broker...I
> think that was just a typing error by my developer.
>
> As for the issue, the C++ call createConnection() creates a low level
> connection(assume), and passes credentials. Then the broker should send a
> STOMP ERROR msg back (if credentials are wrong) and disconnect.  It seems
> this has already been discussed with regard to the RUBY client:
>
>
> http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html
>
> If the C++ app. upon receiving ERROR then wants to create an exception, I
> suppose it could.
>
> Any ETA for this fix?
>
> Thanks.
>
> Hiram Chirino wrote:
> >
> > I'm thinking an ERROR should be sent back if an invalid CONNECT is
> > given and then the connection should just get terminated.
> >
> > On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
> >>
> >> >
> >> > Thanks for your reply.
> >> >
> >> > We are not getting any errors when we are trying to send/receive
> >> message.
> >> >
> >> > What we require here is that, when we are sending wrong credentials
> to
> >> the
> >> > AMQ Broker, the C++ ActiveMQ client should be able to get the
> >> > Authentication
> >> > failed error code.
> >>
> >> Right we get that, we just wanted to know how much functionality the
> >> stomp
> >> client had when connected with bad credentials.  Sounds like none is
> what
> >> you're seeing.
> >>
> >> >
> >> > The 'CONNECTED' message is not being sent by AMQ Broker at all, as
> the
> >> > plug-in is installed in the Broker.
> >> >
> >> > This 'CONNECTED' message we are receiving in the
> SocketInputStream.cpp
> >> > class
> >> > present under C++ ActiveMQ client.
> >>
> >> The connected message would have to be coming from the Broker as the
> CPP
> >> client wouldn't spuriously create one for you.  We are looking into
> what
> >> the
> >> correct behavior should be given the limitations of the stomp protocol.
> >>
> >> We'll keep you posted on the fix.
> >>
> >> Regards
> >> Tim
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Regards,
> > Hiram
> >
> > Blog: http://hiramchirino.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by bhartsb <bh...@cox.net>.
Hi I'll chime in here as this work discussed is being done for me.

First, you are correct that the CONNECTED msg is coming from the broker...I
think that was just a typing error by my developer.

As for the issue, the C++ call createConnection() creates a low level
connection(assume), and passes credentials. Then the broker should send a
STOMP ERROR msg back (if credentials are wrong) and disconnect.  It seems
this has already been discussed with regard to the RUBY client:

http://www.nabble.com/Proper-behavior-for-client-authorization-failure-tf2497200.html

If the C++ app. upon receiving ERROR then wants to create an exception, I
suppose it could.  

Any ETA for this fix?  

Thanks.

Hiram Chirino wrote:
> 
> I'm thinking an ERROR should be sent back if an invalid CONNECT is
> given and then the connection should just get terminated.
> 
> On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>>
>> >
>> > Thanks for your reply.
>> >
>> > We are not getting any errors when we are trying to send/receive
>> message.
>> >
>> > What we require here is that, when we are sending wrong credentials to
>> the
>> > AMQ Broker, the C++ ActiveMQ client should be able to get the
>> > Authentication
>> > failed error code.
>>
>> Right we get that, we just wanted to know how much functionality the
>> stomp
>> client had when connected with bad credentials.  Sounds like none is what
>> you're seeing.
>>
>> >
>> > The 'CONNECTED' message is not being sent by AMQ Broker at all, as the
>> > plug-in is installed in the Broker.
>> >
>> > This 'CONNECTED' message we are receiving in the SocketInputStream.cpp
>> > class
>> > present under C++ ActiveMQ client.
>>
>> The connected message would have to be coming from the Broker as the CPP
>> client wouldn't spuriously create one for you.  We are looking into what
>> the
>> correct behavior should be given the limitations of the stomp protocol.
>>
>> We'll keep you posted on the fix.
>>
>> Regards
>> Tim
>>
>>
>>
>>
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7274843
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Hiram Chirino <hi...@hiramchirino.com>.
I'm thinking an ERROR should be sent back if an invalid CONNECT is
given and then the connection should just get terminated.

On 11/8/06, Timothy Bish <ta...@twcny.rr.com> wrote:
>
> >
> > Thanks for your reply.
> >
> > We are not getting any errors when we are trying to send/receive message.
> >
> > What we require here is that, when we are sending wrong credentials to the
> > AMQ Broker, the C++ ActiveMQ client should be able to get the
> > Authentication
> > failed error code.
>
> Right we get that, we just wanted to know how much functionality the stomp
> client had when connected with bad credentials.  Sounds like none is what
> you're seeing.
>
> >
> > The 'CONNECTED' message is not being sent by AMQ Broker at all, as the
> > plug-in is installed in the Broker.
> >
> > This 'CONNECTED' message we are receiving in the SocketInputStream.cpp
> > class
> > present under C++ ActiveMQ client.
>
> The connected message would have to be coming from the Broker as the CPP
> client wouldn't spuriously create one for you.  We are looking into what the
> correct behavior should be given the limitations of the stomp protocol.
>
> We'll keep you posted on the fix.
>
> Regards
> Tim
>
>
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

RE: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Timothy Bish <ta...@twcny.rr.com>.
> 
> Thanks for your reply.
> 
> We are not getting any errors when we are trying to send/receive message.
> 
> What we require here is that, when we are sending wrong credentials to the
> AMQ Broker, the C++ ActiveMQ client should be able to get the
> Authentication
> failed error code.

Right we get that, we just wanted to know how much functionality the stomp
client had when connected with bad credentials.  Sounds like none is what
you're seeing.

> 
> The 'CONNECTED' message is not being sent by AMQ Broker at all, as the
> plug-in is installed in the Broker.
> 
> This 'CONNECTED' message we are receiving in the SocketInputStream.cpp
> class
> present under C++ ActiveMQ client.

The connected message would have to be coming from the Broker as the CPP
client wouldn't spuriously create one for you.  We are looking into what the
correct behavior should be given the limitations of the stomp protocol.  

We'll keep you posted on the fix.

Regards
Tim




RE: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Avinash <av...@gmail.com>.

Hi Timothy,

Thanks for your reply.

We are not getting any errors when we are trying to send/receive message. 

What we require here is that, when we are sending wrong credentials to the
AMQ Broker, the C++ ActiveMQ client should be able to get the Authentication
failed error code.

The 'CONNECTED' message is not being sent by AMQ Broker at all, as the
plug-in is installed in the Broker.

This 'CONNECTED' message we are receiving in the SocketInputStream.cpp class
present under C++ ActiveMQ client.

The message we are getting, though the credentials(username and password)
that are passed to AMQ Broker Authentication plug-in, for Authentication.

Thanks in advance.

Aditya


Timothy Bish wrote:
> 
> 
>> 
>> We are getting 'CONNECTED' message, after making a connection with AMQ
>> Broker, though the credentials are correct or wrong, and not able to
>> send/receive messages.
> 
> Do you get any errors when you try and send something after getting
> connected?  I think Nate is trying to characterize the behavior a bit to
> help with debugging the broker.  
> 
>> 
>> To send/receive messages, the credentials are required to go through the
>> Authenticatoin and Auithorizatin plug-in.
>> 
>> 
>> Mittler, Nathan wrote:
>> >
>> > After you get the 'CONNECTED' back, can you successfully send/receive
>> > messages?
>> >
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7239647
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


RE: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Timothy Bish <ta...@twcny.rr.com>.
> 
> We are getting 'CONNECTED' message, after making a connection with AMQ
> Broker, though the credentials are correct or wrong, and not able to
> send/receive messages.

Do you get any errors when you try and send something after getting
connected?  I think Nate is trying to characterize the behavior a bit to
help with debugging the broker.  

> 
> To send/receive messages, the credentials are required to go through the
> Authenticatoin and Auithorizatin plug-in.
> 
> 
> Mittler, Nathan wrote:
> >
> > After you get the 'CONNECTED' back, can you successfully send/receive
> > messages?
> >



RE: Problem with STOMP C++ Client connecting with a AMQ Broker having Authorization and Authentication Plugins installed

Posted by Avinash <av...@gmail.com>.
We are getting 'CONNECTED' message, after making a connection with AMQ
Broker, though the credentials are correct or wrong, and not able to
send/receive messages.

To send/receive messages, the credentials are required to go through the
Authenticatoin and Auithorizatin plug-in.


Mittler, Nathan wrote:
> 
> After you get the 'CONNECTED' back, can you successfully send/receive
> messages?
> 
> -----Original Message-----
> From: Bish, Tim [mailto:Tim.Bish@Sensis.com] 
> Sent: Monday, November 06, 2006 10:10 AM
> To: activemq-users@geronimo.apache.org
> Subject: RE: Problem with STOMP C++ Client connecting with a AMQ Broker
> having Authorization and Authentication Plugins installed
> 
> 
>> [1] When connecting using the STOMP client with incorrect credentials,
> the
>> AMQ Broker throws SecurityException [which is expected], however the
> STOMP
>> client receives a message 'CONNECTED'
>> 
>> [2] The STOMP client does not get notified that there was a 
>> SecurityException while connecting [when connecting using wrong 
>> credentials].
>> 
>> 
>> 
>> Questions are:
>> 
>> [1] Why does the program execution not proceed in case of CASE 2 ?
>> 
>> [2] How does the C++ STOMP client get notified of any Authentication
> or
>> Authorization exceptions that may be generated at the AMQ Broker end ?
>> 
> 
> Sounds like the broker is not handling this case correctly, the STOMP
> client can't handle this unless told by the broker, which apparently
> isn't implemented or working correctly.  
> 
> Please create a Jira Issue against the broker documenting this issue.
> 
> http://issues.apache.org/activemq/browse/AMQ
> 
> Regards
> Tim
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-STOMP-C%2B%2B-Client-connecting-with-a-AMQ-Broker-having-Authorization-and-Authentication-Plugins-installed-tf2582789.html#a7235403
Sent from the ActiveMQ - User mailing list archive at Nabble.com.