You can group the entries contained within your directory to simplify the management of user accounts. Netscape Directory Server (Directory Server) supports a variety of methods for grouping entries and sharing attributes between entries.
This chapter describes the following grouping mechanisms and their procedures:
To take full advantage of the features offered by roles and class of service, determine your directory topology in the planning phase of your directory deployment. Refer to the Netscape Directory Server Deployment Guide for more information.
Groups are a mechanism for associating entries for ease of administration. This mechanism was provided with previous versions of Directory Server and should be used primarily for compatibility with older versions of the server.
The following sections describe managing static and dynamic groups. For a conceptual overview of groups, refer to the Netscape Directory Server Deployment Guide. For more information about administering groups, refer to Managing Servers with Netscape Console.
Static groups allow you to group entries by specifying the same group value in the DN attribute of any number of users. This section includes the following procedures for creating and modifying static groups:
|
|
|
|
If you have a user that is remote from the definition of the static group, then you can use the Referential Integrity Plug-in to ensure that deleted user entries are automatically deleted from the static group. For more information about using referential integrity with chaining, refer to Configuring the Chaining Policy.
|
|
|
|
|
|
|
|
The Console for managing static groups may not display all possible selections during a search operation if there is no VLV index for users' search. You may notice this problem only when the number of users is 1000 or more and there is no VLV index for search. To work around the problem, create a VLV index for the users suffix with filter (objectclass=person) and scope sub-tree.
|
|
|
|
|
Dynamic groups filter users based on their DN and include them in a single group. This section contains the following procedures for creating and modifying dynamic groups:
|
|
|
The Console for managing dynamic groups may not display all possible selections during a search operation if there is no VLV index for users' search. You may notice this problem only when the number of users is 1000 or more and there is no VLV index for search. To work around the problem, create a VLV index for the users suffix with filter (objectclass=person) and scope sub-tree.
|
|
|
|
|
Roles are a new entry grouping mechanism that unify the static and dynamic groups described in the previous sections. Roles are designed to be more efficient and easier to use for applications. For example, an application can locate the role of an entry, rather than select a group and browse the members list.
This section contains the following topics:
Roles unify the static and dynamic group concept supported by previous versions of Directory Server.
With managed roles, you can do everything you would normally do with static groups, and you can filter members using filtered roles as you used to do with dynamic groups. Roles are easier to use than groups, more flexible in their implementation, and reduce client complexity.
However, evaluating roles is more
resource-intensive because the server does the work for the client
application. With roles, the client application can check role
membership by searching the
nsRole
attribute. The
nsRole attribute is a computed attribute, which identifies to
which roles an entry belongs; the
nsRole attribute is not stored with the entry itself. From the
client application point of view, the method for checking membership is
uniform and is performed on the server side.
|
|
|
|
Use the nsRole
attribute, not the nsRoleDN
attribute, to evaluate role membership.
|
|
|
|
|
Each role has members, or entries that possess the role. You can specify members either explicitly or dynamically. How you specify role membership depends upon the type of role you are using. Directory Server supports three types of roles:
For more information about how roles work, refer to Netscape Directory Server Deployment Guide.
The concept of activating/inactivating roles is introduced to enable you to activate/inactivate groups of entries in just one operation. That is, you can temporarily disable the members of a role by inactivating the role to which they belong.
When a role is said to be inactivated, it does not mean that you cannot bind to the server using that role entry. The meaning of an inactivated role is that you cannot bind to the server using any of the entries that belong to that role--the entries that belong to an inactivated role will have the nsaccountlock attribute set to true.
In the case of the nested role, an inactivated nested role means that you cannot bind to the server using an entry that belongs to a role that is a member of the nested role. All the entries that belong to a role that directly or indirectly are members of the nested role (one may have several levels of nested roles) will have nsaccountlock set to true.
This section contains the following procedures for creating and modifying roles:
When you create a role, you need to decide whether a user can add themselves or remove themselves from the role. Refer to Using Roles Securely for more information about roles and access control.
Managed roles allow you to create an explicit enumerated list of members. Managed roles are added to entries by adding the nsRoleDN attribute to the entry.
To create and add members to a managed role:
You assign entries to a filtered role depending upon a particular attribute contained by each entry. You do this by specifying an LDAP filter. Entries that match the filter are said to possess the role.
To create and add members to a filtered role:
Nested roles allow you to create roles that contain other roles. Before you create a nested role, another role must exist. When you create a nested role, the Console displays a list of the roles available for nesting. The roles nested within the nested role are specified using the nsRoleDN attribute.
To create and add members to a nested role:
To view or edit a role associated with an entry from the Console:
You can temporarily disable the members of a role by inactivating the role to which they belong. Inactivating a role inactivates the entries possessed by the role, not the role itself.
To temporarily disable the members of a role:
To reactivate a disabled role:
Deleting a role deletes the role only, not its members.
|
|
|
|
Deleting a role deletes the role entry but does not delete the nsRoleDN attribute for each role member. If you want to delete the nsRoleDN attribute for each role member, enable the Referential Integrity Plug-in, and configure it to manage the nsRoleDN attribute. For more information on the Referential Integrity Plug-in, see Maintaining Referential Integrity.
|
|
|
|
|
Roles inherit from the ldapsubentry object class, which is defined in the ISO/IEC X.509 standard. In addition, each type of role has two specific object classes that inherit from the nsRoleDefinition object class. Once you create a role, you assign members to it as follows:
Table
5-1 lists the new object classes and attributes associated with
each type of role.
Table 5-1
Object Classes and Attrributes for Roles
|
|
|
|
In some cases, you need to protect the value of the nsRoleDN attribute with an ACI, as the attribute is writable. For more information about security and roles, refer to Using Roles Securely.
|
|
|
|
|
You want to create a role to be assigned to all marketing staff. Run the ldapmodify script as follows:
ldapmodify -D "cn=Directory Manager" -w secret -h host -p 389
Specify the managed role as follows:
dn:
cn=Marketing,ou=people,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
nsRoleDefinition
objectclass:
nsSimpleRoleDefinition
objectclass:
nsManagedRoleDefinition
cn: Marketing
description:
managed role for marketing staff
Notice that the nsManagedRoleDefinition object class inherits from the LDAPsubentry, nsRoleDefinition, and nsSimpleRoleDefinition object classes.
Assign the role to a marketing staff member named Bob by doing an ldapmodify as follows:
ldapmodify -D
"cn=Directory Manager" -w secret -h host -p 389
dn:
cn=Bob,ou=people,
dc=example,dc=com
changetype: modify
add: nsRoleDN
nsRoleDN:
cn=Marketing,ou=people,
dc=example,dc=com
The nsRoleDN attribute present in the entry indicates that the entry is a member of a managed role, the marketing managed role cn=Marketing,ou=people, dc=example,dc=com.
You want to set up a filtered role for sales managers. Run the ldapmodify script as follows:
ldapmodify -D "cn=Directory Manager" -w secret -h host -p 389
Specify the filtered role as follows:
dn:
cn=SalesManagerFilter,ou=people,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
nsRoleDefinition
objectclass:
nsComplexRoleDefinition
objectclass:
nsFilteredRoleDefinition
cn:
SalesManagerFilter
nsRoleFilter:
o=sales managers
Description:
filtered role for sales managers
Notice that the nsFilteredRoleDefinition object class inherits from the LDAPsubentry, nsRoleDefinition, and nsComplexRoleDefinition object classes. The nsRoleFilter attribute specifies the o (organization) attributes that contain the value of sales managers.
The following entry matches the filter (possesses the o attribute with the value sales managers), and, therefore, it is a member of this filtered role:
dn:
cn=Pat,ou=people,dc=example,dc=com
objectclass:
person
cn: Pat
sn: Pat
userPassword:
bigsecret
o: sales
managers
You want to create a role that contains both the marketing staff and sales managers contained by the roles you created in the previous examples. The nested role you created using ldapmodify appears as follows:
dn:
cn=MarketingSales,ou=people,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
nsRoleDefinition
objectclass:
nsComplexRoleDefinition
objectclass:
nsNestedRoleDefinition
cn:
MarketingSales
nsRoleDN:
cn=SalesManagerFilter,ou=people,dc=example,dc=com
nsRoleDN:
cn=Marketing,ou=people,dc=example,dc=com
Notice the nsNestedRoleDefinition object class inherits from the LDAPsubentry, nsRoleDefinition, and nsComplexRoleDefinition object classes. The nsRoleDN attributes contain the DN of the marketing managed role and the sales managers filtered role.
Both of the users in the previous examples, Bob and Pat, would be members of this new nested role.
Not every role is suitable for use in a security context. When creating a new role, consider how easily the role can be assigned to and removed from an entry. Sometimes it is appropriate for users to be able to add or remove themselves easily from a role. For example, if you had an interest group role called Mountain Biking, you would want interested users to add themselves or remove themselves easily.
However, in some security contexts, it is inappropriate to have such open roles. Consider account inactivation roles. By default, account inactivation roles contain ACIs defined for their suffix. When creating a role, the server administrator decides whether a user can assign themselves to or remove themselves from the role.
For example, user A possesses the managed role, MR. The MR role has been locked using account inactivation through the command-line. This means that user A cannot bind to the server because the nsAccountLock attribute is computed as true for that user. However, suppose the user was already bound and noticed that he is now locked through the MR role. If there are no ACIs preventing him, the user can remove the nsRoleDN attribute from his entry and unlock himself.
To prevent users from removing the nsRoleDN attribute, use the following ACIs depending upon the type of role being used.
For more information about account inactivation, see Inactivating Users and Roles.
A class of service (CoS) allows you to share attributes between entries in a way that is transparent to applications. CoS simplifies entry management and reduces storage requirements.
There are two methods for creating and managing CoS: with Directory Server Console or through the command-line. The following sections describe CoS in more detail and provide the procedures for managing CoS through both the Console and the command-line:
Clients of the Directory Server read the attributes on a user's entry. With CoS, some attribute values may not be stored with the entry itself. Instead, they are generated by class of service logic as the entry is sent to the client application.
Each CoS is comprised of the following two types of entry in your directory:
The CoS definition entry and template entry
interact to provide attribute information to their target entries, any
entry within the scope of the CoS.
|
|
|
|
LDAP search requests containing a filter that references an attribute defined by a CoS may return unexpected results. Take care when deciding which attributes to generate using a CoS.
|
|
|
|
|
The following sections describe the entries that make up a CoS in more detail and provide examples of each type of CoS.
The CoS definition entry is an instance of the cosSuperDefinition object class. The CoS definition entry also contains an object class that specifies the type of template entry it uses to generate the entry. You can specify three different object classes depending upon the type of CoS you want to use. The target entries share the same parent as the CoS definition entry.
There are three types of CoS, defined using three types of CoS definition entries:
For more information about the object classes and attributes associated with each type of CoS, refer to Managing CoS from the Command-Line.
If the CoS logic detects that an entry contains an attribute for which the CoS is generating values, the CoS, by default, supplies the client application with the attribute value in the entry itself. However, you can use the CoS definition entry to control this behavior.
The CoS template entry contains the value or values of the attributes generated by the CoS logic. The CoS template entry contains a general object class of cosTemplate. The CoS template entries for a given CoS are stored in the directory tree along with the CoS definition.
The relative distinguished name (RDN) of the template entry is determined by one of the following:
You create a pointer CoS that shares a common postal code with all of the entries stored under dc=example,dc=com. The three entries for this CoS appear as illustrated in Figure 5-1.

