Your directory is made up of databases over which you can distribute your directory tree. This chapter describes how to create suffixes, the branch points for your directory tree, and how to create the databases associated with each suffix. This chapter also describes how to create database links to reference databases on remote servers and how to use referrals to point clients to external sources of directory data.
This chapter includes the following sections:
For conceptual information on distributing your directory data, refer to the Netscape Directory Server Deployment Guide.
You can store different pieces of your directory tree in different databases and then distribute these databases across multiple servers. Your directory tree contains branch points called nodes. These nodes can either be associated with databases or not. You create nodes using the Directory tab in the Directory Server Console, where you freely edit the entries that appear in your directory tree.
A suffix is a node of your directory tree associated with a particular database. You create these special nodes using the Database tab on the Directory Server Console. For example, a simple directory tree might appear as illustrated in Figure 3-1.

The ou=people suffix and all the entries and nodes below it might be stored in one database, the ou=groups suffix on another database, and the ou=contractors suffix on yet another database.
This section describes creating suffixes on your Directory Server and associating them with databases. This section contains procedures for the following:
You can create both root and sub suffixes to organize the contents of your directory tree. A root suffix is the parent of a sub suffix. It can be part of a larger tree you have designed for your Directory Server. A sub suffix is a branch underneath a root suffix. The data for root and sub suffixes are contained by databases.
Your directory might contain more than one root suffix. For example, an ISP might host several websites, one for example.com and one for netscape.com. The ISP would create two root suffixes, one corresponding to the dc=example,dc=com naming context and one corresponding to the dc=netscape,dc=com naming context. The directory tree appears as illustrated in Figure 3-2.

You can also create root suffixes to exclude portions of your directory tree from search operations. For example, example.com Corporation might want to exclude their European office from a search on the general example.com Corporation directory. To do this, they create two root suffixes. One root suffix corresponds to the general example.com Corporation directory tree, dc=example,dc=com, and one root suffix corresponds to the European branch of their directory tree, l=europe,dc=example,dc=com. From a client application's perspective, the directory tree looks as illustrated in Figure 3-3.

Searches performed by client applications on the dc=example,dc=com branch of example.com Corporation's directory will not return entries from the l=europe,dc=example,dc=com branch of the directory, as it is a separate root suffix.
If example.com Corporation decides that they want to include the entries in the European branch of their directory tree in general searches, they would make the European branch a sub suffix of the general branch. To do this, they create a root suffix example.com Corporation, dc=example,dc=com, and then create a sub suffix beneath it for their European directory entries, l=europe,dc=example,dc=com. From a client application's perspective, the directory tree would appear as illustrated in Figure 3-4.

