Not logged in. · Lost password · Register
Forum: agsXMPP RSS
agsXMPP authentication error with correct username password with OpenFire 3.9.3
Avatar
renish #1
Member since May 2015 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: agsXMPP authentication error with correct username password with OpenFire 3.9.3
  1. SEND: <stream:stream to='52.74.24.149' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2.  
  3. RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="chat.cluedoor.com" xml:lang="en" version="1.0" id="c2aee9cb" >
  4.  
  5. RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mech anism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
  6.  
  7. SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  8.  
  9. RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  10.  
  11. SEND: <stream:stream to='52.74.24.149' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  12.  
  13. RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="chat.cluedoor.com" xml:lang="en" version="1.0" id="c2aee9cb" >
  14.  
  15. RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mech anism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mech anism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
  16.  
  17. SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
  18.  
  19. RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImNoYXQuY2x1ZWRvb3IuY29tIixub2 5jZT0iOXpYUENLZFVPSUR4Ujg1TUZoMlZjN3k4UUt5dnBrWXRRMEpmVU95eiIscW9wPSJhdXRoIixjaG Fyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
  20.  
  21. SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9IjEwMTUzX3AiLHJlYWxtPSJjaG F0LmNsdWVkb29yLmNvbSIsbm9uY2U9Ijl6WFBDS2RVT0lEeFI4NU1GaDJWYzd5OFFLeXZwa1l0UTBKZl VPeXoiLGNub25jZT0iYWE5NzQ2NjI1NWIxYTA1NmMzMDcyZTNiZjU0ODg4MzMzOTk0YWM4ZWUyYWViNW E0MGM5N2Y1N2RlZjBkNDUwNyIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC81Mi 43NC4yNC4xNDkiLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9MWY4YWJhZjU5OGM2MGEzM2I5Y2Y5YTAwNT E2NGViM2E=</response>
  22.  
  23. RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized /></failure>
  24.  
  25. SEND: </stream:stream>
  26.  
  27. RECV: </stream:stream>
This post was edited on 2015-05-05, 15:26 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
your XmppDomain is wrong.

you set it to 52.74.24.149

but the server replies with chat.cluedoor.com

fix your XmppDomain. Never use Ip addresses as XmppDomain. Xmpp is based on somains.

Alex
Avatar
renish #3
Member since May 2015 · 7 posts
Group memberships: Members
Show profile · Link to this post
thanks for reply.

username : xxxx@52.74.24.149
server :52.74.24.149

xmppDomain on openfire : chat.cluedoor.com

above config working fine with smack client. but problems with agsxmpp client.

i can not change the xmppDomain on openfire now as users are already registered.

is there any other way to make this thing working ?
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
your username is not username : xxxx@52.74.24.149, its username : xxxx@chat.cluedoor.com

If Smack allows you to login witha wrong XMPP domain then its using a weak SASL mechanism which does not include the XmppDomain for authentication.
As you see on the Xml Stream above you server replies with chat.cluedoor.com as XmppDomain. This is what you must use. A strict Xmpp server would kill your session at the very beginning after you sent the stream header. Your openfire seems to be very fault tolerant here.

try this:
  1. xmppClient = new XmppClientConnection();
  2. xmppClient.Server = "chat.cluedoor.com";
  3. xmppClient.Username = "xxxx";
  4. xmppClient.Password = "your_secret";
  5. xmppClient.AutoResolveConnectServer = false;
  6. xmppClient.ConnectServer= "52.74.24.149";
This post was edited on 2015-05-05, 17:35 by Alex.
Avatar
Alex #5
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #3
Quote by renish:
i can not change the xmppDomain on openfire now as users are already registered.

is there any other way to make this thing working ?

you have to, your server is in a very broken state when you added your users with the ip address and the Xmpp domain is set to a different domain.


Alex
Avatar
renish #6
Member since May 2015 · 7 posts
Group memberships: Members
Show profile · Link to this post
Sorry to say but it says no property exist like Hostname

'Hostname' is not a member of 'agsXMPP.XmppClientConnection'
Avatar
Alex #7
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry, Hostname is in Matrix. in agsXMPP this property is called ConnectServer.
I updated the code above.
Avatar
renish #8
Member since May 2015 · 7 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #6
Got It

it should be objXmpp.ConnectServer instead of objXmpp.HostName

Thanx For Answer.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS