To understand Lightweight Directory Access Protocol (LDAP) you must first understand directory services. This article defines directory services and how LDAP structures the entries in a directory service. Pay attention to the basic LDAP components such as attributes, entries, and data information trees (DITs). How does LDAP organize data, and what is LDAP inheritance? Note that there are some variations in LDAP protocols.
Data Organization
Placing Entries within the DIT
A DIT is simply the hierarchy describing the relationship of existing entries. Upon creation, each new entry must "hook into" the existing DIT by placing itself as a child of an existing entry. This creates a tree-like structure that is used to define relationships and assign meaning.
The top of the DIT is the broadest categorization under which each subsequent node is somehow descendent. Typically, the top-most entry is simply used as a label indicating the organization that the DIT is used for. These entries can be of whatever objectClasses
desired, but usually they are constructed using domain components (dc=example,dc=com
for an LDAP managing info associated with example.com
), locations (l=new_york,c=us
for an organization or segment
in NY), or organizational segments (ou=marketing,o=Example_Co
).
Entries used for organization (used like folders) often use the organizationalUnit objectClass, which allows the use of a simple descriptive attribute label called ou=
. These are often used for the general categories under the top-level
DIT entry (things like ou=people
, ou=groups
, and ou=inventory
are common). LDAP is optimized for finding information laterally along the tree rather than up and down within the tree, so it
is often best to keep the DIT hierarchy rather shallow, with general organizational branches and further subdivision indicated through the assignment of specific attributes.