powered by Jive Software

SaslException when using the perl xmpp lib


#1

Hi,

today i’'ve tested some small perl script to send out jabber notification.

But everytime i get the same exception in wildfire:

2006.06.28 23:27:35 SaslException

javax.security.sasl.SaslException: DIGEST-MD5: digest response format violation. Mismatched URI: /; expecting: xmpp/jabber.domain.com

at com.sun.security.sasl.digest.DigestMD5Server.validateClientResponse(Unknown Source)

at com.sun.security.sasl.digest.DigestMD5Server.evaluateResponse(Unknown Source)

at org.jivesoftware.wildfire.net.SASLAuthentication.handle(SASLAuthentication.java :245)

at org.jivesoftware.wildfire.net.SocketReadingMode.authenticateClient(SocketReadin gMode.java:117)

at org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMod e.java:136)

at org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java: 62)

at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123)

at java.lang.Thread.run(Unknown Source)

I’'ve tried:

All dependent perl CPAN libs are up to date.

Debugoutput from sendxmpp:

user@testhost:~$ sendxmpp test@jabber.server.com -d

sendxmpp: config: ‘‘password’’ => ‘‘my password’’

sendxmpp: config: ‘‘jserver’’ => ‘‘jabber.domain.com’’

sendxmpp: config: ‘‘port’’ => ‘‘5222’’

sendxmpp: config: ‘‘username’’ => ‘‘my-username’’

XML::Stream: new: hostname = (testhost)

XML::Stream: SetCallBacks: tag(node) func(CODE(0x8758304))

XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x87587e4))

XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x87581fc))

XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x875870c))

XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-tls”]) func(CODE(0x8758778))

XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns=“urn:ietf:params:xml:ns:xmpp-sasl”]) func(CODE(0x875897c))

XMPP::Conn: Connect: host(jabber.domain.com:5222) namespace(jabber:client)

XMPP::Conn: Connect: timeout(10)

XML::Stream: Connect: type(tcpip)

XML::Stream: Connect: Got a connection

XML::Stream: Send: ()

XML::Stream: handleroot: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(stream:stream) att( xmlns jabber:client xmlns:stream http://etherx.jabber.org/streams version 1.0 from jabber.domain.com id b235efc7 xml:lang en )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(stream:features) att( )

XML::Stream: Node: handleelement: check( -1 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(starttls) att( xmlns urn:ietf:params:xml:ns:xmpp-tls )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(starttls)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanisms) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism) att( )

XML::Stream: Node: handleelement: check( 1 )

XML::Stream: Node: handlecdata: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) cdata(PLAIN)

XML::Stream: Node: handlecdata: sax(XML::Stream::Parser=HASH(0x8759144)) cdata(PLAIN)

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism)

XML::Stream: Node: handleclose: check( 2 )

XML::Stream: Node: handleclose: check2( 1 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism) att( )

XML::Stream: Node: handleelement: check( 1 )

XML::Stream: Node: handlecdata: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) cdata(DIGEST-MD5)

XML::Stream: Node: handlecdata: sax(XML::Stream::Parser=HASH(0x8759144)) cdata(DIGEST-MD5)

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism)

XML::Stream: Node: handleclose: check( 2 )

XML::Stream: Node: handleclose: check2( 1 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism) att( )

XML::Stream: Node: handleelement: check( 1 )

XML::Stream: Node: handlecdata: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) cdata(CRAM-MD5)

XML::Stream: Node: handlecdata: sax(XML::Stream::Parser=HASH(0x8759144)) cdata(CRAM-MD5)

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanism)

XML::Stream: Node: handleclose: check( 2 )

XML::Stream: Node: handleclose: check2( 1 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(mechanisms)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(compression) att( xmlns http://jabber.org/features/compress )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(method) att( )

XML::Stream: Node: handleelement: check( 1 )

XML::Stream: Node: handlecdata: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) cdata(zlib)

XML::Stream: Node: handlecdata: sax(XML::Stream::Parser=HASH(0x8759144)) cdata(zlib)

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(method)

XML::Stream: Node: handleclose: check( 2 )

XML::Stream: Node: handleclose: check2( 1 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(compression)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(auth) att( xmlns http://jabber.org/features/iq-auth )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(auth)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleelement: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(register) att( xmlns http://jabber.org/features/iq-register )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(register)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleclose: sid(newconnection) sax(XML::Stream::Parser=HASH(0x8759144)) tag(stream:features)

XML::Stream: Node: handleclose: check( 0 )

XML::Stream: Node: handleclose: check2( -1 )

XMPP::Conn: Connect: connection made

XML::Stream: SetCallBacks: tag(node) func(CODE(0x8758c40))

sendxmpp: Connect: 1

XMPP::Conn: AuthSASL: shiney new auth

XML::Stream: Send: ()

XML::Stream: Node: handleelement: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(challenge) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl )

XML::Stream: Node: handleelement: check( -1 )

XML::Stream: Node: handlecdata: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) cdata(==)

XML::Stream: Node: handlecdata: sax(XML::Stream::Parser=HASH(0x8759144)) cdata(==)

XML::Stream: Node: handleclose: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(challenge)

XML::Stream: Node: handleclose: check( 0 )

XML::Stream: Node: handleclose: check2( -1 )

XML::Stream: Send: ()

XML::Stream: Node: handleelement: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(failure) att( xmlns urn:ietf:params:xml:ns:xmpp-sasl )

XML::Stream: Node: handleelement: check( -1 )

XML::Stream: Node: handleelement: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(not-authorized) att( )

XML::Stream: Node: handleelement: check( 0 )

XML::Stream: Node: handleclose: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(not-authorized)

XML::Stream: Node: handleclose: check( 1 )

XML::Stream: Node: handleclose: check2( 0 )

XML::Stream: Node: handleclose: sid(b235efc7) sax(XML::Stream::Parser=HASH(0x8759144)) tag(failure)

XML::Stream: Node: handleclose: check( 0 )

XML::Stream: Node: handleclose: check2( -1 )

XML::Stream: Process: block(0)

XMPP::Conn: AuthSASL: Authentication failed.

Error ‘‘AuthSend’’: error: not-authorized[?]

XML::Stream: Send: (</stream:stream>)

XML::Stream: SetCallBacks: tag(node) func(CODE(0x87a69dc))

XMPP::Conn: Disconnect: bye bye

sendxmpp: Disconnect

Is this a problem of wildfire or a problem of any CPAN lib?

These scripts works with jabberd1.4 for example.

Message was edited by: dna


#2

This is a known problem.

At the moment the best you can do is comment out line 1772 in Net/XMPP/Protocol.pm.

The line:

return $self->AuthSASL(%args);

becomes

  1. return $self->AuthSASL(%args);

Not pretty but it works.

… WkH


#3

A know problem of wildfire or a know problem of the XMPP cpan lib?

thanks for help.


#4

It’‘s unclear where the problem lies. I suspect the Java SASL library and the Perl SASL module don’‘t like each other. I have not, however, had time to explore the problem in detail so that’'s just conjecture on my part.


#5

I see the identical problem (same traceback from the Wildfire server) when trying to use the Python XMPP module (http://xmpppy.sf.net/). Is there a plan to fix this in Wildfire or is the only fix to disable SASL authentication specifically when communicating with Wildfire (versus Jabber servers that actually implement SASL properly)?


#6

Hey Dave,

Some time ago when I analyzed this problem (even had to decompile core Java classes) I concluded that there was an inconsistency between the way Perl and Java are using DIGEST-MD5. Java is expecting something different than what Perl is sending thus it complains are rejectes the operation. I currently don’‘t know which one is not playing nice but in any case there isn’'t much we can do from the Wildfire side. Have you tried using other SASL mechanisms besides DIGEST-MD5?

Regards,

– Gato