Project

General

Profile

Bug #472

Failed to login - error in SASL authentification

Added by Anonymous almost 12 years ago. Updated over 11 years ago.

Status:
Assigned
Priority:
Normal
Category:
-
Target version:
Start date:
12/30/2012
Due date:
% Done:

0%

Estimated time:
Affected version:
hg
Locale:
Close

Description

I'm unable to login with current hg version (1009:c76a6e4b37cf) of Beem. Login works fine with version 0.1.7 (or hg version up to 988:586e34fc7594) and stops working with 994:87c97dcb7136 (I'm unable to build anything inbetween).

Error is probably caused by invalid SASL response. Bellow are decoded base64 SASL challenge/response messages, the only visible diference is in digest-uri field.

V0.1.7: (works)

username="master_up",realm="njs.netlab.cz",cnonce="...",nc=00000001,qop=auth,digest-uri="xmpp/njs.netlab.cz",response=...,charset=utf-8,nonce="..."

HG version (does not authentificate)

username="master_up",realm="njs.netlab.cz",cnonce="...",nc=00000001,qop=auth,digest-uri="xmpp/lb1-hap.jabbim.cz",response=...,charset=utf-8,nonce="..."

I have no idea where the string 'lb1-hap.jabbim.cz' comes from.


Related issues

Has duplicate Bug #489: digest-uri wrong when using separate server NewBeem-Core03/25/2013

Actions
#1

Updated by Frédéric Barthéléry almost 12 years ago

  • Status changed from New to Assigned
  • Assignee set to Frédéric Barthéléry

The digest-uri field is compute with the hostname you specified when creating the connection.
lb1-hap.jabbim.cz is the server providing the xmpp service of jabbim.cz.

You should check your connection info (jid, specific server settings, proxy) as it appears you are connecting to netlab.cz server but try to authenticate with a jid. (or the opposite)

If you can debug the code a little, you should check the mConnectionConfiguration field of source:src/com/beem/project/beem/BeemService.java

#2

Updated by J Pinkava almost 12 years ago

Thanks a lot for a hint!

If I change proper line to:

mConnectionConfiguration = new ConnectionConfiguration(mService, mPort, mService, mProxyInfo);

(mService == "njs.netlab.cz")
it starts working again, it looks like ConnectionConfiguration does some DNS magic (see documentation) when invoked as:

ConnectionConfiguration(mService, mProxyInfo);

I have tried some other XMPP clients and all work fine and use "njs.netlab.cz" as digest-uri. Have You anny suggestions what to do and what is really wrong?

What is strange (and probably a bug in initConnectionConfig()) is that setetting explicitly host in config does not help. I guess that if-ing/parenthesis are wrong and new at line src/com/beem/project/beem/BeemService.java:190 overrides new at linesrc/com/beem/project/beem/BeemService.java: 171 (new is called twice).

http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/org/jivesoftware/smack/ConnectionConfiguration.html

#3

Updated by Frédéric Barthéléry almost 12 years ago

J Pinkava wrote:

What is strange (and probably a bug in initConnectionConfig()) is that setetting explicitly host in config does not help. I guess that if-ing/parenthesis are wrong and new at line src/com/beem/project/beem/BeemService.java:190 overrides new at linesrc/com/beem/project/beem/BeemService.java: 171 (new is called twice).

It is a bug indeed. I just refactor this part in commit 3f4c77587fb9. Can you please test it and see if you got better result ?

#4

Updated by Frédéric Barthéléry almost 12 years ago

I think I found the bug.

SASLAuthentication use getHost() instead of getServiceName() which breaks DIGEST-MD5
https://github.com/Flowdalic/smack/commit/ce1c4679c2bcb92e1e523ea6889ae1f6d09197ad
https://github.com/Flowdalic/smack/commit/d08903a89208e95f9e49cd7bbf6bc3fa0bd82e5d

I have to see with asmack upstream how to fix it properly.

#5

Updated by J Pinkava almost 12 years ago

Now I can login when server (host) is explicitly set. Thanks for fixing.

As about he digest/host SASL issue it still remains.

#6

Updated by Frédéric Barthéléry over 11 years ago

  • Target version set to 0.1.9
#7

Updated by Florian Schmaus over 11 years ago

Related SMACK Bug: SMACK-344 ( http://issues.igniterealtime.org/browse/SMACK-344 )

Also available in: Atom PDF