[jdev] Problem in SASL authentication
Juhana Koski
juhana.koski at gmail.com
Thu Apr 19 02:38:47 CDT 2007
Hi,
I´m developing XMPP-client in S60 environment and I´m having
difficulties in authentication process. I´m trying to connect to
jabber.org server. But after I have started SASL-negotiation and I have
sent my first SASL response server returns "not-authorized" stanza to
me. Any Ideas what is the reason? I´m not using TLS. Should I inform the
server about it? I prefer to not use it because it´s not so straight
forward to use it in s60 environment.
Communication goes like this:
Client:
<stream:stream
to='jabber.org'
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
version='1.0'>
Server:
<?xml version='1.0'?><stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' id='538140740'
from='jabber.org' version='1.0' xml:lang='en'>
Server:
<stream:features>
<starttls
xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression
xmlns='http://jabber.org/features/compress'>
<method>
zlib
</method>
</compression>
<mechanisms
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>
DIGEST-MD5
</mechanism>
<mechanism>
PLAIN
</mechanism>
</mechanisms>
<register
xmlns='http://jabber.org/features/iq-register'/>
</stream:features>
Client:
<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5"/>
Server:
<challenge
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>bm9uY2U9IjExOTk5NDcwNiIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
Encoded challenge is:
nonce="119994706",qop="auth",charset=utf-8,algorithm=md5-sess
Client:
<response
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9J2p1aGFuYScscmVhbG09Jycsbm9uY2U9JzI4OTU1MzkyMTcnLGNub25jZT0nMTIxMzExMjU3NTY3MzQ1MicsbmM9MDAwMDAwMDEsZGlnZXN0LXVyaT0neG1wcC9qYWJiZXIub3JnJyxxb3A9J2F1dGgnLHJlc3BvbnNlPSc1MTE2YTk5OGZjMzYyZDA0M2U1Mzc5ODViMjgzNzUxMScsY2hhcnNldD11dGYtOA==</response>
Encoded response is:
username='juhana',realm='',nonce='119994706',cnonce='1213112575673452',nc=00000001,digest-uri='xmpp/jabber.org',qop='auth',response='3bb22240794cde21b0062a3ff17c0080',charset=utf-8
(the actual base64 msg differs from this because I was not able to
capture both information at the same time)
Server:
<failure
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
More information about the JDev
mailing list