[#6749] Realm and syncing
Summary Realm and syncing
Queue IMP
Queue Version HEAD
Type Bug
State Feedback
Priority 1. Low
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>, Michael Slusarz <slusarz (at) horde (dot) org>
Requester tyuhas (at) email (dot) arizona (dot) edu
Created 05/23/2008 (98 days ago)
Due
Updated 08/29/2008 (today)
Assigned 07/01/2008 (59 days ago)
Resolved
Attachments imp.diff Download
Milestone
Patch No

History
08/29/2008 tyuhas (at) email (dot) arizona (dot) edu Comment #14 Reply to this comment
Sorry, and what was happening (in the logs if you have it) before the patch?
Can anybody experiencing this issue please answer that question?
Both my pre and post patch syncml log files look like this:

DEBUG:  Backend of class syncml_backend_horde created
DEBUG:  Started at 2008-08-29 08:52:22. Packet logged in 
/tmp/sync/client_14.xml
DEBUG:  New session created: 5038b45d6ffc1337852886d81747daa5
DEBUG:  Checking authentication for user tyuhas
DEBUG:  Invalid authentication
DEBUG:  Authenticated: no; version: 1.1; message ID: 1; source URI: 
fmz-bRynSkjE
100plqxQHERhMg==; target URI: 
https://email.arl.arizona.edu:8088/rpc.php; user:
; charset: UTF-8; wbxml: no
DEBUG:  Received <Final> from client.
DEBUG:  Sending <Final> to client
DEBUG:  Return message completed
DEBUG:  Finished at 2008-08-29 08:53:32. Packet logged in 
/tmp/sync/server_14.xm
l

With that username, I can successfully login to Horde (using IMP 
authentication).

Like the other individual, I'm using the Funambol plugin for 
Thunderbird to sync my contact list.  In my earlier tests but with the 
Horde authentication being SMB, I was able to sync with the 
Funambol/Thunderbird combo.
08/29/2008 Jan Schneider Comment #13 Reply to this comment
Sorry, and what was happening (in the logs if you have it) before the patch?
Can anybody experiencing this issue please answer that question?
07/11/2008 path (at) dtcc (dot) edu Comment #12 Reply to this comment
Sorry, and what was happening (in the logs if you have it) before the patch?

Also, am I understanding correctly that username works for auth, but
doesn't match up with any data? (with and/or without the patch?) So
the issue would seem to be that when doing auth via the API, the
realm isn't added?
I just stumbled on this bug from reading the mailing list.  I seem to 
be affected as well.  From the best I can tell, syncing to rpc.php is 
not appending the realm.

I can sync using funambol as the username "path".  It does not see 
anything and uploads my Outlook contacts and so forth.  If I try to 
sync using "path@dtcc.edu", I am not able to authenticate.

Running "SELECT count(*) from horde.horde_prefs WHERE pref_uid='path'" 
on the database shows that ten records are created in that table after 
a sync operation (I ensured that there were not any records for that 
user prior to the sync).  All of my horde data is linked to 
'path@dtcc.edu'.

I tried the patch attached to this ticket and it had no effect (good or bad).

I'm using the stock "Horde Groupware Webmail Edition 1.1.1".  Using 
imp authentication to the imap server.

07/03/2008 Chuck Hagenbuch Comment #11 Reply to this comment
Sorry, and what was happening (in the logs if you have it) before the patch?

Also, am I understanding correctly that username works for auth, but 
doesn't match up with any data? (with and/or without the patch?) So 
the issue would seem to be that when doing auth via the API, the realm 
isn't added?
07/01/2008 tyuhas (at) email (dot) arizona (dot) edu Comment #10 Reply to this comment
By chance, does this patch help?
In the log, I'm receiving "Invalid authentication"
And is that what you received before? Sending username or username@realm?
username@realm.....I tried it both ways but pasted the wrong portion 
of the log.  Here's the username@realm test with the patch:

DEBUG:  Backend of class syncml_backend_horde created
DEBUG:  Started at 2008-07-01 13:34:21. Packet logged in 
/tmp/sync/client_11.xml
DEBUG:  New session created: 3609e9f199601d790a8bddeebbcc55af
DEBUG:  Checking authentication for user tyuhas@email.arizona.edu
DEBUG:  Invalid authentication
DEBUG:  Authenticated: no; version: 1.1; message ID: 1; source URI: 
fmz-bRynSkjE
100plqxQHERhMg==; target URI: 
https://email.arl.arizona.edu:8088/rpc.php; user:
; charset: UTF-8; wbxml: no
DEBUG:  Received <Final> from client.
DEBUG:  Sending <Final> to client
DEBUG:  Return message completed
DEBUG:  Finished at 2008-07-01 13:34:51. Packet logged in 
/tmp/sync/server_11.xm
l

07/01/2008 Chuck Hagenbuch Comment #9
State ⇒ Feedback
Reply to this comment
By chance, does this patch help?
In the log, I'm receiving "Invalid authentication"
And is that what you received before? Sending username or username@realm?
07/01/2008 tyuhas (at) email (dot) arizona (dot) edu Comment #8 Reply to this comment
By chance, does this patch help?
In the log, I'm receiving "Invalid authentication"

DEBUG:  Backend of class syncml_backend_horde created
DEBUG:  Started at 2008-07-01 13:36:06. Packet logged in 
/tmp/sync/client_12.xml
DEBUG:  New session created: 6af242c0d8eb164047652ba19ba257e0
DEBUG:  Checking authentication for user tyuhas
DEBUG:  Invalid authentication
DEBUG:  Authenticated: no; version: 1.1; message ID: 1; source URI: 
fmz-bRynSkjE
100plqxQHERhMg==; target URI: 
https://email.arl.arizona.edu:8088/rpc.php; user:
; charset: UTF-8; wbxml: no
DEBUG:  Received <Final> from client.
DEBUG:  Sending <Final> to client
DEBUG:  Return message completed
DEBUG:  Finished at 2008-07-01 13:37:01. Packet logged in 
/tmp/sync/server_12.xm
l
06/30/2008 Chuck Hagenbuch State ⇒ No Feedback
 
06/26/2008 Michael Slusarz Assigned to Chuck Hagenbuch
 
06/24/2008 Jan Schneider Comment #7 Reply to this comment
Ping?
06/13/2008 Chuck Hagenbuch Comment #6
New Attachment: imp.diff Download
State ⇒ Feedback
Reply to this comment
By chance, does this patch help?
06/03/2008 Jan Schneider Comment #5 Reply to this comment
This is not really related to synching. The code that triggers this 
behavior looks basically like:

$auth = &Auth::singleton($GLOBALS['conf']['auth']['driver']);
$auth->authenticate($username, array('password' => $pwd));

If you use IMP authentication and configured IMP to use realms for the 
preferred server, the realms are not attached. This has something to 
do with the order in which the IMP session is being setup, servers.php 
is loaded, and the different authenticate() and _authenticate() 
methods in Auth::, Auth_application::, and Auth_imp:: are being 
called. This is where I got lost.
06/03/2008 Michael Slusarz Comment #4 Reply to this comment
I'm getting lost in the fragile authentication chain inside IMP.
Michael, can you see anything?
Not really sure what I am looking for since I have no experience with 
realms and or syncing.
05/25/2008 Jan Schneider Comment #3
State ⇒ Assigned
Assigned to Michael Slusarz
Reply to this comment
I'm getting lost in the fragile authentication chain inside IMP. 
Michael, can you see anything?
05/25/2008 Jan Schneider Comment #2
Queue ⇒ IMP
Reply to this comment
This rather seems to be a problem with authenticating through the Auth API.
05/23/2008 tyuhas (at) email (dot) arizona (dot) edu Comment #1
Patch ⇒
Milestone ⇒
Queue ⇒ SyncML
Summary ⇒ Realm and syncing
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
We have an issue similar to ticket #6746 but we're using SyncML via 
the funambol plug-in for contacts syncing w/Lightning.  The sync works 
with our dev horde setup which uses LDAP authentication.  Our main 
site uses IMP authentication and realms which is where the sync is not 
working.

Both Horde installations are Webmail Edition 1.1-RC4.

The user is stored as username@realm but the IMP backend is only 
expecting username.  If we configure the plug-in to send username, it 
fails because username doesn't exist in horde.  If we put 
username@realm, the backend auth fails.