Skip Headers

Oracle® Internet Directory Administrator's Guide
10g (9.0.4)

Part Number B12118-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to beginning of chapter Go to next page

Oracle Directory Synchronization Service , 2 of 4


About Connectors and Directory Integration Profiles

This section contains these topics:

Connectors for Directory Synchronization

To synchronize between Oracle Internet Directory and a connected directory, the Oracle Directory Integration and Provisioning platform relies on a prepackaged connectivity solution called a connector. Minimally, this connector consists of a directory integration profile containing all the configuration information required for synchronization.

Using Connectors with Supported Interfaces

When synchronizing between Oracle Internet Directory and a connected directory, the Oracle Directory Integration and Provisioning platform uses one of these interfaces: DB, LDAP, tagged, or LDIF. If the connected directory uses one of these interfaces, then the connector requires only a directory integration profile for synchronization to occur. For example, the SunONE connector provided with Oracle Internet Directory uses the LDAP interface to read the changes from the SunONE Directory Server. The changes are in the format specific to SunONE Directory Server and can be determined by doing an ldapsearch in the SunONE Directory Server.

Using Connectors Without Supported Interfaces

If a connected directory cannot use one of the interfaces supported by the Oracle Directory Integration and Provisioning platform, then, in addition to the directory integration profile, it requires an agent. The agent transforms the data from one of the formats supported by the Oracle Directory Integration and Provisioning platform into one supported by the connected directory. An example is the Oracle Human Resources connector. It has both a prepackaged integration profile and an Oracle Human Resources agent. To communicate with Oracle Internet Directory, the agent uses the tagged file format supported by the Oracle Directory Integration and Provisioning platform. To communicate with the Oracle Human Resources system, it uses SQL (through an OCI interface).

Synchronization Scenarios

Depending on where the changes are made, synchronization can occur:

Regardless of the direction in which the data flows, it is assumed that:

Synchronizing from Oracle Internet Directory to a Connected Directory

Oracle Internet Directory maintains a change log in which it stores incremental changes made to directory objects. It stores these changes sequentially based on the change log number.

Synchronization from Oracle Internet Directory to a connected directory makes use of this change log. Consequently, when running the Oracle directory integration and provisioning server, you must start Oracle Internet Directory with the default setting in which change logging is enabled. If change logging is disabled, you can enable it by using the -l flag in the OID Control Utility (OIDCTL) as described in "Starting an Oracle Directory Server Instance".

Each time the Oracle Directory Synchronization Service processes a synchronization profile, it:

  1. Retrieves the latest change log number up to which all changes have been applied

  2. Checks each change log entry more recent than that number

  3. Selects changes to be synchronized with the connected directory by using the filtering rules in the profile

  4. Applies the mapping rules to the entry and makes the corresponding changes in the connected directory

The appropriate entries or attributes are then updated in that connected directory. If the connected directory does not use DB, LDAP, tagged, or LDIF formats directly, then the agent identified in its profile is invoked. The number of the last change successfully used is then stored in the profile.

Periodically, Oracle Internet Directory purges the change log after all profiles have used what they need, and identifies where subsequent synchronization should begin.

Synchronizing from a Connected Directory to Oracle Internet Directory

When a connected directory uses DB, LDAP, tagged, or LDIF formats directly, changes to its entries or attributes can be automatically synchronized by the Oracle Directory Synchronization Service. Otherwise, the connector has an agent in its synchronization profile, which writes the changes to a file in the LDIF or tagged format. The Oracle Directory Synchronization Service then uses this file of connected directory data to update Oracle Internet Directory.

Synchronizing with Directories with Interfaces Not Supported by Oracle Internet Directory

Some connected directories cannot receive data by using any of the interfaces supported by Oracle Internet Directory. Profiles for this type of directory contain an attribute identifying a separate program for synchronization, called an agent. The agent translates between the connected directory's unique format and a DB, LDAP, tagged, or LDIF file containing the synchronization data. The agent, as identified in the profile, is invoked by the Oracle Directory Synchronization Service.

When exporting data from Oracle Internet Directory to this type of connected directory, the Oracle Directory Synchronization Service creates the necessary file in the tagged or LDIF format. The agent then reads that file, translates it into the correct format for the receiving connected directory, and stores the data in that directory.

When importing data from this type of connected directory to Oracle Internet Directory, the agent creates the necessary tagged or LDIF format file. The Oracle Directory Synchronization Service then uses this file data to update the Oracle Internet Directory.

Directory Synchronization Profiles

