qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tkdchen <qcxh...@gmail.com>
Subject Problem on connecting qpid server by GSSAPI
Date Wed, 14 Dec 2011 13:20:50 GMT
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


Mime
View raw message