Expand the Syntaxes list. Syntax names are shown in the list.
Managing Directory Schema 20-21
To add an attribute for which no directory data exists, import an LDIF file by using ldapmodify. For example, to add a new attribute foo that has already been defined
in the schema, import the following LDIF file by using ldapmodify:
dn: cn=catalogs changetype: modify
add: orclindexedattribute orclindexedattribute: foo
Type a command similar to the following at the system prompt:
ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name
You should not use this method to index an attribute for which data exists in the directory. To index such an attribute, use the Catalog Management tool, catalog. See
Creating and Dropping Indexes from Existing Attributes by Using catalog on
page 15-11.
Dropping an Index from an Attribute by Using ldapmodify
To drop an index from an attribute by using ldapmodify, specify delete in the LDIF file. For example:
dn: cn=catalogs changetype: modify
delete: orclindexedattribute orclindexedattribute: foo
Indexing an Attribute for Which Data Exists by Using the Catalog Management Tool
Use the Catalog Management tool to index an attribute for which data already exists and to drop an index from an attribute. See
Creating and Dropping Indexes from Existing Attributes by Using catalog
on page 15-11.
Adding a New Attribute With Attribute Aliases by Using the Command Line
You add, modify, or delete attribute aliases by creating an LDIF file, then using ldapmodify with the following syntax:
ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name
See Also: The ldapmodify command-line tool reference in
Oracle Fusion Middleware Reference for Oracle Identity Management
See Also: The catalog command-line tool reference in Oracle
Fusion Middleware Reference for Oracle Identity Management
Note: Unless you are absolutely sure that the indexes were not
created by the base schema that was installed with Oracle Internet Directory, be careful not to use the catalog delete=T option to
remove indexes from attributes. Removing indexes from base schema attributes can adversely impact the operation of Oracle
Internet Directory.
Note: DN is not an attribute. You cannot define dn in the schema.
Therefore you cannot create an alias for dn.
20-22 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory
The following LDIF file adds the attribute myattr with the attribute aliases myalias1 and myalias2:
dn: cn=subschemasubentry changetype: modify
add: attributetypes attributetypes: 1.2.3.4.5 NAME myattr myalias1 myalias2 SYNTAX
1.3.6.1.4.1.1466.115.121.1.38
Adding or Modifying Attribute Aliases in Existing Attributes by Using the Command Line
The following LDIF file adds the attribute aliases surname and mysurName to the existing attribute sn:
dn: cn=subschemasubentry changetype: modify
delete: attributeTypes attributeTypes: 2.5.4.4 NAME sn SUP name
- add: attributeTypes
attributeTypes: 2.5.4.4 NAME sn surname mysurName SUP name
Type a command similar to the following at the system prompt:
ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name
Deleting Attribute Aliases by Using the Command Line
Use the ldapmodify command to delete attribute aliases. The following LDIF file deletes the attribute alias mysurName but not the attribute alias surName from the
attribute sn:
dn: cn=subschemasubentry changetype: modify
delete: attributeTypes attributeTypes: 2.5.4.4 NAME sn surname mysurName SUP name
- add: attributeTypes
attributeTypes: 2.5.4.4 NAME sn surname SUP name
The following LDIF file deletes both attribute aliases, surname and mysurName, from the attribute sn:
dn: cn=subschemasubentry changetype: modify
delete: attributeTypes attributeTypes: 2.5.4.4 NAME sn surname mysurName SUP name
- add: attributeTypes
attributeTypes: 2.5.4.4 NAME sn SUP name
Using Attribute Aliases with LDAP Commands
After you define attribute aliases in the LDAP schema, users can substitute the aliases for attribute names in LDAP operations. The following examples show the commands
to use and the results to expect:
■
Using Attribute Aliases with ldapsearch
Managing Directory Schema 20-23
■
Using Attribute Aliases with ldapadd
■
Using Attribute Aliases with ldapmodify
■
Using Attribute Aliases with ldapdelete
■
Using Attribute Aliases with ldapmoddn Table 20–1
shows the aliases used in the examples and the attributes names they represent:
Using Attribute Aliases with ldapsearch
The LDAP server recognizes attribute aliases in the search filter string, in the base DN, and in the required attributes list in ldapsearch operations. The search result
contains the actual attribute names, unless the user explicitly asks for an alias using the required attributes list. For example, suppose the user specifies the following
search, using the aliases organizationalUnit, country, and organization in the base DN and the alias surname in the filter string:
ldapsearch -p 3060 -h myhost \ -b organizationalUnit=dev,country=us,organization=myorg \
-s sub surname=brown
The search returns a result similar to this: uid=mbrown,ou=dev,c=us,o=myorg
uid=mbrown sn=Brown
cn=Mark Brown telephonenumber;office=444006
telephonenumber;mobile=555006 objectclass=organizationalPerson
objectclass=top objectclass=person
Now suppose the user specifically asks for the aliases surname, commonname, and userid by including them in a required attributes list, like this:
ldapsearch -p 3060 -h myhost \ -b organizationalUnit=dev,country=us,organization=myorg \
-s sub surname=brown surname commonname userid phone
Because the user specifically included the aliases, the search returns a result similar to this:
uid=mbrown,ou=dev,c=us,o=myorg surname
=Brown
Table 20–1 Attribute Aliases Used in Examples
Alias Attribute Name
userid uid
organizationalunit ou
country c
organization o
surname sn
commonname cn
phone telephonenumber
20-24 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory
commonname
=Mark Brown
userid
=mbrown
phone
;office=444006
phone
;mobile=555006
Using Attribute Aliases with ldapadd
The LDAP server recognizes attribute aliases in place of attribute names during the add operation. When the LDAP server stores the entry, it replaces the alias with the
actual attribute name.
The command-line format is: ldapadd -h host -p port -D cn=orcladmin -q -f ldif_file_name
The user could provide an LDIF file like this:
dn: userid=mbrown,organizationalUnit=dev,country=us,organization=myorg objectclass: account
objectclass: organizationalPerson userID
: mbrown
surname
: Brown
commonName : Mark Brown
userpassword: password phone
;office: 444006
phone ;mobile: 555006
The entry is stored as if the file contained the attribute names instead of the aliases. On subsequent LDAP searches, however, the DN is returned as it was entered when
added or modified:
dn: userid=mbrown,organizationalUnit=dev,country=us,organization=myorg
This is standard behavior for LDAP search results. The DN is always returned with the same format that was used when the entry was created.
Using Attribute Aliases with ldapmodify
The LDAP server recognizes attribute aliases in place of attribute names during the modify operation.
The command-line format is: ldapmodify -D cn=orcladmin -q -h host -p port -f ldif_file_name
The user could provide an LDIF file like this: dn:
userid =mbrown,organizationalUnit=dev,country=us,organization=myorg
changetype: modify replace: surname
surname : davis
The entry is stored as if the file contained the attribute names instead of the aliases. On subsequent LDAP searches, however, the DN is returned as it was entered when
added or modified:
dn: userid=mbrown,organizationalUnit=dev,country=us,organization=myorg
This is standard behavior for LDAP search results. The DN is always returned with the same format that was used when the entry was created.
Managing Directory Schema 20-25
Using Attribute Aliases with ldapdelete
The LDAP server recognizes attribute aliases in the DN provided for delete operations. For example, suppose the user provides a request like this, with the aliases userid,
organizationalUnit, country, and organization in the search filter:
ldapdelelete -D cn=orcladmin -q -p 3060 \ -h myhost userid=mbrown,organizationalUnit=dev,country=us,organization=myorg
The server deletes the entry as if the user had typed: ldapdelelete -D cn=orcladmin -q -p 3060 \
-h myhost uid=mbrown,ou=dev,c=us,o=myorg
Using Attribute Aliases with ldapmoddn
The LDAP server recognizes attribute aliases in the DN, the new RDN, and the new parent DN options. For example, suppose the user types the command line:
ldapmoddn -D cn=orcladmin -q \ -b userid=mbrown,organizationalUnit=dev,country=us,organization=myorg\
-R userid=mdavis
The LDAP server interpret the command line as if the user had typed ldapmoddn -D cn=orcladmin -q -b uid=mbrown,ou=dev,c=us,o=myorg \
-R uid=mdavis The entry is stored as if the file contained the attribute names instead of the aliases. On
subsequent LDAP searches, however, the DN is returned as it was entered when added or modified:
dn: userid=mbrown,organizationalUnit=dev,country=us,organization=myorg
This is standard behavior for LDAP search results. The DN is always returned with the same format that was used when the entry was created.
Managing Content Rules by Using Command-Line Tools
The format of a content rule is: DITContentRule ::= SEQUENCE {
oids ALPHA-NUMERIC-OID, structuralObjectClass OBJECT-CLASS,
LABEL CONTENT-LABEL OPTIONAL, auxiliaries SET 1..MAX OF OBJECT-CLASS OPTIONAL,
mandatory SET 1..MAX OF ATTRIBUTE OPTIONAL, optional SET 1..MAX OF ATTRIBUTE OPTIONAL,
precluded SET 1..MAX OF ATTRIBUTE OPTIONAL }
You can use ldapmodify with an LDIF file such as the following to add a content rule:
dn: cn=subschemasubentry changetype: modify
add: contentrules contentrules: 2.16.840.1.113894.9999.1.1 OBJECTCLASS exampleObjClassName
LABEL abc AUX exampleAuxObjClassName MUST businessCategory MAY description host
20-26 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory
Table 20–2 describes the parameters. Note that the attribute and object class names are
case-insensitive.
Viewing Matching Rules by Using ldapsearch
To view matching rules, type: ldapsearch -L -D cn=orcladmin -p port -q -b cn=subschemasubentry -s base
objectclass= matchingrules
Viewing Syntaxes by Using by Using ldapsearch
To view syntaxes, type: ldapsearch -L -D cn=orcladmin -p port -q -b cn=subschemasubentry -s base
objectclass= ldapsyntaxes
Table 20–2 Content Rule Parameters
Parameter Description
oids A unique object identifier oids for the content rule similar to the
one for an object class or attribute definition. It must be a unique numeric value that begins with 2.16.840.1.113894 followed
by .9999 or a site-specific prefix.
LABEL The content label of the content rule as applied in the directory
structuralObjectClass The structural object class to which the content rule applies
auxiliaries The auxiliary object classes allowed for an entry to which the
content rule applies mandatory
User attribute types contained in an entry to which the content rule applies. These are in addition to those mandatory attributes
that the entry contains as a result of its association with its specified structural and auxiliary object classes.
optional User attribute types that may be contained in an entry to which
the content rule applies. These are in addition to those that the entry may contain as a result of its association with its specified
structural and auxiliary object classes.
Note: Matching rules cannot be modified.
See Also:
The ldapsearch command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management
Note: Syntaxes cannot be modified.
See Also:
The ldapsearch command-line tool reference in Oracle Fusion Middleware Reference for Oracle Identity Management
21
Configuring Referential Integrity 21-1
21
Configuring Referential Integrity
This chapter contains the following topics:
■
Introduction to Configuring Referential Integrity
■
Enabling Referential Integrity by Using Fusion Middleware Control
■
Disabling Referential Integrity by Using Fusion Middleware Control
■
Enabling Referential Integrity by Using the Command Line
■
Configuring Specific Attributes for Referential Integrity by Using the Command Line
■
Disabling Referential Integrity by Using the Command Line
■
Detecting and Correcting Referential Integrity Violations
Introduction to Configuring Referential Integrity
Referential integrity is the process of maintaining consistent relationships among sets of data. If referential Integrity is enabled in Oracle Internet Directory, whenever you
update an entry in the directory, the server also updates other entries that refer to that entry. For example, if you remove a users entry from the directory, and the user is a
member of a group, the server also removes the user from the group. If referential integrity is not enabled, the user remains a member of the group until manually
removed. Referential integrity is not enabled by default.
Referential integrity takes effect in two situations:
■
Delete–When an entry is deleted, all the DN attributes that refer to this entry DN are removed.
■
Modify–When an entrys DN is modified renamed, all the attributes that refer to this entry DN are modified.
Beginning with 11g Release 1 11.1.1, the Oracle Internet Directory server can enforce referential integrity. For every LDAP add, modify, delete, and rename operation, the
server monitors the request and updates the necessary DN references.
Two configuration parameters control referential integrity: orclRIenabled and orclRIattr.
Note: Disable referential integrity during the replication
bootstrapping process. If referential integrity is enabled, bootstrapping fails.
21-2 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory
■
The parameter orclRIenabled controls the referential integrity level. Values for orclRIenabled are:
■
0–Referential integrity is disabled
■
1–Referential integrity is enabled for member and uniquemember attributes only.
■
2–Referential Integrity is enabled for a list of DN syntax attributes as specified in orclRIattr and for attributes member and uniquemember.
■
When orclRIenabled is set to 2, the value of the parameter orclRIattr takes effect. The value of orclRIattr is a list of referential integrity-enabled attributes.
If referential integrity is enabled, it is strictly enforced. For example, you cannot add a group entry whose member or uniquemember attributes are not currently part of the
DIT.
Enabling Referential Integrity by Using Fusion Middleware Control
To configure and enable referential integrity by using Oracle Enterprise Manager Fusion Middleware Control, perform the following steps: