Oracle Internet Directory Administrator's Guide Release 9.0.2 Part Number A95192-01 |
|
This chapter contains these topics:
Migrating user data from an application-specific repository requires:
To enable this migration to happen, the Oracle Provisioning Integration Service relies on the application-specific repository exporting its data to an intermediate template file. This is not a pure LDIF file. Rather, records in this template file are in LDIF, but with substitution variables that the application itself leaves undefined--for you, the directory administrator, to define later in the process. These variables have to do with, for example, the location in the directory where the information is finally to reside.
To convert the user data from this intermediate template file into proper LDIF, you use the OID Migration Tool. Once the data is converted to LDIF, you can load it into the directory.
To summarize: Migrating data from application-specific repositories involves these general steps:
You can run the OID Migration Tool in one of two modes:
To migrate data from application-specific repositories, you create an intermediate template file, then run the OID Migration Tool.
Applications generating data in national languages must store that data in AL32UTF8 in the intermediate template file as specified in the IETF RFC 2849, "The LDAP Data Interchange Format (LDIF) - Technical Specification" available at http://www.ietf.org/rfc/rfc2849.txt.
When generating the intermediate template file, migrating applications must list all user records sequentially with a record separator as defined in RFC 2849. The OID User Migration Tool assigns all of these users to the default subscriber, which corresponds to the enterprise itself.
Figure I-1 shows the overall structure of the intermediate template file containing user entries.
The intermediate template file uses the following format to generate a valid user entry. All of the strings in bold text are supplied from the application-specific repository.
dn: cn=UserID, %s_UserContainerDN% sn: Last_Name orclGlobalID: GUID_for_User %s_UserNicknameAttribute%: UserID objectClass: inetOrgPerson objectClass: orclUserV2
In this template, the strings %s_UserContainerDN% and %s_UserNicknameAttribute% are substitution variables for which the OID Migration Tool provides values. The OID Migration Tool determines these values according to deployment-specific considerations. Either the application passes the arguments to the OID Migration Tool, or the tool retrieves them from the directory.
The following intermediate template file includes user entries generated by the application-specific migration logic. In this example, all of the data listed in bold text is from the application-specific user repository.
dn: cn=jdoe, %s_UserContainerDN% sn: Doe %s_UserNicknameAttribute%: jdoe objectClass: inetOrgPerson objectClass: orclUserV2 title: Member of Technical Staff homePhone: 415-584-5670 homePostalAddress: 234 Lez Drive$ Redwood City$ CA$ 94402
dn: cn=jsmith, %s_UserContainerDN% sn: Smith %s_UserNicknameAttribute%: jsmith objectClass: inetOrgPerson objectClass: orclUserV2 title: Member of Technical Staff homePhone: 650-584-5670 homePostalAddress: 232 Gonzalez Drive$ San Francisco$ CA$ 94404
dn: cn=lrider, %s_UserContainerDN% sn: Rider %s_UserNicknameAttribute%: lrider objectClass: inetOrgPerson objectClass: orclUserV2 title: Senior Member of Technical Staff homePhone: 650-584-5670
Once all of the user data is converted to the intermediate file format, the OID Migration Tool further converts it into a proper LDIF file that can be loaded into Oracle Internet Directory.
You can find examples of intermediate template files in $
SRCHOME
/ldap/schema/oid
.
Each user entry has mandatory and optional attributes.
Table I-1 lists and describes the mandatory attributes in a user entry.
The following are optional attributes from the inetOrgPerson
object class:
street |
homePostalAddress |
userPKCS12 |
See Also:
IETF Request for Comments 2798: "Definition of the |
The following are optional attributes from the orclUserV2
object class:
Once you have set up the intermediate template file, the OID Migration Tool, described in the next section, enables you to bring all pertinent data from the application-specific repository into Oracle Internet Directory. Once you have migrated the data, you can update whatever portion of it is relevant to the application by synchronizing that application with Oracle Internet Directory. You synchronize by using either the Oracle Directory Synchronization Service or the Oracle Provisioning Integration Service.
Use the OID Migration Tool when you are migrating data from application-specific repositories into Oracle Internet Directory. The OID Migration Tool produces an LDIF file, which is suitable for loading into a directory server by using the standard command-line tools. The input to this tool is a pseudo-LDIF file containing substitution variables. The tool is called ldifmigrator and it exists in ORACLE_HOME
/bin
.
The syntax of the ldifmigrator tool is as follows:
$ ldifmigrator Input_file=my_users.dat" "Output_file=my_users.ldif"[-lookup "Host=directoryName" ["Port=portnumber"] "DN=bindDn" ["Password=password"] ["Subscriber=subscribername"]] {"s_SubVar1=val1" ..."s_SubVarN=valN" }
Table I-3 describes the command-line parameters used by this tool in further detail:
The following table describes a set of pre-defined substitution variables. If it is running in the lookup mode, the OID Migration Tool can automatically determine the values of these variables by looking them up Oracle Internet Directory.
The OID Migration Tool obtains the values of the pre-defined substitution variables only in the lookup mode. Users can override the value of any of the above variables in the `lookup' mode by specifying the variable and a different value in the command line. The user can also specify substitution variables other than the ones listed in the table below and their values in the command line.
Consider the input file sample.dat
whose contents are as follows:
dn: cn=jdoe, %s_UserContainerDN% sn: Doe %s_UserNicknameAttribute%: jdoe objectClass: inetOrgPerson objectClass: orclUserV2 title: Member of Technical Staff homePhone: 415-584-5670 homePostalAddress: 234 Lez Drive$ Redwood City$ CA$ 94402 ou: %s_UserOrganization%
The following sections describe how the OID Migration Tool can be used to transform the above template into a valid LDIF ready to be loaded into Oracle Internet Directory.
In this example, the Oracle directory server is present in the environment, and the deployment wants the migration tool to lookup the directory server to figure out certain substitution variables. It will issue the following command:
$ldifmigrator "input_file=sample.dat" "output_file=sample.ldif" -lookup "host=ldap.acme.com" "subscriber=acme" "s_UserOrganization=Development"
On executing the above command, the directory server running on ldap.acme.com will be contacted and the following values of the substitution variables for the subscriber "acme" will be obtained:
Variable Name | Value Obtained from ldap.acme.com |
---|---|
% s_UserContainerDN% |
cn=Users,o=acme,dc=com |
%s_UserNicknameAttribute% |
uid |
In addition to the above variables, the OID Migration Tool will also honor the command-line variable called s_UserOrganization and substitute all occurrences of it with the value `Development'. In this case the output of the tool stored in sample.ldif
will be as follows (the substituted values are shown in italics):
dn: cn=jdoe,cn=Users,o=Acme,dc=com sn: Doe uid: jdoe objectClass: inetOrgPerson objectClass: orclUserV2 title: Member of Technical Staff homePhone: 415-584-5670 homePostalAddress: 234 Lez Drive$ Redwood City$ CA$ 94402 ou: Development
The same output as shown in the previous example could have been obtained by specifying all of the values in the command line (without using the -lookup option). The following command line example describes how one would use the Migration tool without the lookup mode:
$ldifmigrator "input_file=sample.dat" "output_file=sample.ldif" "s_ UserContainerDN=cn=Users,o=Acme,dc=com" "s_UserNicknameAttribute=uid" "s_ UserOrganization=Development"
In some cases, a deployment would like to use the OID Migration Tool in the lookup mode but would also like to override the values of one or more of the pre-defined substitution variables. This can be done by specifying the override value in the command line. The following command line shows how one can set the UserNickNameAttribute to `cn' overriding the default of `uid':
$ldifmigrator "input_file=sample.dat" "output_file=sample.ldif" -lookup "host=ldap.acme.com" "subscriber=acme" "s_UserOrganization=Development"
"s_UserNicknameAttribute=cn"
On executing the above command, the directory server running on ldap.acme.com will be contacted and the following values of the substitution variables for the subscriber "acme" will be obtained:
Variable Name | Value Obtained from ldap.acme.com |
---|---|
% s_UserContainerDN% |
cn=Users,o=acme,dc=com |
%s_UserNicknameAttribute% |
uid (this is over-ridden by command line specification) |
Since s_UserNicknameAttribute
is specified on the command line, the OID Migration Tool will ignore the value obtained from the directory and use the value specified in the command line. In addition to the above variables, the migration tool will also honor the command-line variable called s_UserOrganization
and substitute all occurrences of it with the value `Development'. In this case the output of the tool stored in sample.ldif
will be as follows (the substituted values are shown in italics):
dn: cn=jdoe,cn=Users,o=Acme,dc=com sn: Doe cn: jdoe objectClass: inetOrgPerson objectClass: orclUserV2 title: Member of Technical Staff homePhone: 415-584-5670 homePostalAddress: 234 Lez Drive$ Redwood City$ CA$ 94402 ou: Development
The OID Migration Tool can display these error messages:
When an error condition occurs, the log messages are logged to this file: ORACLE_HOME
/ldap/install/LDIFMig_YYYY_MM_DD_HH_SS.log
.
|
Copyright © 1999, 2002 Oracle Corporation. All Rights Reserved. |
|