OID/Directory Services 11g – Schema, Object Class, Attributes

This post covers overview of Schema, Object Class and Attributesin OID. Schema Extension (creating object class, adding attribute) is NOT a regular task for OID administrators but one should know basics and tool/steps to modify/extend OID Schema.

Schema : contains rules about kinds of objects you can store in OID. As shown in figure above schema definition is stored in cn=subSchemaSubentry under Root DSE .  Use ldapadd or ODSMto add subSchemaSubentry entry (You cannot use bulkload to add subSchemaSubentry).

Attribute : is item/property attached to an entity/entry in OID. firstname, lastname, address are example of attributes for entity/entry user. Attribute can be Application Attributes(example firstname, lastname, photo) or System Configuration Attribute(example createTimestamp, createdBy, modifiedBy). Attribute can hold single value or multiple value.

Object Class : group of attribute that define structure of entry/entity is called Object Class (for example user, person, OrganizationalPerson are Object Class). ObjectClass contains mandatory and optional attribute (For example for object class Person, cn & sn attribute are mandatory attribute where as addressis optional attribute). You assign objectClass to an entity/entry. There are three type of Object Class

a) Structural : Structural object classes describe the basic aspects of an object. example, people, person, printer ..

b) Auxiliary
: Auxiliary object classes are groupings of optional attributes that expand the existing list of attributes in an entry. Unlike structural object classes, they do not place restrictions on where an entry may be stored, and you can attach them to any entry regardless of that entry’s location in the DIT.

c) Abstract : An abstract object class is a virtual object class. It is used only for convenience when specifying the highest levels of the object class hierarchy. It cannot be the only object class for an entry. For example, the object class topis an abstract object class. It is required as a superclass for all structural object classes, but it cannot be used alone.

.
How to Add/Modify/Delete Object Class ?

You can use a) Oracle Directory Services Manager (More on ODSM here) or b) command line tool (ldapXXXX) to add/modify/delete Object Class.

To Manage/Create Object Class using ODSM: Login to ODSM (http://host:7005/odsm) -> Schema -> Object Classes -> Add/Modify 

.

To add/modify/delete Object Class using Command Line: Use ldap commands like ldapsearch, ldapmodify .

.

  

Things good to know about managing OID Schema
1. Every structural object class must have topas a superclass (top is name of object class)
2. The name and the object identifier of an object class must be unique across all the schema components (Object Identifier is string of decimal numbers, which uniquely identifies an Object)
3. The Object Identifier must begin with the unique identifier 2.16.840.1.113894 followed by either the Oracle-supplied prefix.9999 or a site-specific prefix.
4. It is possible to redefine mandatory attributesin a superclass into optional attributes in the new object class. Conversely, optional attributesin a superclass can be redefined into mandatory attributes in the new object class.
5. You cannot modify an object class that is part of the standard LDAP schema. You can, however, modify user-defined object classes.
6. If existing object classes do not have the attributes you need, you can create an auxiliary object class and associate the needed attributes with that object class.
7. You cannot add additional mandatory attributes to an existing object class (Use auxiliary class to include existing objectclass as superclass and add additional attributes in auxiliary class).
8. You cannotremove attributes or super-classes from an existing object class.
9. You cannot convert structural object classes to other object class types (like structural or abstract).
10. You should not modify an object class if there are entries already associated with it.
11. You cannot delete object classes from the base schema.
12. You can delete object classes that are not in the base schema if they are not directly or indirectly referenced by other schema components.

.

References/Related

About the Author Masroof Ahmad

Leave a Comment:

7 comments
Add Your Reply