You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by tnowicki <no...@setcorp.com> on 2011/07/14 19:35:37 UTC

java client, c++ broker, no authentication

I saw some traffic on the subject back in 2009 but could not gleen an answer.
I am running 0.10 c++ broker with --auth no, using the java build for 0.10.
The first problem that I have is that the URL is not accepted without a
username and password. I added guest:guest assuming that it won't care on
the broker side if running no authentication but got the following exception
from the client when attempting a connection:

org.apache.qpid.AMQConnectionFailureException: The following SASL mechanisms
[PLAIN] specified by the client are not supported by the broker [error code
200: reply success]

using URL:
amqp://guest:guest@clientid/test?brokerlist='tcp://127.0.0.1:5672'

I saw some discussion on this before but did not see a solution. Are there
any suggestions on how to connect successfully java client to c++ broker?
For various reasons, I need to run the broker with no authentication.

BTW, this is on WindowsXP.

Thanks,
-Tony



--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authentication-tp6584247p6584247.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by Gordon Sim <gs...@redhat.com>.
On 07/14/2011 11:10 PM, Steve Huston wrote:
> I believe this is an issue with the Windows' C++ broker code that was
> resolved recently by Gordon Sim. If you are up for checking the current
> source code out from subversion, that should do it. Else I believe this will
> be fixed in the 0.12 release coming up within a few weeks or so.

Actually I didn't, I added ANONYMOUS support to the client as that 
seemed to me the real issue. However making the change on the broker is 
trivial and is probably worth doing for the sake of consistency across 
platforms if nothing else. I've committed that as r1147045.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by Rajith Attapattu <ra...@gmail.com>.
I was able to set the sals mech using -Dqpid.sasl_mechs=<mech-list> or
sasl_mechs=<mech-list> in the connection URL
Ex. "amqp://username:password@clientid/test?brokerlist='tcp://localhost:5672?sasl_mechs='ANONYMOUS''"

How did you set it ? using the JVM arg or the connection URL property?

Rajith

On Tue, Jul 19, 2011 at 2:16 PM, tnowicki <no...@setcorp.com> wrote:
> It appears that the java client always wanted to connect PLAIN regardless of
> the sasl_mechs settings to either PLAIN, ANONYMOUS or nothing at all. The
> c++ update that I added from the repository appears to have added PLAIN on
> the c++ broker side and that worked. I am using 0.10 java as well as
> c++....I may not have all the terminology correct here but hope it makes
> sense....
>
> --
> View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authentication-tp6584247p6599766.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by tnowicki <no...@setcorp.com>.
It appears that the java client always wanted to connect PLAIN regardless of
the sasl_mechs settings to either PLAIN, ANONYMOUS or nothing at all. The
c++ update that I added from the repository appears to have added PLAIN on
the c++ broker side and that worked. I am using 0.10 java as well as
c++....I may not have all the terminology correct here but hope it makes
sense....

--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authentication-tp6584247p6599766.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by Gordon Sim <gs...@redhat.com>.
On 07/18/2011 10:16 PM, tnowicki wrote:
> Using and setting sasl_mechs to ANONYMOUS did not seem to have any effect,
> the c++ windows broker still reported PLAIN when I ran it with -t no matter
> what.

Still did report PLAIN or did not? I thought the issue was that PLAIN 
was not advertised and therefore the JMS client could not connect.

What happened when you set the mechanism to ANONYMOUS? Did you get an 
error? What version of the JMS client are you using?

> With the addition of "PLAIN" in the cpp code (update to
> SaslAuthenticator.cpp mentioned above) all worked fine even with no
> sasl_mechs options. I am still using guest:guest@clientid in the connection
> since it insists on a user name.
> Thanks for helping me get it running.

Great, as long as it's running that's the main thing I guess!

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by tnowicki <no...@setcorp.com>.
Using and setting sasl_mechs to ANONYMOUS did not seem to have any effect,
the c++ windows broker still reported PLAIN when I ran it with -t no matter
what. With the addition of "PLAIN" in the cpp code (update to
SaslAuthenticator.cpp mentioned above) all worked fine even with no
sasl_mechs options. I am still using guest:guest@clientid in the connection
since it insists on a user name.
Thanks for helping me get it running.
-t