A directory integration profile for synchronization, called a directory synchronization profile, contains all the configuration information required for synchronization including:

Registration of Connectors into the Oracle Directory Integration and Provisioning Platform

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-20.

To create the profile, you can use either Oracle Directory Manager or the Directory Integration and Provisioning Assistant as described in subsequent sections of this chapter. If you use the Directory Integration and Provisioning Assistant, then you do not need to perform a separate operation to upload the mapping and configuration files.

Most of the information needed to synchronize the data with the connected directory--such as account name, password, host name, port number--is stored in the synchronization profile. However, if the connector execution requires any additional information, it can be stored in the orclOdipAgentConfigInfo attribute of the synchronization profile entry as described in the previous section, "Directory Synchronization Profiles".

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.

Format of the Mapping Rules Attribute

The mapping rules attribute enables you to specify how to convert entries from one directory to another. You can specify domain-level 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]:[DstAttr
Type]:[DstObjectClass]:[AttrMappingRule1]
srcAttrName1,srcAttrName2:[ReqAttrSeq]:[SrcAttrType]:[SrcObjectClass]:[dstAttrNa
me2]:[DstAttrType]:[DstObjectClass]:[AttrMappingRule2]
###

where the expansion of each srcAttrName1 and srcAttrName2 would be a single, unwrapped long line.

Domain Level Mapping

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 33-1.

Table 33-1  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. It is optional, and if not specified, takes the value of SrcDomainName under valid conditions. For destinations other than LDAP and LDIF, specify NONLDAP. Because "import" and "export" always refer to Oracle Internet Directory, a combination of NONLDAP:NONLDAP is not allowed.

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. This rule is used to construct the destination DN from the source domain name, from the attribute given in AttributeRules, or both. This field is typically of the form cn=%,l=%,o=oracle,dc=com. Such specifications are used to put entries under different domains or containers in the directory. In case of non-LDAP sources, this rule indicates the way the target DN needs to be formed to place the entries in the directory.

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.

Attribute Level Mapping

The attribute rule specifications appear after a line containing only the keyword AttributeRules. Each attribute rule is represented with the components, separated by colons, and described in Table 33-2. The attribute rule specifications end with a line containing only the characters ###.

Table 33-2  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 Oracle9i Database Server repositories, it refers to the ColumnName in the table specified by the SrcClassName.

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 Oracle9i Database Server 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 Oracle9i Database Server repositories, it refers to the ColumnName in the table specified by the SrcClassName.

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. The Oracle Directory Integration and Provisioning platform 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 Oracle9i Database Server 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.


How to Construct a New Mapping File

To create a new mapping file, follow these steps:

  1. Identify the container(s) of interest for synchronization in the source directory.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Supported Attribute Mapping Rules and Examples

The attribute mapping rules supported are:

Example: A Mapping File for a TAGGED-File Interface

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. 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.

Mapping rules are flexible: They can include both one-to-many and many-to-one mappings.

Example: Mapping Files for an LDIF Interface

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:

Updating Mapping Rules

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 "ldapsearch Syntax".

You cannot edit the mapping rules in Oracle Directory Manager. 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 or the utility ldapuploadagentfile.sh. 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

See Also:

"The Directory Integration and Provisioning Assistant"

"The ldapUploadAgentFile.sh Tool Syntax"

Adding an Entry to the Mapping Rules File

To add a new entry to the mapping rules file, edit this file and add a record to it. To do this:

  1. Identify the connected directory attribute name and the object class that needs to be mapped to Oracle Internet Directory.

  2. Identify the corresponding attribute name in Oracle Internet Directory and the object class to which it needs to be mapped.

  3. Generate the mapping rule elements indicating the conversion that needs to be done on the attribute values.

  4. 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:
    
Modifying an Entry in the Mapping Rules File

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.

Deleting an Entry from the Mapping Rules File

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:


Location and Naming of Files

Table 33-3 tells you where to find the various files used in the directory integration profile and during synchronization.

Table 33-3  Location and Names of Files
File File Name

Import DataFile

$ORACLE_HOME/ldap/odi/data/import/Profile_Name.dat

Export Data File

$ORACLE_HOME/ldap/odi/data/export/Profile_Name.dat

Additional Configuration Info

$ORACLE_HOME/ldap/odi/conf /Profile_Name.cfg

Mapping Rules

$ORACLE_HOME/ldap/odi/conf /Profile_Name.map

For example, the datafile name of the Oracle Human Resources connector is oraclehrprofile.dat.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1999, 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index