LDAP Preference Issues..

Dominic Ijichi dom@ijichi.org
Sun, 16 Dec 2001 22:41:06 +0000


Hi,

I'm trying to replace my sql backend with ldap and running into a few problems.
 I can auth (through IMAP) and login OK, but starting getting problems when
saving preferences.

I'm using ldapv3 (OpenLDAP v2.0.x), and I've created schemas something like this:

objectClass ( 1.3.6.1.4.<orgoid>.what.ever.1.1001 NAME 'hordeUser'
        SUP top STRUCTURAL
        MAY ( identities $ framesMode $ folders $ sigdashes $ sigfirst $
fromaddr $ replytoaddr $ savesentmail $ composepopup $ navexpanded $ fullname $
language $ subscribe $ timezone $ filters $ filtering $ sortby $ sortdir ))

and with the relevant attributes - I won't bore you all with the full list, but
as an example:

attributeType (1.3.6.1.4.<orgoid>.what.ever.2.2000 NAME 'identities'
        DESC 'Identity Preference attribute'
        EQUALITY caseIgnoreIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )

The problems arise when the preference variable names have an underscore in
them, which is an illegal character in ldap attributes.  The rest of them work
fine, I can save and retrieve preferences with no problem.  I've only been
through IMP so far, so there will no doubt be more in the other Horde apps, but
the offending attributes I've found are:

# these attributes required by HORDE all have illegal underscores
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'filter_on_login'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'last_login'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'show_filter_msg'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'mailbox_return'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'use_trash'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'trash_folder'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'delete_sentamil_monthly'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'delete_sentamil_monthly_keep'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'rename_sentamil_monthly'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'purge_trash'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'purge_trash_interval'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'purge_trash_keep'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'max_msgs'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'num_words'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'nav_expanded'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'wrap_width'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'quote_prefix'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'compose_popup'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'drafts_folder'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'close_drafts'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'show_last_login'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'refresh_time'
# attributeType 1.3.6.1.4.<orgoid>.2.1.xxx 'nav_popup'

Another problem is that, once you've set a preference and want to remove it, you
can't, as it seems to try and write back a blank attribute value rather than
deleting it (which seems to be illegal).

Anyone else come up against these problems?  Anyone got a clever workaround, or
a cunning plan (so cunning, it's got a bushy tail..)?  Maybe I'm just doing
something fundamentally wrong..

Cheers
Dom


-- 
This message was penned by the hand of DOM

------------------------------------------------------------------------
The information in this e-mail and any attachments is confidential and
may be privileged or protected by other legal rules. It is intended
solely for the addressee(s). Access to this e-mail by anyone other than
the addressee(s) is unauthorised. If you are not the intended recipient
or a person responsible for delivering it to the intended recipient, you
are not authorised to, and therefore must not, disclose, copy,
distribute or retain all or any part of this message.
------------------------------------------------------------------------