Bug 160877 - kdapkio resource does not work as an address book source
Summary: kdapkio resource does not work as an address book source
Status: RESOLVED WORKSFORME
Alias: None
Product: kresources
Classification: Unmaintained
Component: ldap (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-15 21:10 UTC by Carl Roth
Modified: 2023-01-06 05:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The settings used that generated the error (55.45 KB, image/png)
2009-02-01 21:02 UTC, Kevin Christmas
Details
Error Message (34.73 KB, image/png)
2009-02-01 21:03 UTC, Kevin Christmas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Roth 2008-04-15 21:10:30 UTC
Version:           kaddressbook 3.5.9 (using KDE 3.5.9)
Installed from:    Fedora RPMs
OS:                Linux

I'm trying to configure a read/write ldap address book for kontact/kaddressbook, and kontact fails when trying to connect to ldap with a message

  invalid DN

This is on a local ldap server (ldap.ursus.net) with

  binddn uid=roth,ou=People,dc=ursus,dc=net (works fine for other ldap-based applications)
  dn cn=roth,ou=AddressBooks,dc=ursus,dc=net

The LDAP server is set up for simple authentication (no SASL, no TLS).  The ACLs restrict access to this particular address book based on the binddn.

I've verified that the schema and ACLS are correct by using ldapadd with a single address book entry in an ldif file.

  ldapadd -x -W -D uid=roth,ou=People,dc=ursus,dc=net -f test.ldif

Here is the ldif:

dn: cn=Mickey Mouse,cn=roth,ou=AddressBooks,dc=ursus,dc=net
objectClass: inetOrgPerson
cn: Mickey Mouse
sn: Mouse
mail: mickey.mouse@example.com

Using the above binddn credentials, the address book is updated and otherwise shows up correct in phpldapadmin.

The ldapkio resource entry in share/config/kresources/contact/stdrc looks correct (all fields filled in as per the kresources dialog).

Log messages from the kde session show things like

  systemsettings(14903)/kdepimlibs (kabc) KABC::ResourceLDAPKIO::init: resource_ldapkio url: "ldap://ldap.ursus.net:389cn=roth,ou=AddressBooks,dc=ursus,dc=net?l,cn,description,facsimileTelephoneNumber,sn,displayName,givenName,jpegPhoto,mail,mobile,o,pager,homePhone,postalCode,st,street,telephoneNumber,title,uid?one??x-dir=base,x-ver=3"

which doesn't appear to be properly formatted, and doesn't include the proper binddn.

It's difficult to debug the slapd session on the other end (log verbosity can be overwhelming) but it appears that kontact/kaddressbook is trying to authenticate with a binddn of simply 'roth', which is rejected by slapd.
Comment 1 Carl Roth 2008-04-16 09:44:54 UTC
The previous bug was for Fedora 9; I tested the same behavior on Fedora 8:

  kdepim-3.5.9-6.fc8
  kdelibs-3.5.9-5.fc8

Interestingly, the KDE resources dialogs for adding the ldapkio source were subtly different:

* in both cases, I configured the ldap source for 'simple bind'
* on Fedora 9, the 'user' field was disabled, and the 'binddn' field was enabled.  When I fill in the binddn field there I get the error from the previous comment.
* on Fedora 8, the 'user' field is enabled, and the binddn field is disabled.

On Fedora 8, if I enter the username ('roth') in the 'user' field, I get the same response from ldap ('invalid DN').

If I instead enter a full binddn into the 'user' field, I am able to connect to the ldap server.  Presto, almost:

* slapd required an acl of the form

access to dn.regex="^cn=[^,]+,cn=([^,]+),ou=AddressBooks,dc=ursus,dc=net$"
       attrs=cn,@inetOrgPerson
       by dn.exact,expand="uid=$1,ou=People,dc=ursus,dc=net" write

to be able to add and delete entries from the address book.  I deduced this from scraping ACL rejection messages from the slapd server logs; I wasn't able to find any other on-line examples requiring attrs=cn for configuration of other ldap clients.

* VCF import failed due to some sort of 'invalid DN error'.  The imported address book was non-empty (truncated).  I suspect the 'invalid DN error' is masking some sort of vcf-to-ldif conversion bug.

Comment 2 Carl Roth 2008-04-16 19:22:28 UTC
I verified that using the same trick as in F8 (entering a full binddn in the 'user' field) I am able to get the 'ldap address search' function to work in kaddressbook.  This lets me search a read-only ldap address book, but it doesn't let me edit the entries.
Comment 3 Kevin Christmas 2009-02-01 21:02:52 UTC
Created attachment 30835 [details]
The settings used that generated the error
Comment 4 Kevin Christmas 2009-02-01 21:03:32 UTC
Created attachment 30836 [details]
Error Message
Comment 5 Kevin Christmas 2009-02-01 21:04:35 UTC
This just started showing up in KDE 4.2.

It appears that the problem is a missing '/' between the port number and the path in the URL.

This should be an easy fix.  ldap://auspdc.company.local:389OU=CompanyUsers,DC=company,DC=local should be ldap://auspdc.company.local:389/OU=CompanyUsers,DC=company,DC=local

kaddressbook(6580)/kdepimlibs (kldap) KLDAP::LdapUrl::updateQuery: LDAP URL updateQuery(): "ldap://auspdc.company.local:389OU=CompanyUsers,DC=company,DC=local?l,cn,description,facsimileTelephoneNumber,sn,displayName,givenName,jpegPhoto,mail,mobile,o,pager,homePhone,postalCode,st,street,telephoneNumber,title,uid?base"
kaddressbook(6580)/kdepimlibs (kldap) KLDAP::LdapUrl::updateQuery: LDAP URL updateQuery(): "ldap://auspdc.company.local:389OU=CompanyUsers,DC=company,DC=local?l,cn,description,facsimileTelephoneNumber,sn,displayName,givenName,jpegPhoto,mail,mobile,o,pager,homePhone,postalCode,st,street,telephoneNumber,title,uid?sub"
kaddressbook(6580)/kdepimlibs (kldap) KLDAP::LdapUrl::updateQuery: LDAP URL updateQuery(): "ldap://auspdc.company.local:389OU=CompanyUsers,DC=company,DC=local?l,cn,description,facsimileTelephoneNumber,sn,displayName,givenName,jpegPhoto,mail,mobile,o,pager,homePhone,postalCode,st,street,telephoneNumber,title,uid?sub??x-dir=base"
kaddressbook(6580)/kdepimlibs (kldap) KLDAP::LdapUrl::updateQuery: LDAP URL updateQuery(): "ldap://auspdc.company.local:389OU=CompanyUsers,DC=company,DC=local?l,cn,description,facsimileTelephoneNumber,sn,displayName,givenName,jpegPhoto,mail,mobile,o,pager,homePhone,postalCode,st,street,telephoneNumber,title,uid?sub??x-dir=base,x-ver=3"
kaddressbook(6580) ViewManager::setActiveView: entering ViewManager::setActiveView
kaddressbook(6580): Shortcut for KAction  "clear_search" "Clear Search Bar" set with QShortcut::setShortcut()! See KAction documentation.
kaddressbook(6580): Attempt to use QAction "edit_undo" with KXMLGUIFactory!
kaddressbook(6580): Attempt to use QAction "edit_redo" with KXMLGUIFactory!
Comment 6 Andrew Crouthamel 2018-11-02 04:16:36 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Andrew Crouthamel 2018-11-16 02:43:56 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 8 Justin Zobel 2022-12-07 00:24:04 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 9 Bug Janitor Service 2022-12-22 05:19:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2023-01-06 05:23:07 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!