--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authentication-tp6584247p6596444.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by Gordon Sim <gs...@redhat.com>.
On 07/15/2011 03:28 AM, Rajith Attapattu wrote:
> I believe the windows broker was defaulting to anonymous when
> authentication was disabled and the JMS client didn't support it.
> Since then we have added support for anonymous and this should work
> fine with the upcomming 0.12 release.

The anonymous plugin was in 0.10 as well. Note that you need to 
explicitly set the sasl_mechs to ANONYMOUS in the connection url for the 
JMS client.

(See 
http://qpid.apache.org/books/0.10/Programming-In-Apache-Qpid/html/ch03s02.html#section-jms-connection-url 
for details)

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: java client, c++ broker, no authentication

Posted by Rajith Attapattu <ra...@gmail.com>.
I believe the windows broker was defaulting to anonymous when
authentication was disabled and the JMS client didn't support it.
Since then we have added support for anonymous and this should work
fine with the upcomming 0.12 release.

Rajith

On Thu, Jul 14, 2011 at 6:10 PM, Steve Huston <sh...@riverace.com> wrote:
> I believe this is an issue with the Windows' C++ broker code that was
> resolved recently by Gordon Sim. If you are up for checking the current
> source code out from subversion, that should do it. Else I believe this will
> be fixed in the 0.12 release coming up within a few weeks or so.
>
> -Steve
>
> -----Original Message-----
> From: tnowicki [mailto:nowickia@setcorp.com]
> Sent: Thursday, July 14, 2011 1:36 PM
> To: users@qpid.apache.org
> Subject: java client, c++ broker, no authentication
>
> I saw some traffic on the subject back in 2009 but could not gleen an
> answer.
> I am running 0.10 c++ broker with --auth no, using the java build for 0.10.
> The first problem that I have is that the URL is not accepted without a
> username and password. I added guest:guest assuming that it won't care on
> the broker side if running no authentication but got the following exception
> from the client when attempting a connection:
>
> org.apache.qpid.AMQConnectionFailureException: The following SASL mechanisms
> [PLAIN] specified by the client are not supported by the broker [error code
> 200: reply success]
>
> using URL:
> amqp://guest:guest@clientid/test?brokerlist='tcp://127.0.0.1:5672'
>
> I saw some discussion on this before but did not see a solution. Are there
> any suggestions on how to connect successfully java client to c++ broker?
> For various reasons, I need to run the broker with no authentication.
>
> BTW, this is on WindowsXP.
>
> Thanks,
> -Tony
>
>
>
> --
> View this message in context:
> http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authe
> ntication-tp6584247p6584247.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


RE: java client, c++ broker, no authentication

Posted by Steve Huston <sh...@riverace.com>.
I believe this is an issue with the Windows' C++ broker code that was
resolved recently by Gordon Sim. If you are up for checking the current
source code out from subversion, that should do it. Else I believe this will
be fixed in the 0.12 release coming up within a few weeks or so.

-Steve

-----Original Message-----
From: tnowicki [mailto:nowickia@setcorp.com] 
Sent: Thursday, July 14, 2011 1:36 PM
To: users@qpid.apache.org
Subject: java client, c++ broker, no authentication

I saw some traffic on the subject back in 2009 but could not gleen an
answer.
I am running 0.10 c++ broker with --auth no, using the java build for 0.10.
The first problem that I have is that the URL is not accepted without a
username and password. I added guest:guest assuming that it won't care on
the broker side if running no authentication but got the following exception
from the client when attempting a connection:

org.apache.qpid.AMQConnectionFailureException: The following SASL mechanisms
[PLAIN] specified by the client are not supported by the broker [error code
200: reply success]

using URL:
amqp://guest:guest@clientid/test?brokerlist='tcp://127.0.0.1:5672'

I saw some discussion on this before but did not see a solution. Are there
any suggestions on how to connect successfully java client to c++ broker?
For various reasons, I need to run the broker with no authentication.

BTW, this is on WindowsXP.

Thanks,
-Tony



--
View this message in context:
http://apache-qpid-users.2158936.n2.nabble.com/java-client-c-broker-no-authe
ntication-tp6584247p6584247.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org