Child pages
  • Schema loading
Skip to end of metadata
Go to start of metadata

Work in progress

This site is in the process of being reviewed and updated.


This page describe the way schema are loaded into ADS. The schema are defined by the following document : RFC 4512 (which obsoletes the RFC 2252)

A schema defines two types of elements, accordingly to RFC 4512 :

  • ObjectClasses
  • AttributeTypes

Those two elements are used internally by ADS to check that an entry is valid, and to apply the correct rules to compare  attributes, sort entries, check attributes, etc.

We also use Syntax, defined in RFC 4512 and described in RFC 4517

Objects relations

We have some relations between those elements, the OIDs, the element's names and the schema file's name. Here they are :

Schema's Relations

The schema is related with ObjectClasses and AttributeTypes

  1. A schema contains N ObjectClass
  2. A schema contains N AttributesType
  3. An ObjectClass is declared in one schema
  4. An AttributeType is declared in one schema

The important things is to be able to know where an ObjectClass or an AttributeType are declared, from and schema administrator point of view. The server don't have any usage of this information, which is pretty much useless. As soon as the ObectClasses and AttributeTypes are loaded into the server, the schema is not used anymore.

ObjectClass relations 

The ObjectClass object is pretty central. It is used to create entries, and determine their characteristics, like the authorized and mandatory AttributeTypes. The ObjectClass attributes are :

  • a unique OID
  • a list of names, of which the first one is the primary name (names are case insensitives)
  • a flag to tell if the ObjectClass is obsolote or not
  • the list of its superior, if any

The key is the OID.

The relations are : 

  1. An ObjectClass is contained by only one schema
  2. A schema caan contains 0 to N ObjectClass
  3. An ObjectClass may have one or more superior
  4. An ObjectClass may be the superior of one or more ObjectClass
  5. An ObjectClass has only one OID
  6. An ObjectClass has 0 to N mandatory AttributeType
  7. An ObjectClass has 0 to N authorized AttributeType
  8. An AttributeType is included in one or more ObjectClass
  9. An ObjectClass may have more than on name
  10. A name uniquely identify an ObjectClass

We have two kinds of axccess to an ObjectClass : in the server, we access an ObjectClass either by its OID or by one of its name. From an administrator GUI, we may start with  the schema.

AttributeType's relations

AttributeTypes are used to characterize entry's attributes. They contain information about comparizon rules, ordering rules, and such.

  1. An AttributesType is contained by only one schema
  2. An OID is associated with N ObjectClass name
  3. An OID is associated with N AttributesType name
  4. A ObjectClass name is associated with only one OID
  5. A AttributesType name is associated with only one OID
  6. An ObjectClass name has only one OID
  7. An AttributesType name has only one OID
  8. An OID is associated with only one ObjectClass
  9. ... (To be continued)

Actual grammar

The actual grammar used to parse schema is the following :

Future grammar

The next version should be a little bit more powerfull :

  • it should use RFC 4512 grammar, which has extensions
  • and it also should allow a less restrictive ordering of ObjectClass and AttributeType elements.

Lexical elements

Here are the lexical elements for this grammar :

and the lexical elements :

ObjectClass object

The ObjectClass syntax is (as of RFC 4512) :

AttributeType object

The AttributeType syntax is (as of RFC 4512) :

Syntax object

Th Syntax grammar is :

What does not appears in this grammar is an information regarding human readability (wether the attribute is binary or textual)..

  • No labels