You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chris Richardson <cr...@fourc.eu> on 2014/08/14 12:46:28 UTC
qpid-route TLS connection to destination broker
Hi,
I have another SSL problem and potential fix, this time to the qpid-python
package. Any chance this could make it into the 0.30 release?
In summary, qpid-route is unable to connect to destination brokers with
TLS, which implies in practice that a federated topology cannot have
"require-encrypted" set.
Circumstances are:
* Configure a broker for both plain and TLS access
* Access plaintext service with eg: "qpid-route route list" - should show
an (empty) list of routes
* Access TLS service with eg: "qpid-route route list amqps://localhost" -
connection will fail with "Failed: ConnectionFailed - (None, 'connection
aborted')"
This happens because qpid/framer.py:93 reads the 8-byte AMQP protocol
header from the socket (waiting for sufficient data in a loop) with
s = self.sock.recv(n)
This is fine in plaintext when sufficient data is present, but with TLS
enabled the header is fragmented and it reads from the socket twice,
actually reading 9 bytes (1 byte into the next part of the connection
handshake). This byte is discarded and the handshake later fails.
Replacing the read with
s = self.sock.recv(n - len(self.rx_buf))
appears to fix the problem.
This error does not affect all python tools eg: qpid-stat, which use the
qpid::messaging::Connection instead of the qpid::connection::Connection
class.
Regards
--
*Chris Richardson*, System Architect
cr@fourc.eu
*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*
*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*
Re: qpid-route TLS connection to destination broker
Posted by Chris Richardson <cr...@fourc.eu>.
Aha, thanks for the update Gordon. Switching to 3.0!
On 19 August 2014 11:47, Gordon Sim <gs...@redhat.com> wrote:
> On 08/19/2014 11:44 AM, Gordon Sim wrote:
>
>> On 08/19/2014 10:12 AM, Chris Richardson wrote:
>>
>>> Hello again,
>>>
>>> I'm a bit concerned I'm approaching this in the wrong way - should I have
>>> logged this directly in Jira?
>>>
>>> Also I hope I didn't structure it in a way that caused offense, I was
>>> aiming for consise rather than rude! ;)
>>>
>>
>>
>> No, it was not offensive at all Chris! We were just slow in replying -
>> sorry!
>>
>> It is also quite fine to raise questions like this on the user list. To
>> get committed, changes need a JIRA, so creating one and attaching a
>> patch and then mentioning that in the email is always helpful. However
>> that was not why this fell through.
>>
>> I'll take a look at it now.
>>
>
> Actually, it appears this issue was raised earlier and a fix is already in
> place for 0.30:
>
> https://issues.apache.org/jira/browse/QPID-5808
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>
--
*Chris Richardson*, System Architect
cr@fourc.eu
*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*
*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*
Re: qpid-route TLS connection to destination broker
Posted by Gordon Sim <gs...@redhat.com>.
On 08/19/2014 11:44 AM, Gordon Sim wrote:
> On 08/19/2014 10:12 AM, Chris Richardson wrote:
>> Hello again,
>>
>> I'm a bit concerned I'm approaching this in the wrong way - should I have
>> logged this directly in Jira?
>>
>> Also I hope I didn't structure it in a way that caused offense, I was
>> aiming for consise rather than rude! ;)
>
>
> No, it was not offensive at all Chris! We were just slow in replying -
> sorry!
>
> It is also quite fine to raise questions like this on the user list. To
> get committed, changes need a JIRA, so creating one and attaching a
> patch and then mentioning that in the email is always helpful. However
> that was not why this fell through.
>
> I'll take a look at it now.
Actually, it appears this issue was raised earlier and a fix is already
in place for 0.30:
https://issues.apache.org/jira/browse/QPID-5808
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: qpid-route TLS connection to destination broker
Posted by Gordon Sim <gs...@redhat.com>.
On 08/19/2014 10:12 AM, Chris Richardson wrote:
> Hello again,
>
> I'm a bit concerned I'm approaching this in the wrong way - should I have
> logged this directly in Jira?
>
> Also I hope I didn't structure it in a way that caused offense, I was
> aiming for consise rather than rude! ;)
No, it was not offensive at all Chris! We were just slow in replying -
sorry!
It is also quite fine to raise questions like this on the user list. To
get committed, changes need a JIRA, so creating one and attaching a
patch and then mentioning that in the email is always helpful. However
that was not why this fell through.
I'll take a look at it now.
> On 14 August 2014 11:46, Chris Richardson <cr...@fourc.eu> wrote:
>
>> Hi,
>>
>> I have another SSL problem and potential fix, this time to the qpid-python
>> package. Any chance this could make it into the 0.30 release?
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: qpid-route TLS connection to destination broker
Posted by Chris Richardson <cr...@fourc.eu>.
Hello again,
I'm a bit concerned I'm approaching this in the wrong way - should I have
logged this directly in Jira?
Also I hope I didn't structure it in a way that caused offense, I was
aiming for consise rather than rude! ;)
Regards
/Chris
On 14 August 2014 11:46, Chris Richardson <cr...@fourc.eu> wrote:
> Hi,
>
> I have another SSL problem and potential fix, this time to the qpid-python
> package. Any chance this could make it into the 0.30 release?
>
>
>
--
*Chris Richardson*, System Architect
cr@fourc.eu
*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*
*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*