[python-ldap] Attribute syntax definitions
Nyasha Chigwamba
nyasha.chigwamba at voss-solutions.com
Thu Dec 13 00:34:44 CET 2012
Hi Michael,
Thank you for giving some insight into extent of work required to implement
a complete schema aware client - I will only implement partial schema
support for now and add new features as the need arises.
Regarding documentation contributions, I found that the online
documentation for class
ldap.schema.models.ObjectClass(schema_element_str=None) defines the
following:
kind
Kind of an object class: 0 = ABSTRACT, 1 = STRUCTURAL, 2 = AUXILIARY
After fiddling a bit, I discovered that the following holds (note the swap
between structural and abstract kind constants):
kind
Kind of an object class: 0 = *STRUCTURAL*, 1 = *ABSTRACT*, 2 = AUXILIARY
Regards,
Nyasha
On Wed, Dec 12, 2012 at 9:09 PM, Michael Ströder <michael at stroeder.com>wrote:
> Nyasha Chigwamba wrote:
> > On Mon, Dec 3, 2012 at 11:12 PM, Michael Ströder <michael at stroeder.com
> > wrote:
> > How generic should this be?
> >
> > At the moment, I am only creating instances of a single object class
> that is
> > defined on the server. Eg. In my AD server, I can create an instance of
> the
> > user class. The inheritance hierarchy of the user class contains (person,
> > organizationalPerson, top). I do not support multiple inheritance but it
> might
> > become a requirement. Multiple inheritance being, for example, creating a
> > instance of the user class that also inherits from the account class.
>
> Fortunately ldap.schema already does all that for you:
>
>
> http://www.python-ldap.org/doc/html/ldap-schema.html#ldap.schema.subentry.SubSchema.attribute_types
>
> I know that ldap.schema is not documented very well. Doc contributions
> welcome...
>
> > Note that DIT content rules also influence the set of attributes
> usable in an
> > entry. Some developers of a widely used LDAP client blame MS AD for
> not having
> > LDAPv3 compliant subschema but they fail to evaluate the DIT content
> rules...
> >
> > I also discovered that I got a larger set of attributes when I included
> the
> > ditContentRules in my result attributes. However, I noticed that
> > ditStructureRules are not return by Active Directory (optional as per
> relevant
> > RFC)
>
> AD does not have DIT structure rules and name forms.
> AD extensively uses DIT content rules though.
>
> > 'subschemaSubentry' is an operational attribute in every entry. Bear
> in mind
> > that each part of the DIT could have its own subschema.
> >
> > Do you mean in contexts where, for example, referrals are used?
>
> Nothing about referrals.
>
> If you want to implement a really schema-aware client this client has to
> query
> the subschema subentry for each entry! web2ldap does that except when
> displaying search results. Schema caching is needed to let this scale.
>
> > It would be great if I can support all LDAP servers.
>
> Good luck! It's gonna be much work.
>
> Ciao, Michael.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20121213/cdca4f8a/attachment.html>
More information about the python-ldap
mailing list