This section describes creating root and sub suffixes for your directory using either the Directory Server Console or the command-line. This section contains the following procedures:
The following procedure describes creating a suffix and associating it with a database:
The following procedure describes creating a sub suffix under an already existing root or sub suffix:
Use
the
ldapmodify
command-line utility to add new suffixes to your directory
configuration file. The suffix configuration information is stored in
the
cn=mapping tree,cn=config entry.
For example, you want to add a new root suffix to the configuration file using the ldapmodify utility. First, type the following to change to the directory containing the utility:
Then, run ldapmodify as follows:
ldapmodify -a -h example1 -p 389 -D "cn=directory manager" -w secret
The ldapmodify utility binds to the server and prepares it to add an entry to the configuration file.
Next, you create the root suffix entry for example.com Corporation as follows:
dn: cn=
"dc=example,dc=com"
,cn=mapping tree,cn=config
objectclass:
top
objectclass:
extensibleObject
objectclass:
nsMappingTree
nsslapd-state:
backend
nsslapd-backend:
UserData
cn:
dc=example,dc=com
To create a sub suffix for groups under this root suffix, you would do an ldapmodify operation to add the following entry:
dn: cn="ou=groups
,dc=example,dc=com",cn=mapping
tree,cn=config
objectclass:
top
objectclass:
extensibleObject
objectclass:
nsMappingTree
nsslapd-state:
backend
nsslapd-backend:
GroupData
nsslapd-parent-suffix:
"dc=example,dc=com"
cn:
ou=groups,dc=example,dc=com
The following table
describes the attributes
used to configure a suffix entry:
Table 3-1
Suffix Attributes
|
Defines the DN for
the suffix. The DN is contained in quotes. The value you enter takes
the following form:
cn="dc=domain,dc=com",cn=mapping tree, |
|
|
Tells the server that the entry is root or sub suffix entry. It always takes the value nsMappingTree. |
|
|
Determines how the suffix handles operations. This attribute takes the following values:
|
|
|
Defines the LDAP URL of the referral to be returned by the suffix. This attribute can be multi-valued, with one referral per value. This attribute is required when the value of the nsslapd-state attribute is referral or referral on update. |
|
|
Gives the name of the database or database link used to process requests. This attribute can be multi-valued, with one database or database link per value. Refer to Creating and Maintaining Database Links for more information about database links. This attribute is required when the value of the nsslapd-state attribute is set to backend or referral on update. |
|
|
Specifies the shared library to be used with the custom distribution function. This attribute is required only when you have specified more than one database in the nsslapd-backend attribute. Refer to Creating and Maintaining Databases for more information about the custom distribution function. |
|
|
Specifies the name of your custom distribution function. This attribute is required only when you specify more than one database in the nsslapd-backend attribute. Refer to Creating and Maintaining Databases for more information about the custom distribution function. |
|
|
Provides the DN of the parent entry for a sub suffix. By default, this attribute is not present, which means that the suffix is regarded as a root suffix. For example, you
want to create a sub
suffix o=sales,dc=example,dc=com
under the root suffix
dc=example,dc=com. Add the following value to the nsslapd-parent-suffix
attribute of the sub suffix: |
This section describes the following procedures:
Referrals can be used to point a client application temporarily to a different server. For example, you might add a referral to a suffix so that the suffix points to a different server when the database associated with the suffix is taken off-line for maintenance.
For more information on referrals in general, refer to Netscape Directory Server Deployment Guide.
You may want to configure your directory to redirect update and write requests made by client applications to a read-only database.
For example, you can enable referrals for update operations when you have a local copy of the directory data that you do not own. You want the data to be available for searches but not for updates. You do this by enabling referrals only during update requests. When a client application asks to update an entry, the client is referred to the server that owns the data, where the modification request can proceed.
To enable referrals only during update operations:
Sometime, you may need to take down a database for maintenance, but the data the database contains is not replicated. Rather than returning a referral, you can disable the suffix responsible for the database.
Once you disable a suffix, the contents of the database related to the suffix are invisible to client applications when they perform LDAP operations such as search, add, and modify.
The following procedure
describes deleting a suffix:
|
|
|
|
When you delete a suffix, you also delete all database entries and replication information associated with that suffix.
|
|
|
|
|
After you create suffixes for organizing your directory data, you create databases to contain your directory data. Databases are used to store your directory data.
This section contains information about creating databases to contain your directory data, deleting databases, using database encryption, and making databases temporarily read-only.
Directory Server supports the use of multiple databases over which you can distribute your directory tree. There are two ways you can distribute your data across multiple databases:
The following procedure describes adding a database to a suffix you have already created:
|
|
|
|
To see the new suffix in the Directory tab, you first need to create a root entry associated with the suffix. Refer to Creating Directory Entries.
|
|
|
|
|
Use the ldapmodify command-line utility to add a new database to your directory configuration file. The database configuration information is stored in the cn=ldbm database,cn=plugins,cn=config entry.
For example, you want to add a new database to the server example1. First, type the following to change to the directory containing the ldapmodify utility:
Add a new entry to the configuration file by performing an ldapmodify as follows:
ldapmodify -a -h example1 -p 389 -D "cn=directory manager" -w secret
The ldapmodify utility binds to the server and prepares it to add an entry to the configuration file.
Next, you create the entry for the new database as follows:
dn:
cn=UserData,cn=ldbm database,cn=plugins,cn=config
objectclass:
extensibleObject
objectclass:
nsBackendInstance
nsslapd-suffix:
ou=people,
dc=example,dc=com
The entry added corresponds to a database named UserData that contains the data for the root or sub suffix ou=people, dc=example,dc=com.
To create a root or sub suffix from the command-line, refer to Creating Root and Sub Suffixes from the Command-Line. The database name, given in the DN attribute, must correspond with the value in the nsslapd-backend attribute of the suffix entry.
You
can distribute a single suffix across multiple databases. However, to
distribute the suffix, you need to create a custom distribution
function to extend the directory. For more information on creating a
custom distribution function, contact Netscape Professional Services.
The distribution logic is a function declared in a suffix. This function is called for every operation reaching this suffix, including subtree search operations that start above the suffix. You can insert a distribution function into a suffix using both the Console and the command-line.
For information about creating your own custom distribution logic, contact Netscape Professional Services.
Use the ldapmodify command-line utility to add the following attributes to the suffix entry itself:
nsslapd-backend:
Database1
nsslapd-backend:
Database2
nsslapd-backend:
Database3
nsslapd-distribution-plugin:
/full/name/of/a/shared/library
nsslapd-distribution-funct: distribution-function-name
The nsslapd-backend attribute specifies all of the databases associated with this suffix. The nsslapd-distribution-plugin attribute specifies the name of the library that your plug-in uses. The nsslapd-distribution-funct attribute provides the name of the distribution function itself.
For more information about using the ldapmodify command-line utility, refer to Adding and Modifying Entries Using ldapmodify.
This section describes jobs associated with maintaining your directory databases. It includes the following procedures:
When a database is in read-only mode, you cannot create, modify, or delete any entries. For example, you must put a database in read-only mode if you are manually initializing a consumer.
If your Directory Server manages multiple databases, you can place all of them into read-only mode at the same time by placing your entire server in read-only mode. For more information, see Placing the Entire Directory Server in Read-Only Mode.
This section includes procedures for the following:
To place a database in read-only mode from the Directory Server Console:
If you want to manually
place a database into read-only mode, you must change the read-only
attribute,
nsslapd-readonly, to
on. To do so, use the
ldapmodify command-line utility. The
nsslapd-readonly attribute for a particular database is located
in the
cn=database_name,cn=ldbm
database,cn=plugins,cn=config
entry (where
database_name
is the name of the database).
|
|
|
|
By default, the name of the database created at installation time is userRoot.
|
|
|
|
|
The following procedure describes deleting a directory database using the Directory Server Console. Deleting a database deletes the configuration information and entries for that database only, not the physical database itself.
|
|
|
|
To enable database encryption on an attribute with existing stored data, you have to export the database to ldif first, then make the configuration change, then re-import the data to the database. The server does not enforce consistency
between encryption configuration and stored data; therefore, pay
careful attention that all existing data are exported before enabling
or disabling encryption.
|
|
|
|
|
|
|
|
|
There is no mechanism for recovering a lost
key. Therefore, it is especially important to backup the server's
certificate database safely. If the server's certificate were lost, it
would not be possible to decrypt any encrypted data stored in its
database.
|
|
|
|
|
|
|
|
|
When enabling encryption for data that is
already present in the the
database, several additional security concerns arise:
|
|
|
|
|
Chaining is a method by which a server contacts other servers on behalf of a client application and then returns the combined results. This method is implemented through the database link. A database link points to data stored remotely. When a client application requests data from a database link, the database link retrieves the data from the remote database and returns it to the client.
The following sections describe how to create and configure a database link. For more general information about chaining, refer to chapter 5, "Designing the Directory Topology," in the Netscape Directory Server Deployment Guide.
You can create and configure a database link using Directory Server Console or the command-line. The following sections describe the procedures for creating and maintaining a database link:
For information about monitoring the activity of your database links, refer to Monitoring Database Link Activity.
These procedures describe configuring how your Directory Server chains requests made by client applications to directory servers that contain database links. This chaining policy applies to all database links you create on your Directory Server.
A component is any functional unit in the server that uses internal operations. For example, plug-ins are considered to be components, as are functions in the front-end. However, a plug-in may actually be comprised of multiple components (for example, the ACI plug-in).
Some components send internal LDAP requests to the server, expecting to access local data only. For such components, you need to control the chaining policy so that the components can complete their operations successfully. One example is the certificate verification function. If you chain the LDAP request made by the function to check certificates, it implies that you trust the remote server. If the remote server is not trusted, then you have a security problem.
By default, all internal operations are not chained. However, you can override this default by specifying components that you want to chain using the Console or the command-line. By default, no components are allowed to chain.
You must also create an ACI on the remote server to allow the plug-in you specify to perform its operations on the remote server. You create the ACI in the suffix assigned to the database link.
The following table lists component names,
the potential side-effects of allowing them to chain internal
operations, and the permissions they need in the ACI you create on the
remote server:
Table 3-2
Components Allowed to Chain
|
|
|
|
You cannot chain the following components: When enabling the Referential Integrity Plug-in on servers issuing chaining requests, be sure to analyze your performance resource and time needs as well as your integrity needs. Integrity checks can be time-consuming and draining on memory/CPU. For further information on the limitations surrounding ACIs and chaining, see ACI Limitations.
|
|
|
|
|
Once you have modified the component you allow to chain, you must restart the server in order for the modification to take effect.
The following sections describe how to specify components you want to allow to chain using the Console and from the command-line.
After allowing the component to chain, you must create an ACI in the suffix on the remote server to which the operation will be chained. For example, you would create the following ACI for the Referential Integrity Plug-in:
aci: (targetattr
"*")(target="ldap:///ou=customers,l=us,dc=example,dc=com")
(version
3.0; acl "RefInt Access for chaining"; allow
(read,write,search,compare) userdn = "ldap:///cn=referential
integrity
postoperation,cn=plugins,cn=config";)
You can specify components you want to include in chaining using the nsActiveChainingComponents attribute in the cn=config,cn=chaining database,cn=plugins,cn=config entry of the configuration file.
For example, if you want to allow the referential integrity component to chain operations, you add the following to your database link configuration file:
nsActiveChainingComponents:
cn=referential integrity postoperation,
cn=components,cn=config
Refer to Table 3-2 for a list of the components you can allow to chain.
Once you have modified the nsActiveChainingComponents attribute, you must restart the server for your change to take effect.
After allowing the component to chain, you must create an ACI in the suffix on the remote server to which the operation will be chained. For example, you would create the following ACI for the referential integrity component:
aci: (targetattr
"*")(target="ldap:///ou=customers,l=us,dc=example,dc=com")
(version 3.0; acl "RefInt Access for chaining"; allow
(read,write,search,compare) userdn = "ldap:///cn=referential
integrity postoperation,cn=plugins,cn=config";)
You can choose not to chain operation requests made by LDAP controls. By default, requests made by the following controls are forwarded to the remote server by the database link:
The following sections describe how to alter the controls that the database link forwards using the Console and from the command-line.
You can alter the controls that the database link forwards by changing the nsTransmittedControls attribute of the cn=config,cn=chaining database,cn=plugins,cn=config entry. For example, to forward the virtual list view control, you add the following to your database link entry in the configuration file:
nsTransmittedControls: 2.16.840.1.113730.3.4.9
In addition, if clients of your Directory Server create their own controls and you want their operations to be chained to remote servers, you need to add the OID of the custom control to the nsTransmittedControls attribute.
The LDAP controls you can chain and their
OIDs are listed in the following table:
Table 3-3
LDAP Controls and Their OIDs
For more information about LDAP controls, refer to the LDAP C-SDK documentation on http://enterprise.netscape.com/docs.
The basic configuration of your database link involves providing the following information:
The following sections describe creating a new database link from the Directory Server Console as well as the command-line.
To create a new database link using the Directory Server Console:
Use the ldapmodify command-line utility to create a new database link from the command-line.
Your new instance must be located in the cn=chaining database,cn=plugins, cn=config entry.
Default configuration attributes are contained in the cn=default config,cn=chaining database,cn=plugins,cn=config entry. These configuration attributes apply to all database links at creation time. Changes to the default configuration only affect new database links. You cannot change the default configuration attributes on existing database links.
Each database link contains its own specific configuration information, which is stored with the database link entry itself, cn=database_link_name,cn=chaining database,cn=plugins,cn=config. For more information about configuration attributes, refer to the Netscape Directory Server Configuration, Command, and File Reference.
This section contains the following procedures for configuring a database link from the command-line:
Use the nsslapd-suffix attribute to define the suffix managed by your database link. For example, if you want your database link to point to the people information for a remote site of your company, you would enter the following suffix information:
nsslapd-suffix: l=Zanzibar,ou=people,dc=example,dc=com
The suffix information is stored in the
cn=database_link_name,cn=chaining
database,cn=plugins,cn=config entry.
|
|
|
|
After creation time, any alterations you make to the nsslapd-suffix attribute occur only after you have restarted the server containing the database link. |
|
|
|
|
For a request from a client application to be chained to a remote server, you can provide special bind credentials for the client application. This gives the remote server the proxied authorization rights needed to chain operations. If you do not specify bind credentials, the database link binds to the remote server as anonymous.
Providing bind credentials involves the following steps:
|
|
|
|
The nsMultiplexorBindDN cannot be that of the Directory Manager.
|
|
|
|
|
For example, a client application sends a request to server A. Server A contains a database link that chains the request to a database on server B.

The database link on server A binds to server B using a special user as defined in the nsMultiplexorBindDN attribute and a user password as defined in the nsMultiplexorCredentials attribute. In this example, server A uses the following bind credentials:
nsMultiplexorBindDN:
cn=proxy admin,cn=config
nsMultiplexorCredentials:
secret

Server B must contain a user entry
corresponding to the
nsMultiplexorBindDN, and you must set the proxy authentication
rights for this user. To set the proxy authorization correctly, you
need to set the "proxy" ACI as you would any other ACI.
For more information on
ACIs, refer to Managing Access
Control. For
more information about the proxy authentication control, refer to the
C-SDK documentation at
http://enterprise.netscape.com/docs.
On the server containing your database link, you have to identify the remote server that the database link connects with using an LDAP URL. Unlike the standard LDAP URL format, the URL of the remote server does not specify a suffix. It takes the following form:
You specify the URL of the remote server using the nsFarmServerURL attribute in the cn=database_link_name,cn=chaining database, cn=plugins,cn=config entry of the configuration file. For example, the nsFarmServerURL might appear as follows:
nsFarmServerURL: ldap://example.com:389/
Do not forget to use the trailing slash (/) at the end of the URL.
If you want to the database link to connect to the remote server using LDAP over SSL, the LDAP URL of the remote server takes the following form:
For more information about chaining and SSL, refer to Chaining Using SSL.
You can include additional LDAP URLs for servers to use in the case of failure. To do so, add alternate servers to the nsFarmServerURL attribute, separated by spaces. For example, you might enter the following:
nsFarmServerURL: ldap://example.com us.example.com:389 africa.example.com:1000/
In this sample LDAP URL, the database link first contacts the server example.com on the standard port to service an operation. If it does not respond, the database link then contacts the server us.example.com on port 389. If this server fails, it then contacts africa.example.com on port 1000.
The following table lists the attributes available for configuring a database link. Some of these attributes were discussed in the earlier sections.
Attributes marked with an asterisk (*) can be both global or instance attributes. All instance attributes are defined in the cn=database_link_name,cn=chaining database,cn=plugins,cn=config entry.
The two global configuration attributes are located in the cn=config,cn=chaining database,cn=plugins,cn=config entry. The global attributes are dynamic, meaning any changes you make to them will automatically take effect on all instances of the database link within your directory.
Values defined for a specific database link
take precedence over the global attribute value.
Table 3-4
Database Link Configuration Attributes