James Andrewartha jamesa at daa.com.au
Mon Oct 22 18:55:26 CEST 2007

On Mon, 2007-10-22 at 16:13 +0200, Michael Ströder wrote:
> James Andrewartha wrote:
> > On Mon, 2007-10-22 at 15:05 +0200, Michael Ströder wrote:
> >> If you're using ldap.schema you might want to look into using class
> >> ldap.schema.models.Entry instead of simply ldap.cidict.cidict because
> >> you don't have to care about attribute description aliases and mapping
> >> them to OIDs.
> > 
> > I'm happy with the setup I've got now, but if I ever need to deal with
> > attribute OIDs then I'll look into it.
> Well, it's not a matter of you personally need to deal with it. There
> might be the case that an attribute type or object class does not have
> NAME assigned at all. Also think about language sub-types and transfer
> type ;binary separated by ; from the name. And dashes (-) are allowed in
> AttributeTypeDescription. You really should dive into RFC 4512.

Thanks for the pointer. I've updated the code to map _ in attribute
names to -. Attributes without a short name are impossible to wrap - I'm
not expecting clients of this library to know OIDs. Attributes with
options are accessible via obj.['cn;lang-en'] (as are normal
attributes). There should probably be some functions to ask for a
specific language, RFC 3866 will guide me there.

James Andrewartha

More information about the python-ldap mailing list