5.6. Configuring Scope for the Referential Integrity
5.6. Configuring Scope for the Referential Integrity If an entry is deleted, the references to it are deleted or modified to reflect the change. When this update is applied to all entries and all groups, it can impact performance and prevents flexibility of restricting the referential integrity to selected subtrees. Defining a scope addresses this problem. For example, there may be one suffix, dc=example,dc=com , containing two subtrees: ou=active users,dc=example,dc=com and ou=deleted users,dc=example,dc=com . Entries in deleted users should not be handled for purposes of referential integrity. 5.6.1. Parameters That Control the Referential Integrity Scope The following three parameters can be used to define the scope in the Referential Integrity Postoperation plug-in configuration: nsslapd-pluginEntryScope This multi-value parameter controls the scope of the entry that is deleted or renamed. It defines the subtree in which the Referential Integrity Postoperation plug-in looks for the delete or rename operations of a user entry. If a user is deleted or renamed that does not exist under the defined subtree, the plug-in ignores the operation. The parameter allows you to specify to which branches of the database the plug-in should apply the operation. nsslapd-pluginExcludeEntryScope This parameter also controls the scope of the entry that is deleted or renamed. It defines the subtree in which the Referential Integrity Postoperation plug-in ignores any operations for deleting or renaming a user. nsslapd-pluginContainerScope This parameter controls the scope of groups in which references are updated. After a user is deleted, the Referential Integrity Postoperation plug-in looks for the groups to which the user belongs and updates them accordingly. This parameter specifies which branch the plug-in searches for the groups to which the user belongs. The Referential Integrity Postoperation plug-in only updates groups that are under the specified container branch, and leaves all other groups not updated. 5.6.2. Displaying the Referential Integrity Scope Using the Command Line The following commands show how to display the scope settings using the command line: 5.6.3. Displaying the Referential Integrity Scope Using the Web Console The following procedure shows how to display the scope settings using the web console: Open the Directory Server user interface in the web console. See Section 1.4, "Logging Into Directory Server Using the Web Console" . Select the instance. Open the Plugins menu. Select the Referential Integrity plug-in. See the Entry Scope , Exclude Entry Scope , and Container Scope fields for the currently configured scope. 5.6.4. Configuring the Referential Integrity Scope Using the Command Line To configure the referential integrity scope using the command line: Optionally, display the scope settings. See Section 5.6.2, "Displaying the Referential Integrity Scope Using the Command Line" . The following commands show how to configure the individual referential integrity scope settings using the command line: To set a distinguished name (DN): To the nsslapd-pluginEntryScope parameter: To the nsslapd-pluginExcludeEntryScope parameter: To the nsslapd-pluginContainerScope parameter: To remove a DN: From the nsslapd-pluginEntryScope parameter: From the nsslapd-pluginExcludeEntryScope parameter: From the nsslapd-pluginContainerScope parameter: Restart the instance: 5.6.5. Configuring the Referential Integrity Scope Using the Web Console To configure the referential integrity scope using the web console: Open the Directory Server user interface in the web console. See Section 1.4, "Logging Into Directory Server Using the Web Console" . Select the instance. Select the Plugins menu. Select the Referential Integrity plug-in. Set the scope in the Entry Scope , Exclude Entry Scope , and Container Scope fields. Click Save Config .
dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity show nsslapd-pluginEntryScope: DN nsslapd-pluginExcludeEntryScope: DN nsslapd-pluginContainerScope: DN dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --entry-scope=" DN " dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --exclude-entry-scope=" DN " dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --container-scope=" DN " dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --entry-scope=delete dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --exclude-entry-scope=delete dsconf -D "cn=Directory Manager" ldap://server.example.com plugin referential-integrity set --container-scope=delete dsctl instance_name restart