problem with the case of attributes' names
michael at stroeder.com
Thu Mar 31 15:33:26 CEST 2005
Jerome Alet wrote:
> The same app which works just fine with OpenLDAP breaks with IDS
> because, it seems, of a problem with the case of attributes' names.
> For example, IDS will return things like "objectclass" while
> OpenLDAP will return "objectClass", and this seems to cause some
> problems when retrieving and/or modifying attributes
Your application has to deal with it
(and with more weird alias issues).
> Could this be a bug in IDS ?
No, it isn't.
> Should apps expect attributes names in any case or not ?
Attribute type descriptions should be handled case-insensitive.
> Shouldn't ldap.modlist handle this automatically (not sure if it
> does or not) when updating existing attributes ?
It can handle this automagically if you use ldap.cidict for the entry
dictionaries passed to ldap.modlist.modifyModlist().
> Does python-ldap do something special about name's case or not ?
python-ldap mainly provides ldap.cidict which a dictionary class with
case-insensitive strings as keys.
Another more sophisticated solution is undocumented class
ldap.schema.models.Entry. But have to implement full schema support for
making real use of it.
More information about the python-ldap