Bug 1130474

Summary: Java client does not support digest-md5 sasl authentication mechanism
Product: Red Hat Enterprise MRG Reporter: Michal Toth <mtoth>
Component: qpid-javaAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: jross
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1130575 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1130575    

Description Michal Toth 2014-08-15 10:27:06 UTC
Description of problem:
Any connection using using digest-md5 sasl mechanism between broker and java clients results in ConnectionException.


Version-Release number of selected component (if applicable):
qpid-java-common-0.22-6
qpid-java-client-0.22-6
qpid-java-example-0.22-6

How reproducible:
100%

Steps to Reproduce:
Send a message to broker using digest-md5 authentication mechanism.

Actual results:
Exception is thrown and connection refused.

Expected results:
Client should successfully send a message to broker using DIGEST-MD5 sasl mechanism.

Additional info:
./run_example.sh org.apache.qpid.example.Spout --broker=user/user.122.144:5672 --broker-option=sasl_mechs=DIGEST-MD5  --count 1 test_q

{broker-option=sasl_mechs=DIGEST-MD5, count=1, broker=user/user.122.144:5672}
Exception in thread "main" org.apache.qpid.AMQConnectionFailureException: Client and broker have no SASL mechanisms in common. Broker allows : DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5 Client has : [EXTERNAL, GSSAPI, CRAM-MD5-HASHED, CRAM-MD5, AMQPLAIN, PLAIN, ANONYMOUS] Client restricted itself to : DIGEST-MD5 [error code 200: reply success]
	at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:475)
	at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:222)
	at org.apache.qpid.example.OptionParser.createConnection(OptionParser.java:283)
	at org.apache.qpid.example.Spout.<init>(Spout.java:87)
	at org.apache.qpid.example.Spout.main(Spout.java:147)
Caused by: org.apache.qpid.AMQException: Cannot connect to broker: Client and broker have no SASL mechanisms in common. Broker allows : DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5 Client has : [EXTERNAL, GSSAPI, CRAM-MD5-HASHED, CRAM-MD5, AMQPLAIN, PLAIN, ANONYMOUS] Client restricted itself to : DIGEST-MD5 [error code 200: reply success]
	at org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:241)
	at org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:619)
	at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:398)
	... 4 more
Caused by: org.apache.qpid.transport.ConnectionException: Client and broker have no SASL mechanisms in common. Broker allows : DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5 Client has : [EXTERNAL, GSSAPI, CRAM-MD5-HASHED, CRAM-MD5, AMQPLAIN, PLAIN, ANONYMOUS] Client restricted itself to : DIGEST-MD5
	at org.apache.qpid.transport.ConnectionException.rethrow(ConnectionException.java:67)
	at org.apache.qpid.transport.Connection.connect(Connection.java:269)
	at org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:221)
	... 6 more
Caused by: org.apache.qpid.transport.ConnectionException: Client and broker have no SASL mechanisms in common. Broker allows : DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5 Client has : [EXTERNAL, GSSAPI, CRAM-MD5-HASHED, CRAM-MD5, AMQPLAIN, PLAIN, ANONYMOUS] Client restricted itself to : DIGEST-MD5
	at org.apache.qpid.client.transport.ClientConnectionDelegate.createSaslClient(ClientConnectionDelegate.java:95)
	at org.apache.qpid.transport.ClientDelegate.connectionStart(ClientDelegate.java:92)
	at org.apache.qpid.transport.ClientDelegate.connectionStart(ClientDelegate.java:43)
	at org.apache.qpid.transport.ConnectionStart.dispatch(ConnectionStart.java:95)
	at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelegate.java:49)
	at org.apache.qpid.transport.ConnectionDelegate.control(ConnectionDelegate.java:40)
	at org.apache.qpid.transport.Method.delegate(Method.java:163)
	at org.apache.qpid.transport.Connection.received(Connection.java:392)
	at org.apache.qpid.transport.Connection.received(Connection.java:62)
	at org.apache.qpid.transport.network.Assembler.emit(Assembler.java:97)
	at org.apache.qpid.transport.network.Assembler.assemble(Assembler.java:183)
	at org.apache.qpid.transport.network.Assembler.frame(Assembler.java:131)
	at org.apache.qpid.transport.network.Frame.delegate(Frame.java:128)
	at org.apache.qpid.transport.network.Assembler.received(Assembler.java:102)
	at org.apache.qpid.transport.network.Assembler.received(Assembler.java:44)
	at org.apache.qpid.transport.network.InputHandler.next(InputHandler.java:189)
	at org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:105)
	at org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:44)
	at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:161)
	at java.lang.Thread.run(Thread.java:745)