Hi all,
[The list archive https://mailman.ik.nu/pipermail/twisted-jabber/ is
returning "forbidden", So I could not see review if this question has
come up many times before]
I'm trying to start out with Wokkel as a XMPP client to interact as a
bot with a corporate XMPP service.
For the test I use the simple client code:
jid = JID(USER_NAME)
password = USER_CREDENTIALS
application = service.Application('XMPP client')
xmppClient = client.XMPPClient(jid, password)
xmppClient.logTraffic = True
xmppClient.setServiceParent(application)
Which fails with "No available authentication method found".
Are we using some strange authentication mode that's not supported? I
suspect what's missing is the part where Wokkel switches to using TLS
for the connection.
I've tried with both 0.7.1 and current tip (a420a85b5b9b)
The output I get is:
$ twistd -noy miranda/client.py
2017-05-13T10:42:42+0200 [-] Loading miranda/client.py...
2017-05-13T10:42:42+0200 [-] Loaded.
2017-05-13T10:42:42+0200
[twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 17.1.0
(/home/marijn/.virtualenvs/miranda2.7/bin/python 2.7.6) starting up.
2017-05-13T10:42:42+0200
--- DNS Resolution stuff ---
2017-05-13T10:42:43+0200 [Uninitialized] SEND: "<stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'
to='chat.corp.net' version='1.0'>"
2017-05-13T10:42:43+0200 [XmlStream,client] RECV: "<?xml
version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en'
from='chat.corp.net' id='0e41bed7-eb11-46d6-b3fd-4ea0999b00b2'
version='1.0' xmlns='jabber:client'><stream:features><c hash='sha-1'
ver='/mCqhnzgtj2MqRKwr/14lKZY45I=' node='http://prosody.im'
xmlns='http://jabber.org/protocol/caps'/><starttls
xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls></stream:features>"
2017-05-13T10:42:43+0200 [XmlStream,client] Unhandled Error
Traceback (most recent call last):
File
"/home/marijn/.virtualenvs/miranda2.7/local/lib/python2.7/site-packages/twisted/internet/defer.py",
line 321, in addCallback
callbackKeywords=kw)
File
"/home/marijn/.virtualenvs/miranda2.7/local/lib/python2.7/site-packages/twisted/internet/defer.py",
line 310, in addCallbacks
self._runCallbacks()
File
"/home/marijn/.virtualenvs/miranda2.7/local/lib/python2.7/site-packages/twisted/internet/defer.py",
line 653, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File
"/home/marijn/.virtualenvs/miranda2.7/local/lib/python2.7/site-packages/twisted/words/protocols/jabber/xmlstream.py",
line 217, in do_next
d = defer.maybeDeferred(init.initialize)
--- <exception caught here> ---
File
"/home/marijn/.virtualenvs/miranda2.7/local/lib/python2.7/site-packages/twisted/internet/defer.py",
line 150, in maybeDeferred
result = f(*args, **kw)
File "/home/marijn/src/wokkel/wokkel/client.py", line 45, in
initialize
raise Exception("No available authentication method found")
exceptions.Exception: No available authentication method found
By contrast, If I look at the debug of Pidgin, this is what it does to
successfully login:
(10:29:51) proxy: Connected to chat.corp.net:5222.
(10:29:51) jabber: Sending ([email protected]): <?xml
version='1.0' ?>
(10:29:51) jabber: Sending ([email protected]):
<stream:stream to='chat.corp.net' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(10:29:51) jabber: Recv (429): <?xml version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en'
from='chat.corp.net' id='464eb120-9a14-4449-84e7-c805e6fdcbb5'
version='1.0' xmlns='jabber:client'><stream:features><c hash='sha-1'
ver='/mCqhnzgtj2MqRKwr/14lKZY45I=' node='http://prosody.im'
xmlns='http://jabber.org/protocol/caps'/><starttls
xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls></stream:features>
(10:29:51) jabber: Sending ([email protected]): <starttls
xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
(10:29:51) jabber: Recv (50): <proceed
xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
(10:29:51) nss: subject=CN=*.corp.net,OU=COMODO SSL
-- TLS debugging magic --
(10:29:51) certificate: Successfully verified certificate for
chat.corp.net
(10:29:51) jabber: Sending (ssl) ([email protected]):
<stream:stream to='chat.corp.net' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(10:29:51) jabber: Recv (ssl)(451): <?xml version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en'
from='chat.corp.net' id='692b0c62-7673-42a9-8f25-72d400267410'
version='1.0' xmlns='jabber:client'><stream:features><c hash='sha-1'
ver='/mCqhnzgtj2MqRKwr/14lKZY45I=' node='http://prosody.im'
xmlns='http://jabber.org/protocol/caps'/><mechanisms
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism></mechanisms></stream:features>
(10:29:51) sasl: Mechs found: PLAIN
(10:29:51) jabber: Sending (ssl) ([email protected]): <auth
xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'
xmlns:ga='http://www.google.com/talk/protocol/auth'
ga:client-uses-full-bind-result='true'>password removed</auth>
(10:29:52) jabber: Recv (ssl)(61): <success
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>=</success>
(10:29:52) jabber: Sending (ssl) ([email protected]):
<stream:stream to='chat.corp.net' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(10:29:52) jabber: Recv (ssl)(421): <?xml version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en'
from='chat.corp.net' id='ba9a8bd4-c842-43da-9874-8cd2c7b6ba7f'
version='1.0' xmlns='jabber:client'><stream:features><bind
xmlns='urn:ietf:params:xml:ns:xmpp-bind'><required/></bind><session
xmlns='urn:ietf:params:xml:ns:xmpp-session'><optional/></session><ver
xmlns='urn:xmpp:features:rosterver'/></stream:features>
... etc., etc...
_______________________________________________
Twisted-Jabber mailing list
[email protected]
https://mailman.ik.nu/mailman/listinfo/twisted-jabber