Oracle® Identity Management Integration Guide
10g Release 2 (10.1.2) Part No. B14085-01 |
|
![]() Previous |
![]() Next |
This chapter explains how to register connectors with Oracle Directory Integration and Provisioning and how to format the mapping rule attribute. It contains these topics:
Before deploying a connector, you register it in Oracle Internet Directory. This registration involves creating a directory synchronization profile, which is stored as an entry in the directory. The attributes of this profile are listed and described in Table B-1.
To create a directory synchronization profile, use one of the following tools:
The Oracle Directory Integration and Provisioning Server Administration tool
Directory Integration and Provisioning Assistant
Attributes in a synchronization profile entry belong to the object class orclodiProfile
. The only exception is the orclodiplastappliedchangenumber
attribute, which belongs to the object class orclchangesubscriber
.
The Object Identifier prefix 2.16.840.1.113894.7
is assigned to platform-related classes and attributes.
The various synchronization profile entries in the directory are created under the container cn=subscriber profile,cn=changelog subscriber,cn=oracle internet directory
. For example, a connector called OracleHRAgent
is stored in the directory as orclodipagentname=OracleHRAgent,cn=subscriber profile,cn=changelog subscriber,cn=oracle internet directory
.
When you install Oracle Directory Integration and Provisioning, sample import and export synchronization profiles are automatically created for:
Microsoft Active Directory
SunONE (iPlanet) Directory Server
LDIF files
Tagged files
The property and mapping files used to create the sample profiles are available in the $ORACLE_HOME/ldap/odi/samples and $ORACLE_HOME/ldap/odi/conf directory directories.
Some of the most important pieces of a directory synchronization profile include the connection details you assign to the properties listed in Table 6-1:
Table 6-1 Connection detail properties
Property | Description |
---|---|
odip.profile.condirurl
|
The URL of the connected directory:
|
odip.profile.condiraccount
|
The DN or account name used to connect to the third-party directory |
odip.profile.condirpassword
|
The password used to connect to the third-party directory |
Notes:
|
The Additional Config Info (orclodipAgentConfigInfo
) attribute in a synchronization profile stores any additional configuration information needed by a connector to synchronize Oracle Internet Directory with a connected directory. Although not required, you can use the following two parameters with the Additional Config Info attribute to significantly improve synchronization efficiency:
You cannot use the Oracle Directory Integration and Provisioning Server Administration tool or Oracle Directory Manager to modify the Additional Config Info attribute. Instead, you must use the Directory Integration and Provisioning Assistant.
The SearchDeltaSize
parameter determines how many incremental changes are processed during each iteration in a synchronization cycle. By default, the SearchDeltaSize
parameter is assigned a value of 500. In some cases, you will experience better synchronization efficiency if you assign a higher value to this parameter. However, be sure that the value you specify does not exceed the LDAP search limit of the connected directory server. Otherwise, you may receive an error during synchronization and some changes may not be processed.
WARNING: Be sure to thoroughly analyze and test your deployment when modifying the |
The SkipErrorToSyncNextChange
parameter determines how the Oracle directory integration and provisioning server handles an error when processing a change during synchronization. By default, the SkipErrorToSyncNextChange
parameter is assigned a value of false
, which means that the Oracle directory integration and provisioning server will continue processing a change until the error is resolved. If you assign a value of true
to the SkipErrorToSyncNextChange
parameter, the Oracle directory integration and provisioning server will skip any changes that cause an error. Any failures are recorded in the $ORACLE_HOME/ldap/odi/log/profilename.aud audit log file. If you do assign a value of true
to the SkipErrorToSyncNextChange
parameter, be sure to periodically review the audit log for failures.
This section discusses how to configure mapping rules. It contains these topics:
The mapping rules attribute enables you to specify how to convert entries from one directory to another. There are two types of mapping rules: domain rules and attribute rules. You can specify distinguished name mapping and attribute-level mapping. This attribute is assumed to be in the format of a file as described in this section.
Mapping rules are organized in a fixed tabular format, and you must follow that format carefully. Each set of mapping rules appears between a line containing only the word DomainRules
and a line containing only the characters ###
. The fields within each rule are delimited by a colon (:).
DomainRules srcDomainName1: [dstDomainName1]: [DomainMappingRule1] srcDomainName2: [dstDomainName2]: [DomainMappingRule2] AttributeRules srcAttrName1:[ReqAttrSeq]:[SrcAttrType]:[SrcObjectClass]:[dstAttrName1]: [DstAttrType]:[DstObjectClass]:[AttrMappingRule1] srcAttrName1,srcAttrName2:[ReqAttrSeq]:[SrcAttrType]:[SrcObjectClass]: [dstAttrName2]:[DstAttrType]:[DstObjectClass]:[AttrMappingRule2] ###
where the expansion of each srcAttrName1
and srcAttrName2
would be a single, unwrapped long line.
This section specifies how entries are mapped between Oracle Internet Directory and a connected directory. If the mapping is between Oracle Internet Directory and another LDAP directory, then you can create multiple mapping rules, as explained in "Configuring Mapping Rules". The domain rule specifications appear after a line containing only the keyword DomainRules
. Each domain rule is represented with the components, separated by colons, that are described in Table 6-2.
Table 6-2 DomainRule Components
Component Name | Description |
---|---|
SrcDomainName
|
Name of the domain or container of interest. Specify NONLDAP for sources other than LDAP and LDIF. |
DstDomainName
|
Name of the domain of interest in the destination. Specify this component if the container for the entries in the destination directory is different from that in the source directory.
It is optional, and if not specified, takes the value of |
DomainMappingRule
|
This field is meaningful only when importing to Oracle Internet Directory, or when exporting to an LDIF file or another external LDAP-compliant directory. Specify this component if the RDN of the entry in the destination directory is different from that in the source directory entry.
This rule is used to construct the destination DN from the source domain name, from the attribute given in This component is optional in LDAP-to-LDIF, LDAP-to-LDAP, or LDIF-to-LDAP. If it is not specified, then the source domain and destination domain names are considered to be the same. |
See Also: The mapping file examples at the end of this chapter |
The attribute rule specifications appear after a line containing only the keyword AttributeRules
. Attribute rules specify how property values for an entry are related between two LDAP directories. For example, the cn
attribute of a user object in one directory can be mapped to the givenname
object in another directory. Similarly, the cn
attribute of a group object in one directory can be mapped to the displayname
attribute in another directory. Each attribute rule is represented with the components, separated by colons, and described in Table 6-3. The attribute rule specifications end with a line containing only the characters ###
.
Table 6-3 Components in Attribute Rules
Component Name | Description |
---|---|
SrcAttrName
|
For LDAP-compliant directory repositories, this parameter refers to the name of the attribute to be translated.
For Oracle Database repositories, it refers to the ColumnName in the table specified by the For other repositories this parameter can be appropriately interpreted. |
ReqAttrSeq
|
Indicator of whether the source attribute must always be passed to the destination. When entries are synchronized between Oracle Internet Directory and the connected directory, some attributes need to be used as synchronization keys. This field indicates whether the specified attribute is being used as a key. If so, regardless of whether the attribute has changed or not, the value of the attribute is always extracted from the source.
A nonzero integer value should be placed in this field if the attribute needs to be always passed on to the other end. |
SrcAttrType
|
This parameter refers to the attribute type—for example, integer, string, binary—that validates the mapping rules. |
SrcObjectClass
|
If the source of the shared attribute is an LDAP-compliant directory, then this parameter names the object class to which the attribute belongs.
If the source of the shared attribute is an Oracle Database repository, then this parameter refers to the table name and is mandatory. For other repositories, this parameter may be ignored. |
DstAttrName
|
Optional attribute. If it is not specified, then the SrcAttrName is assumed.
For LDAP-compliant directories, this parameter refers to the name of the attribute at the destination. For Oracle Database repositories, it refers to the ColumnName in the table specified by the For other repositories, this parameter can be appropriately interpreted. |
DstAttrType
|
This parameter refers to the attribute type—for example, integer, string, binary. Note that it is up to you, the administrator, to ensure the compatibility of the source and destination attribute types. Directory Integration and Provisioning does not ensure this compatibility. |
DstObjectClass
|
For LDAP-compliant directories, this parameter refers to the object class to which the attribute belongs, and is optional.
For Oracle Database repositories, it refers to the table name, and is mandatory. For other repositories this parameter may be ignored. |
AttrMapping Rule
|
Optional arithmetic expression with these operators: +, |, and these functions: toUpper (string) , toLower(String) , trunc (string,char) . If nothing is specified, then the source attribute value is copied as the value of the destination attribute. Literals can be specified with single quotes ('') or with double quotes ("").
|
In a newly created synchronization profile, mapping rules are empty. To enter mapping rules, edit a file that strictly follows the correct format.
Note: When attributes and object classes are defined in the mapping file, it is assumed that source directories contain the respective attributes and object classes defined in the schema.If a parent container is selected for synchronization, then all its children that match the mapping rules are likewise synchronized. Child containers cannot be selectively ignored for synchronization. |
To create a new mapping file, follow these steps:
Identify the container(s) of interest for synchronization in the source directory.
Identify the destination container or containers to which the objects in the source containers should be mapped to. Be sure that the specified container already exists in the directory.
Determine the rule to create a DN of the entry to be created in the destination directory. In LDAP-to-LDAP, mapping is normally one-to-one. In non-LDAP-to-LDAP, a domain, DN construct rule is required. For instance in the case of synchronizing from a tagged file or Human Resources agent, the mapping rule may be of the form uid=%,dc=mycompany,dc=com
. In this case, the uid
attribute must be present in all the changes to be applied from Oracle Human Resources. The uid
attribute must be specified as a required attribute, as specified in step 6.
Identify the objects that you want to synchronize between directories—that is, the relevant object classes in the source and destination directories. In general, objects that get synchronized between directories include users, groups, organizational units, organizations, and other resources. Identify the actual object classes used in the directories to identify these objects.
Identify the properties of the various objects that you want to synchronize between directories—that is, the attributes in the LDAP context. All the attributes of an object need not be synchronized. The properties of users that you might want to synchronize are cn
, sn
, uid
, mail
.
Define the mapping rules. Each mapping rule has this format:
<srcAttrName>:<ReqdFlag>:<srcAttrType>:<SrcObjectClass>: <dstAttrName>:<dstAttrType>:<dstObjectClass>: <Mapping Rule>
While defining the mapping rule, ensure the following:
Every required attribute has a sequence number. For example, if in step 3 the uid
attribute is identified as required, then assign a value of 1
in place of <ReqdFlag>
.
Every relevant object class has a schema definition on the destination directory.
Every mandatory attribute in a destination object class has a value assigned from the source. This holds good even for standard object classes also, as the different LDAP implementations may not be completely standards-compliant.
It is not necessary to assign all attributes belonging to a source object class to a single destination object class. Different attributes of a source object class can be assigned to different attributes belonging to different destination object classes.
If an attribute has binary values, then specify it as binary
in the <attrtype>
field.
Mapping rules are flexible: They can include both one-to-many and many-to-one mappings.
One-to-many
One attribute in a connected directory can map to many attributes in Oracle Internet Directory. For example, suppose an attribute in the connected directory is Address:123 Main Street/MyTown, MyState 12345
. You can map this attribute in Oracle Internet Directory to both the LDAP attribute homeAddress
and the LDAP attribute postalAddress
.
Many-to-one
Multiple attributes in a connected directory can map to one attribute in Oracle Internet Directory. For example, suppose that the Oracle Human Resources directory represents Anne Smith by using two attributes: firstname=Anne
and lastname=Smith
. You can map these two attributes to one attribute in Oracle Internet Directory: cn=Anne Smith
. However, in bidirectional synchronization, you cannot then map in reverse. For example, you cannot map cn=Anne Smith to many attributes.
See Also: The mapping file examples at the end of this chapter |
The attribute mapping rules supported are:
Concatenation (+)
: Used to concatenate two string attributes
The mapping rule looks like:
Firstname,lastname: : : : givenname: : inetorgperson: firstname+lastname
For example, if the Firstname
is John
and LastName
is Doe
in the source, then this rule results in the givenname
attribute in the destination with the value JohnDoe
.
OR operator ( | ): Used to assign one of the values of the two string attributes to the destination
The mapping rule looks like this:
Fistname,lastname : : : :givenname: :inetorgperson: firstname | lastname
In this example, givenname
is assigned the value of firstname
if it exists. If the firstname
attribute does not exist, then givenname
is assigned the value of lastname
. If both the values are empty, then no value is assigned.
bin2b64 ( )
: Used to store a binary value of the source directory as a base64 encoded value in the destination directory. Typical usage is as follows:
objectguid: : : :binary: :orclobjectguid: orcladuser:bin2b64(objectguid)
This is required when you need search on the value of (objectguid
).
tolower()
: Convert the String attribute value to lowercase.
firstname: : : :givenname: :inetorgperson: tolower(firstname)
toupper ()
: Convert the String attribute value to uppercase.
firstname: : : :givenname: :inetorgperson: toupper(firstname)
trunc(str,char)
: Truncate the string beginning from the first occurrence of the specified char
mail : : : : uid : : inetorgperson : trunc(mail,'@')
For example, if mail
is John.Doe@acme.com
in the source, then this rule results in the uid
attribute in the destination with the value "John.Doe"
truncl(str, char)
: Truncate the string up to and including the first occurrence of the specified char
mail : : : : uid : : inetorgperson : truncl(mail,'@')
For example, if mail is John.Doe@acme.com
in the source, then this rule results in the uid
attribute in the destination with the value acme.com
.
trunc(str1, str2)
: Truncate the string beginning with the first occurrence of the specified string
mail : : : : uid : : inetorgperson : truncl(mail, "@")
dnconvert (str)
: Used for DN type attributes if domain mapping is used.
This example assumes the following domain mapping rule:
DomainRules cn=srcdomain:cn=dstdomain:
For example:
uniquemember : : : groupofuniquenames : uniquemember : :groupofuniquenames : dnconvert(uniquemember)
In this example, if uniquemember
in the source is cn=testuser1,cn=srcdomain,
then uniquemember
in the destination becomes cn=test user1,cn=dstdomain
.
Literals:
Userpassword: : :person: userpassword: :person: 'welcome1'
Based on the preceding discussions, here is a sample mapping file for importing user entries from the Oracle Human Resources database tables by using the tagged-file interface. Note that the source is a non-LDAP directory. This sample file is supplied during installation, at $ORACLE_HOME/ldap/odi/conf/oraclehragent.map.master.
DomainRules NONLDAP:dc=myCompany,dc=com:uid=%dc=myCompany,dc=com AttributeRules firstname: : : :cn: :person email : : : :cn: :person: trunc(email,'@') email : 1 : :uid: :person:trunc(email,'@') firstname,lastname: : : :cn: :person: firstname+","+lastname lastname,firstname: : : :cn: :person: lastname+","+firstname firstname,lastname: : : :sn: :person: lastname | firstname EmployeeNumber: : : :employeenumber: :inetOrgperson EMail: : : :mail: :inetOrgperson TelephoneNumber1: : : :telephonenumber: :person TelephoneNumber2: : : :telephonenumber: :person TelephoneNumber3: : : :telephonenumber: :person Address1: : : :postaladdress: :person state: : : :st: :locality street1: : : :street: :locality zip: : : :postalcode: :locality town_or_city: : : :l: :locality Title: : : :title: :organizationalperson #Sex: : : :sex: :person ###
As described earlier, the mapping file consists of keywords and a set of domain and attribute mapping rule entries. The mapping file in this example contains the domain rule NONLDAP:dc=myCompany,dc=com:cn=%,dc=myCompany,dc=com
.
This rule implies that the source domain is NONLDAP—that is, there is no source domain.
The destination domain (:dc=myCompany,dc=com
) implies that all the directory entries this profile deals with are in the domain dc=myCompany,dc=com
. Be sure that the domain exists before the start of synchronization.
The domain mapping rule (:uid=%,dc=myCompany,dc=com
) implies that the data from the source should refer to the entry in the directory with the DN that is constructed using this domain mapping rule. In this case, uid
must be one of the destination attributes that should always have a non-null value. If any data corresponding to an entry to be synchronized has a null value, then the mapping engine assumes that the entry is invalid and proceeds to the next entry. To identify the entry correctly in the directory, it is also necessary that uid
should be single-valued.
In the case of the tagged file, the source entry does not have any object class to indicate the type of object it is synchronizing. Note that the SrcObjectClass
field is empty.
Every object whose destination is Oracle Internet Directory must have an object class. Specify an object class for every attribute.
Note that email
is specified as a required attribute in the sample mapping file. This is because the uid
attribute is derived from the email
attribute. Successful synchronization requires the email
attribute to be specified in all changes specified in the tagged file as follows:
Email : 1 : : :uid : : person : trunc(email,'@')
In some cases, the RDN of the DN needs to be constructed by using the name of a multivalued attribute. For example, to construct an entry with the DN of cn=%,l=%,dc=myCompany,dc=com
, where cn
is a multivalued attribute, the DomainMappingRule can be of this form: rdn,l=%,dc=myCompany,dc=com
where rdn
is one of the destination attributes having a non-null value. A typical mapping file supporting this could have the following form:
DomainRules NONLDAP:dc=us,dc=myCompany,dc=com:rdn,l=%,dc=us,dc=myCompany,dc=com AttributeRules firstname: : :cn: :person email : : : :cn: :person: trunc(email,'@') email : 1: : :rdn: :person: 'cn='+trunc(email,'@') firstname,lastname: : : :cn: :person: firstname+","+lastname lastname,firstname: : : :cn: :person: lastname+","+firstname firstname,lastname: : : :sn: :person: lastname | firstname EmployeeNumber: : : :employeenumber: :inetOrgperson EMail: : : :mail: :inetOrgperson TelephoneNumber1: : : :telephonenumber: :person TelephoneNumber2: : : :telephonenumber: :person TelephoneNumber3: : : :telephonenumber: :person Address1: : : :postaladdress: :person Address1: : : :postaladdress: :person Address1: : : :postaladdress: :person state: : : :st: :locality street1: : : :street: :locality zip: : : :postalcode: :locality town_or_city: 2 : : :1: :locality Title: : : :title: :organizationalperson #Sex: : : :sex: :person ###
A set of sample integration profiles are created as part of installation by using the Directory Integration and Provisioning Assistant. The properties file used for creating the profile is located in the directory $ORACLE_HOME/ldap/odi/samples.
Sample Import Mapping File
DomainRules dc=mycompany.oid,dc=com:dc=mycompany.iplanet,dc=com AttributeRules # Mapping rules to map the domains and containers o: : :organization: o: :organization ou: : :organizationalUnit: ou: : organizationalUnit dc: : :domain:dc: :domain # Mapping Rules to map users uid : : :person: uid: :inetOrgperson sn: : :person:sn: :person cn: : :person:cn: :person mail: :inetorgperson: mail: :inetorgperson employeenumber: :organizationalPerson: employeenumber: :organizationalperson c: : :country:c: :country l: : :locality: l: :locality telephonenumber: :organizationalPerson: telephonenumber: :organizationalperson userpassword: : :person: userpassword: :person uid: : :person: orcldefaultProfileGroup: :orclUserV2 # Mapping Rules to map groups cn: : :groupofuniquenames:cn: :groupofuniquenames member: : :groupofuniquenames:member: :orclgroup uniquemember: : :groupofuniquenames:uniquemember: :orclgroup owner: : :groupofuniquenames:owner: :orclgroup # userpassword: :base64:userpassword: :binary:
Notice in the preceding example that both the source domain and destination domain are specified in the Domain Mapping rule section. In this example, the source and the destination domains are the same. However, you can specify a different destination domain, provided the container exists in the destination directory.
Also notice in the preceding example that the attribute rules are divided into two sections: user attribute mapping rules and group attribute mapping rules. Specifying the object class in a mapping rule helps to uniquely map a specific attribute of an object.
You can customize mapping rules by adding new ones, modifying existing ones, or deleting some from the mapping rule set specified in the orclodipAttributeMappingRules
attribute. In general, to perform any of these operations, you identify the file containing the mapping rules, or store the value of the attribute for a file by using an ldapsearch
command as described in the Oracle Internet Directory Administrator's Guide.
You cannot edit the mapping rules in the Oracle Directory Integration and Provisioning Server Administration tool. Instead, mapping rules are stored in a file that you upload to the directory as a value of the attribute. To upload the mapping file, use the Directory Integration and Provisioning Assistant. Once you have created and uploaded the mapping file, you can maintain a copy of it in the $ORACLE_HOME/ldap/odi/conf directory, and upload it again after any future update.
dipassistant mp -profile profile name odip.profile.mapfile=map file
To add a new entry to the mapping rules file, edit this file and add a record to it. To do this:
Identify the connected directory attribute name and the object class that needs to be mapped to Oracle Internet Directory.
Identify the corresponding attribute name in Oracle Internet Directory and the object class to which it needs to be mapped.
Generate the mapping rule elements indicating the conversion that needs to be done on the attribute values.
Load the attribute mapping rule file to the synchronization profile.
For instance, if the e-mail attribute of an entry in the source directory needs to be mapped to the unique identifier of the destination, then it can be:
Email: : : inetorgperson: uid: : person:
After you identify an entry to be modified in the mapping rules file, generate the mapping rule element for the desired conversion of attribute values.
After you identify an entry to be deleted in the mapping rules file, you can either delete the entry from the file or comment it out by putting a hash mark (#) in front of it.
See Also:
|
Note: To run shell script tools on the Windows operating system, you need one of the following UNIX emulation utilities:
|
By default, a connector retrieves changes to all objects in the container configured for synchronization.However, you may be interested in synchronizing only certain types of changes, such as changes to just users and groups. While mapping rules allow you to specify how entries are converted from one directory to another, you can also filter objects that are synchronized between directories. Before changes from a connected directory are imported into Oracle Internet Directory, they can be filtered with the Connected Directory Matching Filter (orclODIPConDirMatchingFilter
) attribute in the synchronization profile. Similarly, before changes are exported from Oracle Internet Directory to a connected directory, they can be filtered with the OID Matching Filter (orclODIPOIDMatchingFilter
) attribute. For both attributes, you can specify a filter for connected directories that either obtain incremental changes through an LDAP search or that store changes in a change log, as described in the following sections:
You can use either the Oracle Directory Integration and Provisioning Server Administration tool or Directory Integration and Provisioning Assistant to update the matching filters.
For connected directories that obtain incremental changes through an LDAP search, such as Active Directory, use the following syntax to assign a value to the searchfilter
attribute of either the Connected Directory Matching Filter (orclODIPConDirMatchingFilter
) or the OID Matching Filter (orclODIPOIDMatchingFilter
):
"searchfilter=LDAP_SEARCH_FILTER"
The following example creates an LDAP search filter that retrieves organizational units, groups, and users, but not computers:
"searchfilter=(|(objectclass=group)(objectclass=organizationalUnit) (&(objectclass=user)(!(objectclass=computer))))"
For connected directories that store changes in a change log, you can use just the following simple operators, which are provided by Oracle Directory Integration and Provisioning, to specify a matching filter for either the Connected Directory Matching Filter (orclODIPConDirMatchingFilter
) or the OID Matching Filter (orclODIPOIDMatchingFilter
):
= (equal operator)
!= (not equal operator)
Note: Connected directories that obtain incremental changes through an LDAP search can also use the preceding operators without thesearchfilter attribute. However, you can only specify a single expression or the search will fail.
|
You can use the preceding operators with either LDAP or non-LDAP directories, provided they obtain incremental changes from a change log. Wildcards and pattern matching are not supported with the preceding operators if you do not use the searchfilter
attribute. However, when multiple operator pairs are including in the filter, the expression is evaluated as a logical AND operation. For example, the following expression includes four operator pairs:
"(objectclass=group)(objectclass=organizationalUnit) (objectclass=user)(objectclass!=computer)"
The preceding expression evaluates as follows:
objectclass is equal to group AND objectclass is equal to organizationalUnit AND objectclass is equal to user AND objectclass is NOT equal to computer
For connected directories that store changes in a change log, a matching filter can synchronize changes for only the attributes that appear in the change log. If you include attributes in a matching filter that do not appear in the change log, the search operation will fail. For this reason, matching filters are of limited use for connected directories that store incremental changes in a change log.
Table 6-4 tells you where to find the various files used in the directory integration profile and during synchronization.
Table 6-4 Location and Names of Files
File | File Name |
---|---|
Import data file | $ ORACLE_HOME/ldap/odi/data/import/Profile_Name.dat
|
Export data file | $ORACLE_HOME/ldap/odi/data/export/Profile_Name.dat |
Additional configuration info file | $ORACLE_HOME/ldap/odi/conf/Profile_Name.cfg |
Mapping rules file | $ORACLE_HOME/ldap/odi/conf/Profile_Name.map |
For example, the name of the data file of the Oracle Human Resources connector is oraclehrprofile.dat
.