You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by tkdchen <qc...@gmail.com> on 2011/12/14 14:20:50 UTC

Problem on connecting qpid server by GSSAPI

Hi team,

I'm writing a Python scrpt to connect to qpid server from my laptop.
the qpid server uses kerberos to authenticate users. I have a kerberos
ticket and already run kinit to get a TGT ticket.
Following is my code. It uses GSSAPI mechanism, and throws
"AuthenticationFailure: sasl negotiation failed: no mechanism agreed"
at the conn.open().

I examined the Python qpid source code. Found that in the qpid.sasl
module, I always get a instance of class PlainClient.

Could you please help me, give me some guide on Python GSSAPI Kerberos
programming in the client side.

BTW: What is the saslwrapper? I cannot find it. Is it generated at runtime?

Best wishes,
Chenxiong Qi


import unittest

from qpid.messaging import Connection
from qpid.messaging.exceptions import AuthenticationFailure

class IntegrationRelatedTechResearch(unittest.TestCase):

    def setUp(self):
        self._qpid_host = 'qpid.example.com'
        self._qpid_port = 5672

    def testConnectQPIDAsRegularUserUsingGSSAPI(self):
        conn = Connection(
            host = self._qpid_host,
            port = self._qpid_port,
            sasl_mechanisms = 'GSSAPI ')
        conn.open()
        self.assertTrue(conn.opened())
        conn.close()

if __name__ == '__main__':
    unittest.main()

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


Re: Problem on connecting qpid server by GSSAPI

Posted by tkdchen <qc...@gmail.com>.
Hi all,

Solved. There is a missing python-saslwrapper package in Fedora.

Chenxiong Qi

在 2011年12月14日 下午9:20,tkdchen <qc...@gmail.com> 写道:
> Hi team,
>
> I'm writing a Python scrpt to connect to qpid server from my laptop.
> the qpid server uses kerberos to authenticate users. I have a kerberos
> ticket and already run kinit to get a TGT ticket.
> Following is my code. It uses GSSAPI mechanism, and throws
> "AuthenticationFailure: sasl negotiation failed: no mechanism agreed"
> at the conn.open().
>
> I examined the Python qpid source code. Found that in the qpid.sasl
> module, I always get a instance of class PlainClient.
>
> Could you please help me, give me some guide on Python GSSAPI Kerberos
> programming in the client side.
>
> BTW: What is the saslwrapper? I cannot find it. Is it generated at runtime?
>
> Best wishes,
> Chenxiong Qi
>
>
> import unittest
>
> from qpid.messaging import Connection
> from qpid.messaging.exceptions import AuthenticationFailure
>
> class IntegrationRelatedTechResearch(unittest.TestCase):
>
>    def setUp(self):
>        self._qpid_host = 'qpid.example.com'
>        self._qpid_port = 5672
>
>    def testConnectQPIDAsRegularUserUsingGSSAPI(self):
>        conn = Connection(
>            host = self._qpid_host,
>            port = self._qpid_port,
>            sasl_mechanisms = 'GSSAPI ')
>        conn.open()
>        self.assertTrue(conn.opened())
>        conn.close()
>
> if __name__ == '__main__':
>    unittest.main()

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