22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

For example, consider an LDAP object that is defined with the following object<br />

classes:<br />

objectclass: top<br />

objectclass: person<br />

objectclass: organizationalPerson<br />

objectclass: inetOrgPerson<br />

objectclass: eDominoAccount<br />

The order shown for the object classes indicates a hierarchical relationship<br />

between these object classes, but not necessarily. The “top” objectclass is of<br />

course at the top of the hierarchy. Most other objectclasses that are not intended<br />

to be subordinate to another class should have “top” as its superior. Not all LDAP<br />

directories expect a user record to have the “top” object class assigned to it,<br />

while others require it for using Access Control Lists (ACLs) on the object. The<br />

“person” class is subordinate to the “top” class, and requires that the “cn”<br />

(Common Name) and “sn” (Surname) attributes be populated, and allows several<br />

other optional attributes. The “organizationalPerson” class inherits from the<br />

“person” class. The “inetOrgPerson” class inherits from “organizationalPerson”<br />

class. Now here is the tricky part: the “eDominoAccount” is subordinate to the<br />

“top” class and requires that the “sn” and “userid” attributes be populated. Notice<br />

this overlaps with the “person” object class requirement for the “sn” attribute.<br />

Does this mean we need to store the “sn” attribute twice? No, because it is a<br />

standard attribute. We talk more about attributes a little later in this section. This<br />

example illustrates that you cannot necessarily tell the hierarchical relationship of<br />

object classes by the order they appear in a list.<br />

So then, how do we tell? We tell (or in reality, your LDAP directory interface<br />

shows you) by looking at the object class definitions themselves. The methods<br />

for defining object classes for LDAP V3 are described in RFC-2251 and<br />

RFC-2252. The following object class definitions are taken from <strong>IBM</strong> Directory<br />

Server, which uses the same syntax as OpenLDAP server.<br />

objectclass: top<br />

objectclasses=( 2.5.6.0 NAME 'top' DESC 'Standard ObjectClass' ABSTRACT<br />

MUST ( objectClass ) )<br />

objectclass: person<br />

objectclasses=( 2.5.6.6 NAME 'person' DESC 'Defines entries that<br />

generically represent people.' SUP 'top' STRUCTURAL MUST ( cn $ sn ) MAY (<br />

userPassword $ telephoneNumber $ seeAlso $ description ) )<br />

objectclass: organizationalPerson<br />

objectclasses=( 2.5.6.7 NAME 'organizationalPerson' DESC 'Defines entries<br />

for people employed by or associated with an organization.' SUP 'person'<br />

STRUCTURAL MAY ( title $ x121Address $ registeredAddress $<br />

Chapter 8. Directory strategies 317

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!