Bug 1036134 - Qpid C++ client using protocol AMQP 1.0 cannot create a connection with broker authenticating over DIGEST-MD5 mechanism
Summary: Qpid C++ client using protocol AMQP 1.0 cannot create a connection with broke...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petra Svobodová
URL:
Whiteboard:
: 1037791 (view as bug list)
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-11-29 14:15 UTC by Petra Svobodová
Modified: 2015-01-21 12:55 UTC (History)
5 users (show)

Fixed In Version: qpid-cpp-0.22-30
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 12:55:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5379 0 None None None Never

Description Petra Svobodová 2013-11-29 14:15:40 UTC
Description of problem:
When the C++ client using AMQP 1.0 protocol tries to authenticate over DIGEST-MD5 mechanism to a broker, the client fails with error message:

./spout --broker guest/guest.brq.redhat.com:5672 --connection-options "{protocol: 'amqp1.0', sasl-mechanisms:DIGEST-MD5}" amq.direct
2013-11-29 08:50:41 [Security] error Expected SASL frame; got type \x12
2013-11-29 08:50:41 [System] error Caught exception in state: 3 with event: 1: Out of Bounds (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/amqp/Decoder.cpp:303)
Segmentation fault (core dumped)

The broker authenticated the client well, see the terminal transcript (part of broker's log "qpidd.log"), please:

info Set TCP_NODELAY on connection to 10.34.33.252:41655
2013-11-29 08:50:42 [Broker] info Using AMQP 1.0 (with SASL layer)
2013-11-29 08:50:42 [Security] info SASL: Mechanism list: DIGEST-MD5 ANONYMOUS PLAIN CRAM-MD5
2013-11-29 08:50:42 [Security] info SASL: Starting authentication with mechanism: DIGEST-MD5
2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Challenge issued
2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Challenge issued
2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Security layer installed
2013-11-29 08:50:42 [Security] info qpid.10.34.33.251:5672-10.34.33.252:41655 Authenticated as guest@QPID

Note: The C++ client using AMQP 0-10 protocol works well.

The issue occurs also at Perl client using AMQP 1.0 protocol and DIGEST-MD5 mechanism.


Version-Release number of selected component (if applicable):
qpid-java-common-0.23-4.el6.noarch
qpid-cpp-client-devel-0.22-29.el6.i686
rh-qpid-cpp-tests-0.22-29.el6.i686
qpid-java-amqp-0-10-client-jms-0.23-4.el6.noarch
qpid-qmf-0.22-24.el6.i686
qpid-cpp-server-rdma-0.22-29.el6.i686
qpid-java-example-0.23-4.el6.noarch
qpid-snmpd-1.0.0-14.el6.i686
qpid-cpp-client-0.22-29.el6.i686
python-qpid-qmf-0.22-24.el6.i686
qpid-cpp-server-devel-0.22-29.el6.i686
ruby-qpid-qmf-0.22-24.el6.i686
qpid-cpp-server-xml-0.22-29.el6.i686
qpid-java-client-0.23-4.el6.noarch
qpid-jca-0.22-1.el6.noarch
qpid-proton-c-devel-0.5-9.el6.i686
qpid-cpp-client-devel-docs-0.22-29.el6.noarch
qpid-cpp-client-rdma-0.22-29.el6.i686
qpid-cpp-debuginfo-0.22-16.el6.i686
qpid-tools-0.22-7.el6.noarch
qpid-cpp-server-store-0.22-29.el6.i686
perl-qpid-0.22-7.el6.i686
qpid-jca-xarecovery-0.22-1.el6.noarch
qpid-proton-c-0.5-9.el6.i686
qpid-cpp-server-0.22-29.el6.i686
qpid-cpp-server-ssl-0.22-29.el6.i686
python-qpid-0.22-8.el6.noarch
qpid-cpp-client-ssl-0.22-29.el6.i686
qpid-cpp-server-ha-0.22-29.el6.i686


How reproducible:
100%

Steps to Reproduce:
1. Run a qpid broker.
2. Create a user in the qpidd.sasldb database (in this case "guest" with password "guest").
3. Try to send a message using AMQP 1.0 protocol and authentication mechanism DIGEST-MD5. 
./spout --broker guest/guest.brq.redhat.com:5672 --connection-options "{protocol: 'amqp1.0', sasl-mechanisms:DIGEST-MD5}" amq.direct

Actual results:
Client fails without delivering a message.

Expected results:
Client should connect the broker and deliver the message.

Additional info:
Broker configuration:

# cat /etc/qpid/qpidd.conf
log-to-file=/var/lib/qpidd/qpidd.log
auth=yes
log-enable=info+
port=5672

Comment 1 Gordon Sim 2013-11-29 19:18:51 UTC
Fixed upstream: https://svn.apache.org/r1546628

Comment 2 Gordon Sim 2013-12-02 10:45:40 UTC
Also need: https://svn.apache.org/r1546952 to prevent link failure on windows

Comment 3 Gordon Sim 2013-12-03 21:24:38 UTC
*** Bug 1037791 has been marked as a duplicate of this bug. ***

Comment 4 Petra Svobodová 2014-01-09 07:42:25 UTC
C++ and Perl clients using AMQP 1.0 or AMQP 0-10  protocol are able to authenticate over DIGEST-MD5 mechanism to a broker and the authentication works as expected for the both protocols.

Verified on packages qpid-cpp-0.22-31 and perl-qpid-0.22-7 on Rhel6.5 i386 and x86_64.

--> VERIFIED


Note You need to log in before you can comment on or make changes to this bug.