In this example, the template entry is identified by its DN, cn=exampleUS,cn=data, in the CoS definition entry. Each time the postalCode attribute is queried on the entry cn=wholiday,ou=people,dc=example,dc=com, the Directory Server returns the value available in the template entry cn=exampleUS,cn=data.
You can create an indirect CoS that uses the manager attribute of the target entry to identify the template entry.
The three CoS entries appear as illustrated in Figure 5-2.

In this example, the target entry for William Holiday contains the indirect specifier, the manager attribute. William's manager is Carla Fuentes, so the manager attribute contains a pointer to the DN of the template entry, cn=Carla Fuentes,ou=people,dc=example,dc=com. The template entry in turn provides the departmentNumber attribute value of 318842.
You can create a classic CoS that uses a combination of the template DN and a CoS specifier to identify the template entry containing the postal code.
The three CoS entries appear as illustrated in Figure 5-3:

In this example, the Cos definition entry's cosSpecifier attribute specifies the employeeType attribute. This attribute, in combination with the template DN, identify the template entry as cn=sales,cn=exampleUS,cn=data. The template entry then provides the value of the postalCode attribute to the target entry.
This section describes creating and editing CoS through the Directory Server Console. It includes the following sections:
The following procedure describes changing the description and attributes generated on the target entry of an existing class of service.
The following procedure describes deleting a CoS:
Because all configuration information and template data is stored as entries in the directory, you can use standard LDAP tools for CoS configuration and management. This section contains the following topics:
Each type of CoS
requires a particular object class to be specified in the definition
entry. All CoS definition object classes inherit from the
LDAPsubentry object class and the
cosSuperDefinition object class. Table 5-2 lists the object classes associated with
each type of CoS definition entry.
Table
5-3 lists attributes that you can use in your CoS definition
entries.
The cosAttribute attribute allows an additional qualifier after the attribute value. You can use the following qualifiers:
If you do not indicate a qualifier, default is assumed.
For example, you might create a pointer CoS definition entry that contains an override qualifier as follows:
dn:
cn=pointerCoS,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
cosSuperDefinition
objectclass:
cosPointerDefinition
cosTemplateDn:
cn=exampleUS,cn=data
cosAttribute:
postalCode override
This pointer CoS definition entry indicates
that it is associated with a template entry, cn=exampleUS,cn=data,
that generates the value of the postalCode
attribute. The override
qualifier indicates that this value will take precedence over the value
stored by the entries for the postalCode
attribute.
|
|
|
|
If an entry contains an attribute value generated by a CoS, you cannot manually update the value of the attribute if it is defined with the operational or override qualifiers.
|
|
|
|
|
For more information about the attributes, refer to the Netscape Directory Server Configuration, Command, and File Reference.
Now that you have been introduced to the
object classes and attributes used by a CoS definition, it is time to
put them together to create the definition entry itself. Table 5-4 describes the CoS
definition for each type of CoS.
The CoS template entry also inherits from
the LDAPsubentry
object class. Each template entry is an instance of the
cosTemplate object class.
The CoS template entry also contains the attribute generated by the CoS (as specified in the cosAttribute attribute of the CoS definition entry) and the value for that attribute.
For example, a CoS template entry that provides a value for the postalCode attribute follows:
dn:cn=exampleUS,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
postalCode:
44438
It is possible to create CoS templates that
compete with each other to provide an attribute value. For example, you
might have a multi-valued
cosSpecifier in your CoS definition entry. In such a case, you
can specify a template priority on each template entry to determine which template provides the
attribute value. Set the template priority using the
cosPriority attribute. This attribute represents the global
priority of a particular template. A priority of zero is the highest
priority.
Templates that contain no cosPriority attribute are considered the lowest priority. In the case where two or more templates are considered to supply an attribute value and they have the same (or no) priority, a value is chosen arbitrarily. The behavior for negative cosPriority values is not defined in Directory Server; do not enter negative values. Also, the cosPriority attribute is not supported by indirect CoS.
For example, a CoS template entry for generating a department number appears as follows:
dn:
cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
departmentNumber:
71776
cosPriority: 0
This template entry contains the value for
the
departmentNumber attribute. It has a priority of zero, meaning
this template takes precedence over any other conflicting templates
that define a different departmentNumber
value.
The following sections provide examples of template entries along with examples of each type of CoS definition entry.
You want to create a pointer CoS that shares a common postal code with all entries in the dc=example,dc=com tree.
To add a new pointer CoS definition entry to the dc=example,dc=com suffix, you do an ldapmodify as follows:
ldapmodify -a -D "cn=directory manager" -w secret -h host -p 389
The ldapmodify utility binds to the server and prepares it to add information to the configuration file.
Next, you add the pointer CoS definition to the dc=example,dc=com root suffix as follows:
dn:
cn=pointerCoS,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
cosSuperDefinition
objectclass:
cosPointerDefinition
cosTemplateDn:
cn=exampleUS,cn=data,dc=example,dc=com
cosAttribute:
postalCode
Next, you create the template entry as follows:
dn:
cn=exampleUS,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
postalCode:
44438
The CoS template entry (cn=exampleUS,cn=data,dc=example,dc=com) supplies the value stored in its postalCode attribute to any entries located under the dc=example,dc=com suffix. These entries are the target entries.
This indirect CoS uses the team attribute of the target entry to identify the CoS template entry.
First, you add a new indirect CoS definition entry to the dc=example,dc=com suffix, using ldapmodify as follows:
ldapmodify -a -D "cn=directory manager" -w secret -h host -p 389
The ldapmodify utility binds to the server and prepares it to add information to the configuration file.
Next, you add the indirect CoS definition to the dc=example,dc=com root suffix as follows:
dn:
cn=indirectCoS,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
cosSuperDefinition
objectclass:
cosIndirectDefinition
cosIndirectSpecifier:
manager
cosAttribute:
departmentNumber
Next, you create the template entry for manager Carla Fuentes as follows:
dn:cn=Carla
Fuentes,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
departmentNumber:
318842
You create a second template entry for manager Sue Jacobs as follows:
dn:cn=Sue
Jacobs,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
departmentNumber:
71776
The definition entry looks in the target entries (the entries under dc=example,dc=com) for entries containing the manager attribute (because this attribute is specified in the cosIndirectSpecifier attribute of the definition entry). The manager attribute of the target entry can point to one of two templates, cn=Carla Fuentes,cn=data,dc=example,dc=com and cn=Sue Jacobs,cn=data,dc=example,dc=com. The department number is different depending upon the manager.
You want to create a classic CoS that automatically generates postal codes using a combination of the template DN and the attribute specified in the cosSpecifier attribute.
First, you add a new classic CoS definition entry to the dc=example,dc=com suffix, using ldapmodify as follows:
ldapmodify -a -D "cn=directory manager" -w secret -h host -p 389
The ldapmodify utility binds to the server and prepares it to add information to the configuration file.
Next, you add the indirect CoS definition to the dc=example,dc=com root suffix as follows:
dn:
cn=classicCoS,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
cosSuperDefinition
objectclass:
cosClassicDefinition
cosTemplateDn:
cn=exampleUS,cn=data,dc=example,dc=com
cosSpecifier:
employeeType
cosAttribute:
postalCode override
Next, you create the template entries for the sales and marketing departments as follows:
dn:
cn=sales,cn=exampleUS,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
postalCode:
44438
dn:
cn=marketing,cn=exampleUS,cn=data,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectclass:
cosTemplate
postalCode:
99111
The classic CoS definition entry applies to all entries under the dc=example,dc=com suffix. Depending upon the combination of employeeType attribute found in the entry and the cosTemplate DN, it can arrive at one of two templates. One, the sales template, provides a postal code specific to employees in the sales department. The marketing template provides a postal code specific to employees in the marketing department.
You can create classic CoS schemes that generate attribute values for an entry based on the role possessed by the entry. For example, you could use role-based attributes to set the server look through limit on an entry-by-entry basis.
To create a role-based attribute, use the nsRole attribute as the cosSpecifier in the CoS definition entry of a classic CoS. Because the nsRole attribute can be multi-valued, you can define CoS schemes that have more than one possible template entry. To resolve the ambiguity of which template entry to use, you can include the cosPriority attribute in your CoS template entry.
For example, you can create a CoS that allows members of the manager role to exceed the standard mailbox quota. The manager role exists as follows:
dn:
cn=ManagerRole,ou=people,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
nsRoleDefinition
objectclass:
nsComplexRoleDefinition
objectclass:
nsFilteredRoleDefinition
cn:
ManagerRole
nsRoleFilter:
o=managers
Description:
filtered role for managers
The classic CoS definition entry would look as follows:
dn:
cn=managerCOS,dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
cosSuperDefinition
objectlass:
cosClassicDefinition
cosTemplateDn:
cn=managerCOS,dc=example,dc=com
cosSpecifier:
nsRole
cosAttribute:
mailboxquota override
The cosTemplateDn attribute provides a value that, in combination with the attribute specified in the cosSpecifier attribute (in the example, the nsRole attribute of the target entry), identifies the CoS template entry. The CoS template entry provides the value for the mailboxquota attribute. An additional qualifier of override tells the CoS to override any existing mailboxquota attributes values in the target entry.
The corresponding CoS template entry looks as follows:
dn:cn=
"cn=ManagerRole,ou=people,dc=example,dc=com"
,cn=managerCOS,
dc=example,dc=com
objectclass:
top
objectclass:
LDAPsubentry
objectclass:
extensibleobject
objectlass:
cosTemplate
mailboxquota:
1000000
The template provides the value for the
mailboxquota attribute, 1000000.
|
|
|
|
The role entry and the CoS definition and template entries should be located at the same level in the directory tree.
|
|
|
|
|
The server controls
access to attributes generated by a CoS in exactly the same way as
regular stored attributes. However, access control rules depending upon
the value of attributes generated by CoS will not work.
| Previous |
Contents |
Index |
DocHome | Next |