Active Directory uses objects to store and reference data in the directory. The schema defines the types of objects that are available to the directory service. The schema is stored in the schema partition, which is also defined as an object in the directory. The attributes and classes in Active Directory are stored in the schema partition as directory objects that are called schema objects. The schema partition itself is represented in Active Directory by an object that is an instance of the Directory Management Domain (dMD) class.
Storing the schema in the directory has many advantages. For example, when user applications locate the schema in the directory, they can read the schema to discover what types of objects and properties are available. Because the schema is stored in the directory — like the rest of the data in the directory — applications can locate the schema by using the same process that they use to locate any other object in the schema.
A schema object, called a classSchema object, defines each class in the schema. Another schema object, called an attributeSchema object, defines each attribute in the schema. Therefore, every class is actually an instance of the classSchema class, and every attribute is an instance of the attributeSchema class, as shown in the following figure.
Schema objects are used to define classes and attributes in the schema. Classes in the schema are used to define objects in the directory.
Attributes describe the classes that are defined in the schema. Attributes are defined in the schema separately from classes, which enables a single attribute definition to be applied to many classes.
Attributes are attributeSchema objects. Each attributeSchema object is an instance of the attributeSchema class. Like any other object, the attributeSchema object has its own attributes. The attributes for the attributeSchema object store, among other things, the following information:
-
The Lightweight Directory Access Protocol (LDAP) display name of the attribute
-
The object identifier for the attribute
-
The globally unique identifier (GUID) for the attribute
-
The syntax of the attribute
-
The range for the attribute. For integers, range defines the minimum and maximum value; for strings, range defines the minimum and maximum length.
-
Whether the attribute is a multivalue attribute. Note that multivalue attributes hold a set of values with no particular order. Multivalue attributes might not be returned in the order in which they were stored (or in any other order).
-
Whether and how the attribute is indexed
Attributes for the attributeSchema class
Attributes for the attributeSchema class are described in the following table.
Attributes for the attributeSchema Class
|
Attribute
|
Syntax
|
Mandatory?
|
Multivalue?
|
Description
|
|---|
cn | Unicode | Yes | No | Descriptive relative distinguished name for the schema object |
attributeID | Object identifier | Yes | No | Object identifier that uniquely identifies this attribute |
lDAPDisplayName | Unicode | Yes, but automatic | No | Name by which LDAP clients identify this attribute |
schemaIDGUID | String(Octet) | Yes | No | GUID that uniquely identifies this attribute |
mAPIID | Integer | No | No | Integer by which Messaging API (MAPI) clients identify this attribute |
attributeSecurityGUID | GUID | No | No | GUID by which the security system identifies the property set of this attribute |
attributeSyntax | Object identifier | Yes | No | Syntax object identifier of this attribute |
oMSyntax | Integer | Yes | No | Syntax of this attribute as defined by the XAPIA X/Open Object Model (XOM) specification |
isSingleValue | BOOL | Yes | No | Indicates whether this attribute is a single-value or multivalue attribute Note that multivalue attributes hold a set of values with no particular order. Multivalue attributes might not be returned in the order in which they were stored (or in any other order). |
extendedCharsAllowed | BOOL | No | No | Indicates whether extended characters are allowed in the value of this attribute Applies only to attributes of syntax String(teletex). |
rangeLower | Integer | No | No | Lower range of values that are allowed for this attribute |
rangeUpper | Integer | No | No | Upper range of values that are allowed for this attribute |
systemFlags | Integer | No | No | Flags that determine specific system operations Note: This attribute cannot be set or modified. The following systemFlags attributes are relevant to the schema objects: Attribute is required to be a member of the partial set = 0x00000002 Attribute is not replicated = 0x00000001 Attribute is a constructed attribute = 0x00000004 |
searchFlags | Integer | No | No | The searchFlags property of each property’s attributeSchema object defines whether a property is indexed and other behavior. The seven currently defined bits for this attribute are: 1 = Index over attribute only 2 = Index over container and attribute 4 = Add this attribute to the ambiguous name resolution (ANR) set (should be used in conjunction with 1) 8 = Preserve this attribute on logical deletion (that is, make this attribute available on tombstones) 16 = Include this attribute when copying a user object 32 = Create a Tuple index for the attribute to improve medial searches 64 = Reserved for future use; value should be 0. 128 = Available in Windows Server 2003 Service Pack 1 (SP1) only. Mark the attribute confidential (CONTROL_ACCESS is required to read it). |
isMemberof PartialAttributeSet | BOOL | No | No | A Boolean value that defines whether the attribute is replicated to the global catalog A value of TRUE means that the attribute is replicated to the global catalog. In environments where domain controllers are running Windows 2000 Server, changing this value might cause full synchronization of the Partial Attribute Set. For more information about the conditions under which full synchronization occurs, see How the Global Catalog Works on the Microsoft Web site at http://go.microsoft.com/fwlink/?LinkId=47817. |
systemOnly | BOOL | No | No | Attributes on which Windows Server 2003 and Active Directory depend for normal operations If TRUE, only the system can modify this attribute. No user-defined attribute must ever have the systemOnly flag set. |
objectClass | Object identifier | Yes | Yes | Class of this object, which is always attributeSchema |
nTSecurityDescriptor | NT-Sec-Des | Yes | No | Security descriptor on the attributeSchema object itself |
oMObjectClass | String(Octet) | No | No | For object-syntaxed attributes (OM-syntax = 127), the Basic Encoding Rules (BER) encoded object identifier of the XOM object class For more information about BER encoding, see Request for Comments (RFC) 2251 in the IETF RFC Database. |
LinkID | Integer | No | No | Value that determines whether the attribute is a linked attribute. An even integer denotes a forward link; an odd integer denotes a back link. A forward link references a target object in the directory; a back link refers back to the source object that has a forward link to it. |
Single-value and multivalue attributes
Some attributes contain a single value, and other attributes can contain multiple values. For example, the password attribute on a user object contains a single value: the password that is associated with the user account. The memberOf attribute contains multiple values: a list of the various groups of which the user account is a member. Each item in the list is stored as a separate value in the memberOf attribute. Attributes that can store more than a single value are referred to as “multivalue” attributes.
Whether or not attributes are single-value or multivalue is defined by the singleValue attribute as a Boolean value. The Active Directory Schema snap-in reports this attribute as “single-value” or multivalue rather than as the attribute-value pair. (Active Directory Schema is a Microsoft Management Console (MMC) graphical interface tool in Windows Server 2003 that administrators can use to manage the schema.)
All values that are defined for a multivalue attribute must have a uniform syntax. Multivalue attributes that are not linked can store a maximum of 1,300 entries. This limit is based on the size and type of the values that are stored.
Note
-
When it retrieves data, LDAP reads a multivalue attribute as a single entity. This can be inconvenient or even impossible when the number of values in a multivalue attribute becomes large. A property called Range can be specified as part of an attribute description to retrieve the values of a multivalue attribute incrementally. Servers might or might not honor the Range property. Servers that support the Range property include the object identifier 1.2.840.113556.1.4.802 in the supportedControls operational attribute on the rootDSE. Clients must not use the Range property unless this object identifier is present. The Range property is a constant, case-insensitive string value (Range=), followed by a range specifier that lists the initial value and terminal value in the range.
Linked attributes
Linked attributes make it possible to associate one object with another object. A linked attribute represents an interobject, distinguished-name reference. Linked attributes occur in pairs: forward link and backward link (back link). Linked attribute pairs exist on source objects and target objects, as follows:
-
The forward link is a linked attribute on a source object (for example, the member attribute on the group object). It can be a single-valued attribute or a multi-valued attribute.
-
As an option, a back link can be defined on a target object (for example, the memberOf attribute on the user object). A back-link attribute should be created as a multi-valued attribute, and it cannot exist without a corresponding forward link. The back-link attribute cannot be updated directly. Instead, it is automatically calculated when it is queried, based on the corresponding forward link. A back-link value on any instance of an object consists of the distinguished names of all source objects that have the target object's distinguished name in their corresponding forward link.
A linked pair is identified by the linkID values of two attributeSchema objects. The linkID of the forward link is an even, positive, nonzero value, and the linkID of the associated back link is the value of the forward linkID, incremented by one. For example, the value of linkID for member is 2 and the value of linkID for memberOf is 3.
Automated links
The linkIDs must be unique within the forest. In Windows 2000 Server, linkIDs are allocated by the applications that used them, and it is up to application developers to make sure that the linkIDs for the applications do not conflict with linkIDs that are already in use. Windows Server 2003 can generate link values automatically to ensure that there are no conflicts within the forest. When new objects that use linked attributes are created, Active Directory automatically generates the necessary linkIDs.
Indexed attributes
Directory searches for attributes that are indexed are more efficient than searches for attributes that are not indexed. Attributes are indexed when the least significant bit in their searchFlags attribute is set to the value 1. Changing the value of the bit to 1 dynamically builds an index; changing the value to 0 or deleting it removes an index for the attribute in question. The index is built automatically by a background thread on the directory server.
The values for indexed attributes are stored in a sorted list. This makes searching much more efficient because the system needs to search only until it locates the area in the list where the value should be, based on the sort. If the value is not there, the system can assume it will not find the value anywhere else in the list, and it can terminate the search. When attributes are not indexed, the entire list must be searched to determine whether or not a particular value actually exists.
Indexing requires more storage to maintain the lists, but it makes searching more efficient. Nonindexed attributes are less efficient to search, but they require less storage to maintain. With this in mind, only attributes that are frequently referenced should be indexed. Ideally, indexed attributes are single-value attributes with unique values that are evenly distributed across the set of instances. Multivalue attributes can be indexed, but building the index requires more storage and updating.
Confidential attributes
On domain controllers running Windows Server 2003 with SP1, attributes whose attributeSchema objects are marked with a specific search flag are interpreted as confidential. Attributes that are so marked can be read only by users to whom the following access is granted:
-
READ_PROPERTY
-
CONTROL_ACCESS
The ability to mark attributes as confidential allows administrators to protect attributes from the read access that is granted by default to most users. Rather than changing the defaults that are expected by existing applications, administrators can create new attributes that can be read only by administrators or those to whom access is specifically granted. Because domain controllers must be running Windows Server 2003 with SP1 to recognize the flag that marks the attribute as confidential, protection of marked attributes is fully effective only in environments where all domain controllers have been upgraded to Windows Server 2003 with SP1. In particular, the schema operations master (also known as the schema flexible single-master operations (FSMO) role holder) must be upgraded to Windows Server 2003 with SP1.
By default, Active Directory performs a read-access check on an object in the following cases:
-
When evaluating whether the object matches the search filter
-
When returning attributes of an object that matches the search filter
Default security in Windows 2000 Server and Windows Server 2003 allows read access to the Pre-Windows 2000 Compatible Access group, which usually contains Authenticated Users. Authenticated Users is a security group that includes users whose identities can be authenticated by the server or by a trusted security authority. Because the Pre-Windows 2000 Compatible Access group is granted Read_Property permissions on user objects (including inetOrgPerson) and group objects, it is difficult to introduce a new attribute on these objects that is protected from reading by most users. For example, you might want to add a social security number attribute to the user class.
To solve this problem, Windows Server 2003 SP1 provides a way to mark an attribute as confidential by setting a searchFlags value on the attributeSchema object in the schema. The search flag contains multiple bits representing various properties of an attribute. In Windows 2000 Server and Windows Server 2003 schemas, the searchFlags attribute has six bits that can be set. (See the bits that are defined for the searchFlags attribute in "Attributes for the attributeSchema class" earlier in this section.) For example, a value of 1 in the least significant bit means that the attribute is indexed. The binary form of this flag value is 00000001. A new bit is added in Windows Server 2003 with SP1: A value in bit 128 (10000000) designates the attribute as confidential. Therefore, on a domain controller running Windows Server 2003 with SP1, you can designate an attribute as confidential by setting bit 128 in the searchFlags attribute of the respective attributeSchema object.
Note |
|---|
|
You cannot set this flag on base-schema attributes, such as common-name. |
When an attribute is so designated, in addition to READ_PROPERTY permission (for that attribute or all attributes on that object), CONTROL_ACCESS permission (for that attribute or a property set that contains that attribute) is required to read the attribute.
Note |
|---|
|
When you assign CONTROL_ACCESS permissions to a user or group, you must specify a GUID — in this case, the GUID of the attribute or property set that contains the attribute. |
To set the bit flag when no values are set, you can simply add the value 128 to the searchFlags attribute in the properties of the attributeSchema object for the confidential attribute. If a value is already present in the attribute, perform a bitwise OR operation to add 10000000 to the existing binary value, and then convert to decimal. For example, if the bit is set for indexing and containerized search (00001001), the combined values 10000000 OR 00001001 equal 10001001, translating to a decimal value of 137.
By default, only members of the Administrators built-in group are granted CONTROL_ACCESS to all objects. Therefore, only administrators can read confidential attributes. You can delegate the CONTROL_ACCESS right to any specific group by using the Dsacls command-line tool or by scripting. Dsacls is included in Windows Support Tools. To grant access to a confidential attribute, use Dsacls to grant the CONTROL_ACCESS right (CA) to the required group or user. Doing so introduces a way to impose additional security checks that control read access to selected attributes. For more information about Dsacls, see Dsacls.exe in the Active Directory Management Support Tools section of Windows Support Tools on the Microsoft Web site at http://go.microsoft.com/fwlink/?LinkId=43235. For more information about property sets and CONTROL_ACCESS permissions, see the Security Descriptors and Access Control Lists Technical Reference.
Syntaxes
The syntax for an attribute defines the storage representation, byte ordering, and matching rules for comparisons of property types. The syntax defines whether the attribute value must be a string, a number, or a unit of time. Each attribute of every object is associated with exactly one syntax. The syntaxes are not represented as objects in the schema, but they are programmed to be understood by Active Directory. The allowable syntaxes in Active Directory are predefined. You cannot add new syntaxes.
When you define a new attribute, you must specify both the attributeSyntax and the oMSyntax numbers of the syntax that you want for that attribute. The attributeSyntax number is an object identifier, and the oMSyntax number is an integer. oMSyntax is defined by the XOM specification. Using this model, the syntax can provide detailed syntax definitions. For example, distinct oMSyntax attributes distinguish several types of printable strings, according to such factors as the supported character set and whether case is significant. The following table lists the valid syntaxes for attributes in the Active Directory schema.
Valid Syntaxes for Attributes in the Active Directory Schema
|
Syntax
|
attributeSyntax
|
oMSyntax
|
ASN 1-Encoded Object Identifier
|
Description
|
|---|
Undefined | 2.5.5.0 | | \x550500 | Not a legal syntax |
Object(DN-DN) | 2.5.5.1 | 127 | \x550501 | The fully qualified name of an object in the directory |
String(Object-Identifier) | 2.5.5.2 | 6 | \x550502 | The object identifier |
Case-Sensitive String | 2.5.5.3 | 27 | \x550503 | General string — differentiates uppercase and lowercase |
CaseIgnoreString(Teletex) | 2.5.5.4 | 20 | \x550504 | Teletex — does not differentiate uppercase and lowercase |
String(Printable), String(IA5) | 2.5.5.5 | 19, 22 | \x550505 | Printable string or IA5-String Both character sets are case sensitive. |
String(Numeric) | 2.5.5.6 | 18 | \x550506 | A sequence of digits |
Object(DN-Binary) | 2.5.5.7 | 127 | \x550507 | A distinguished name plus a binary large object |
Boolean | 2.5.5.8 | 1 | \x550508 | TRUE or FALSE values |
Integer, Enumeration | 2.5.5.9 | 2, 10 | \x550509 | A 32-bit number or enumeration |
String(Octet) | 2.5.5.10 | 4 | \x55050A | A string of bytes |
String(UTC-Time), String(Generalized-Time) | 2.5.5.11 | 23, 24 | \x55050B | UTC time or generalized-time |
String(Unicode) | 2.5.5.12 | 64 | \x55050C | Unicode string |
Object(Presentation-Address) | 2.5.5.13 | 127 | \x55050D | Presentation address |
Object(DN-String) | 2.5.5.14 | 127 | \x55050E | A DN-String plus a Unicode string |
String(NT-Sec-Desc) | 2.5.5.15 | 66 | \x55050F | A Windows NT security descriptor |
LargeInteger | 2.5.5.16 | 65 | \x550510 | A 64-bit number |
String(Sid) | 2.5.5.17 | 4 | \x550511 | Security identifier (SID) |
Object identifiers
Object identifiers are unique numeric values that are granted by various issuing authorities to identify data elements, syntaxes, and other parts of distributed applications. Because they are globally unique, object identifiers ensure that the objects that are defined by these issuing authorities do not conflict with one another when different directories, such as Active Directory and Novell Directory Services, are used concurrently within a global directory namespace.
Object identifiers are found in Open Systems Interconnection (OSI) applications, X.500 directories, applications that use Simple Network Management Protocol (SNMP), and other applications in which uniqueness is important. Object identifiers are based on a tree structure in which a superior issuing authority allocates a branch of the tree to a subordinate authority, which in turn allocates subbranches of the tree.
LDAP requires a directory service, such as Active Directory, to identify object classes and attributes with an object identifier syntax. The object identifier is the value for the governsID attribute in a classSchema object and for the attributeID attribute in an attributeSchema object. These are required attributes; therefore, object identifiers are necessary when you create new classes or attributes.
Object identifiers in the Active Directory base schema include some object identifiers that are issued by the International Organization for Standardization (ISO) for X.500 classes and attributes and some object identifiers that are issued by Microsoft. Object identifier notation is a dotted string of nonnegative numbers, for example, 1.2.840.113556.1.5.4. The components of this object identifier are shown in the following table.
Components of an Object Identifier (1.2.840.113556.1.5.4)
|
Numerical Values of the Object Identifier
|
What the Numerical Values Mean
|
|---|
1 | ISO (“root” authority) issued 1.2 to ANSI. |
2 | ANSI issued 1.2.840 to the USA. |
840 | USA issued 1.2.840.113556 to Microsoft. |
113556 | Microsoft internally manages several object identifier branches under 1.2.840.113556 that include the following three identifiers. |
1 | A branch called Active Directory that includes the following two identifiers. |
5 | A branch called Classes that includes the following identifier. |
4 | A class called Builtin-Domain. |
Object identifiers ensure that every object is interpreted appropriately, for example, that a telephone number is not mistaken for an employee number. A series of widely used objects and attributes is standardized for use in object identifiers. New object identifiers are issued by standards authorities, and they form a hierarchy below which new object identifiers can be managed internally.
Most countries and regions in the world have an identified National Registration Authority (NRA) that is responsible for issuing object identifiers to enterprises. In the United States, the NRA is the American National Standards Institute (ANSI). The NRA issues root object identifiers. An enterprise can register a name for the object identifier as well. A fee is associated with registering root object identifiers and registered names. Contact the NRA for your country or region for details. The ISO recognizes NRAs and maintains a list of contacts on its Web site.
The issuing authority assigns an object identifier space that is a branch of the ISO-International Telecommunication Union (ITU) object identifier tree. For example, your organization might be assigned the space 1.2.840.111111. You can extend this space internally within the constraints of the structure of an object identifier. You can subdivide this space further (by appending dotted decimals to the object identifier root) and assign these subspaces to various divisions within your organization. Each division, in turn, can further subdivide the subspace that is allotted to it.
For the example object identifier 1.2.840.111111, your organization might use the subspace 1.2.840.111111.1.4 for attributes and the subspace 1.2.840.111111.1.5 for classes. An internal issuing authority in your organization, using an Administrator account, might then allocate object identifiers from this space when requested. The governsID attribute on every classSchema object and the attributeID attribute on every attributeSchema object are mandatory attributes that contain an object identifier string. In this example, all of your organization-created classSchema objects have a governsID attribute of the form 1.2.840.111111.1.5.x, where x is a decimal number. Similarly, all of your organization-created attributeSchema objects have an attributeID attribute of the form 1.2.840.111111.1.4.x.
Microsoft also offers a free object identifier registration service.
The classSchema object specifies the various attributes of the class with which it is associated. Among other things, it defines the following constraints for objects that are instances of the class:
- mustContain attributes, which include mandatory attributes that must be present on any object that is an instance of this class
- mayContain attributes, which include optional attributes that may be found on an object that is an instance of this class
-
Hierarchy rules that determine the possible parents in the directory tree of an object that is an instance of the class
An object can have attributes that belong only to either the mustContain list or the mayContain list for the class.
The classSchema object is essentially a template that contains the rules for creating objects in an Active Directory class. When a new object is created in a class, the classSchema object ensures that this new object has the same attributes as all other objects in the class.
The classSchema object contains, among other things, the following information:
-
The LDAP display name of the class
-
The object identifier for the class
-
The GUID for the class
-
The attributes that must be present for an instance of the class
-
Other attributes that can be present for an instance of the class
-
The classes to which the parent of instances of this class may belong
-
The superclass from which this class inherits characteristics
-
Other auxiliary classes from which this class inherits attributes
-
The type of class (abstract, structural, or auxiliary)
-
The default hiding state for the class. If you do not want instances of the class to be displayed by the end-user user interface (UI), you can define the class as hidden by default.
Attributes for classSchema objects
The following table lists the attributes that a classSchema object can have.
Attributes for a classSchema Object
|
Attribute
|
Syntax
|
Mandatory?
|
Multivalue?
|
Description
|
|---|
cn | Unicode | Yes | No | Descriptive relative distinguished name for the schema object |
governsID | Object identifier | Yes | No | The object identifier that uniquely identifies this class |
lDAPDisplayName | Unicode | Yes | No | The name by which LDAP clients identify this class |
schemaIDGUID | String(Octet) | Yes, but defaulted | No | The GUID that uniquely identifies this class |
rDNAttID | Object identifier | No | No | The relative distinguished name type of instances of this class (OU, CN) |
subClassOf | Object identifier | Yes | No | The class from which this object inherits attributes |
systemMustContain | Object identifier | No | Yes | The list of mandatory attributes for instances of this class This list cannot be changed. |
mustContain2 | Object identifier | No | Yes | The mandatory attributes for instances of this class |
systemMayContain | Object identifier | No | Yes | The optional attributes for instances of this class |
mayContain2 | Object identifier | No | Yes | The optional attributes for instances of this class |
systemPossSuperiors2 | Object identifier | No | Yes | The classes that can be parents of this class in the directory hierarchy After the class is created, this property cannot be changed. |
possSuperiors2 | Object identifier | No | Yes | The classes that can be parents of this class in the directory hierarchy For an existing classSchema object, values can be added to this property but not removed. |
systemAuxiliaryClass2 | Object identifier | No | Yes | The auxiliary classes from which this class inherits its optional (mayContain) and mandatory (mustContain) attributes After creation of the class, this property cannot be changed. |
auxiliaryClass2 | Object identifier | No | Yes | The auxiliary classes from which this class inherits its optional (mayContain) and mandatory (mustContain) attributes This is a multivalue property that specifies the auxiliary classes that this class inherits from. For an existing classSchema object, values can be added to this property but not removed. |
defaultHidingValue | BOOL | No | No | The default hiding state for the class If you do not want instances of the class displayed in the UI for Active Directory admin tools New menus, you can define the class as hidden. |
defaultSecurityDescriptor | String(Octet) | No | No | The default security descriptor that is assigned to new instances of this class if no security descriptor is specified during creation of the class or that is merged into a security descriptor if a security descriptor is specified |
objectClassCategory | Integer | Yes | No | Class types are defined as follows: 88 Class = 0 Structural = 1 Abstract = 2 Auxiliary = 3 The 88 class type is included for compatibility with older directories. Active Directory does not use 88 class type objects, and they should not be used in defining new classes for Active Directory. |
systemOnly | BOOL | No | No | An attribute of a classSchema object If it is set to TRUE, only the system can create and modify instances of this class. If it is set to FALSE, modifications can also be made by users who have appropriate permissions. |
objectClass | Object Identifier | Yes | Yes | This object’s class, which is always classSchema |
nTSecurityDescriptor | NT-Sec-Desc | Yes | No | The security descriptor on the classSchema object |
defaultObjectCategory | Distinguished name | Yes | No | The default object category of new instances of this class If none has been specified, the objectClass value is used. |
The attributes in a classSchema object’s mustContain attribute list are not the complete set of attributes that must be present for an instance of a class to exist. For example, in a class A, the classSchema object B specifies a list of mustContain attributes that an instance of A must have through the systemMustContain and mustContain attributes. However, because mandatory attributes are also inherited, the complete list of attributes for an instance of class A includes the inherited mustContain attributes from all classes from which B inherits, that is, all classes in the subClassOf and auxiliaryClass lists for the classSchema object B. The mayContain attributes for object B are also defined this way. The possSuperiors attributes are defined this way as well, except that possSuperiors attributes are inherited only from classes in the subClassOf list, not from the classes in the auxiliaryClass list.
Mandatory attributes
Mandatory attributes are object attributes for which you must specify values. If you do not specify a value for a mandatory attribute, the attribute receives a default value or the object is not created until you specify a value for the attribute. The object’s mandatory attributes are determined by the class to which the object belongs.
Some mandatory attributes are inherited. Because every classSchema object belongs to a superclass called Top in the class hierarchy, each classSchema object inherits the mandatory attributes that belong to Top. The following table lists the mandatory attributes that every object inherits from Top. To see a graphical representation of the Active Directory class hierarchy, see the figure under “Object class hierarchy” later in this section.
Mandatory Attributes That All classSchema Objects Inherit
|
Inherited Mandatory Attribute
|
Default Status
|
|---|
nTSecurityDescriptor | Set to a default value if not specified. The default value depends on the default security descriptor for the classSchema object. |
objectCategory | Automatically set to the value of the default object category of the class, which is usually the class itself. Can be changed after the class is created. |
objectClass | No default. An administrator must specify the class. |
You can view an object’s mandatory attributes by using the Active Directory Schema snap-in. The attributes are displayed on the Attributes tab in the properties dialog box for the object. Because some of an object’s mandatory attributes are inherited from its parent class, you might need to view the attributes of the parent class to identify all the mandatory attributes of the object.
System and changeable attribute pairs
Some properties of a class-definition object are contained in pairs of attributes, in which the value of one of these attributes can be changed by administrators and the value of the other attribute cannot be changed. These attribute pairs are as follows:
- mustContain/systemMustContain
- mayContain/systemMayContain
- possSuperiors/systemPossSuperiors
- auxiliaryClass/systemAuxiliaryClass
In each of these pairs, the value of the attribute that begins with the word “system” cannot be changed by administrators. This enables Active Directory to protect certain key attributes of certain classes and to ensure that the schema stays consistent and usable. System-only properties can be changed only by the Directory System Agent (DSA). System-only properties are those properties on which Windows Server 2003 and Active Directory depend for normal operations. For example, the attributeID attribute and the governsID attribute in the schema are system-only attributes. The values of the other (nonsystem) attributes in each pair can be changed by administrators.
Different categories of object classes make it possible to define structure in the directory. The 1993 X.500 specification requires that object classes be assigned to one of three categories:
-
Structural
-
Abstract
-
Auxiliary
A fourth category, which is referred to as 88 classes, is associated with object classes, although this category is not part of the 1993 specification. The 88 class category is in the specification that existed before 1993, and it should not be used for adding classes to Active Directory.
Structural classes
Structural classes are the only classes that can have instances in the directory. That is, you can create directory objects whose class is one of the structural classes. A structural class:
-
Can be used in defining the structure of the directory.
-
Is derived from either an abstract class or another structural class.
-
Can include any number of auxiliary classes in its definition.
This type of class is specified by a value of 1 in the objectClassCategory attribute.
Abstract classes
Abstract classes are templates that are used to derive new structural classes. Abstract classes cannot be instantiated in the directory. This means that no object can belong only to an abstract class; each object of an abstract class also belongs to some structural subclass of that class. A new abstract class can be derived from an existing abstract class. This type of class is specified by a value of 2 in the objectClassCategory attribute. Abstract classes only provide attributes for subordinate classes, which are called subclasses. A subclass contains all mandatory and optional attributes of the class from which it is derived (its superclass) in addition to those attributes that are specific to the class itself. Likewise, the subclass of that class contains all attributes of both superclasses, and so forth.
Auxiliary classes
Auxiliary classes are like include files; they contain a list of attributes. Adding an auxiliary class to the definition of a structural class or an abstract class’ adds the auxiliary classs attributes to the definition. An auxiliary class cannot be instantiated in the directory, but new auxiliary classes can be derived from existing auxiliary classes. This type of class is specified by a value of 3 in the objectClassCategory attribute. For example, the securityPrincipal class is an auxiliary class, and it derives its attributes from the parent abstract class called Top. Although you cannot create a security principal object in the directory (because auxiliary classes cannot have instances), you can create an object of the structural class user, which has the securityPrincipal class as an auxiliary class. The attributes of the securityPrincipal class help the system recognize the user object as a security account. Similarly, the group class has securityPrincipal as an auxiliary class.
The behavior of auxiliary classes has changed in Windows Server 2003. In Windows 2000 Server, changes that are made to an auxiliary class affect its parent class as well as all instances of the parent object. For example, adding an auxiliary class called pager to the structural class user affects all instances of user, which is all of the user accounts that are created with the user class.
In Windows Server 2003, auxiliary classes can be assigned dynamically to individual instances of classes, rather than being applied automatically to all instances. For example, you can assign the pager auxiliary class to only those users who need it.
88 classes
Classes that were defined before 1993 are not required to fall into one of the preceding categories; assigning classes to categories was not required in the X.500 1988 specification. Classes that were defined before the X.500 1993 standards are assigned to the 88 class. This type of class is specified by a value of 0 in the objectClassCategory attribute. Do not use 88 classes or define new 88 classes.
Object class hierarchy
Inheritance, which is also referred to as derivation, is the ability to build new object classes from existing object classes. A new object is defined as a subclass of its parent object. A subclass is a class that inherits from some other class; for example, a subclass inherits structure and content rules from the parent class. The parent object becomes a superclass of the new object. A superclass is a class from which one or more other classes inherit information. The inherited information includes mandatory and optional attributes (systemMustContain, mustContain, systemMayContain, and mayContain) and the parent classes in the directory hierarchy (systemPossSuperiors and possSuperiors). This relationship between the superclasses and their subclasses represents the object class hierarchy, which is illustrated in the following figure.
Object Class Hierarchy
.gif)
All structural object classes are subclasses, directly or indirectly, of a single abstract object class, which is called Top. Every object that is represented in the directory belongs to Top, and as a result every entry must have an objectClass attribute. When you create a new class, you must specify the superclass. If you do not create a subclass of an existing class, the new class is a subclass of Top.
A new class can inherit mandatory and optional attributes from more than one existing class. However, any additional classes must be specified by the auxiliaryClass attribute.
Note
-
If you later add another attribute to a class that has subclasses or auxiliary subclasses, the new attribute is automatically added to the subclasses after the schema cache has been updated.