2 Generating the Generic Scripting Connector

The procedure to generate the Generic Scripting connector is divided into the following stages:

2.1 Defining the Schema

You must define the schema of your target system to let the connector understand the underlying schema of the target system database.

This section discusses the following topics:

2.1.1 Understanding the Schema File Format

The schema file is a properties file that is used to represent the structure of your target system. It contains details such as datatypes, mandatory attributes, and the uid attribute that are specific to your target system.

The schema file is used as an input to the metadata generation utility. It is necessary to create a schema.properties file to help the connector understand the target system schema. Before running the metadata generation utility, you must populate the schema file in the specified format.

The schema file is a properties file and consists of name-value pairs. By default, the metadata generation utility generates metadata for an __ACCOUNT__ object class that is used to manage Users, groups, and organizations. If you want to generate metadata for an object class other than __ACCOUNT__, then include the following entry in the schema file:

ObjectClass=OBJ_CLASS_NAME

Here, OBJ_CLASS_NAME is the name of the object class for which you want to generate metadata. The following is a sample value for this entry:

ObjectClass=__Test__

The following sections discuss the format in which you must specify the value of each property:

2.1.1.1 Account Qualifiers

Account qualifiers describe certain attributes of an account in your target system. These qualifiers are common for the target system. You can define the schema of your target system by using the following qualifiers:

  • FieldNames

    This is a mandatory qualifier. It is a comma-separated list of attributes that the connector must fetch from the target system. All child form names, single-valued and multivalued attributes, including the attribute used for performing incremental reconciliation must be specified here.

    The following is a sample value for the FieldNames qualifier: FieldNames=UserId,UserName,FirstName,LastName,email,Description,Salary, JoiningDate,status,Groups,Roles

  • UidAttribute

    This is a mandatory qualifier. It refers to the name of the attribute that corresponds to the unique id of the account.

    For example: UidAttribute=UserId

  • NameAttribute

    This is a mandatory qualifier. This refers to the name of the attribute that corresponds to a descriptive name of the account.

    For example: NameAttribute=UserName

  • PasswordAttribute

    This is an optional qualifier. It refers to the name of the password attribute of the account.

    For example: PasswordAttribute=accountPwd

  • StatusAttribute

    This is an optional qualifier. It refers to the attribute which denotes the status of the account.

    For example: StatusAttribute=status

    Oracle Identity Manager requires the status value to be either True or False. However, if the attribute in the target system contains a value other than true or false, then you must ensure that your script manages the mapping between status values in your target system and Oracle Identity Manager.

2.1.1.2 Field Qualifiers

These qualifiers are specific to each field and are usually specified in one of the following formats:

  • The following is the format for parent form fields:

    <FIELDNAME>.<FIELDQUALIFIER>=<VALUE>

    Example: UserId.Required=true

  • The following is the format for complex child form fields:

    <FIELDNAME>.<SUBFIELDNAME>.<FIELDQUALIFIER>=<VALUE>.

    Example: Roles.fromdate.DataType=Long

The following are the field qualifiers for which values can be specified:

  • Required

    This field qualifier specifies if the mentioned attribute is mandatory. If the value of this qualifier is set to true, the parser will skip processing the records that do not contain this field name.

    For example: UserId.Required=true

  • Multivalued

    This field qualifier specifies if the mentioned attribute is a multivalued field.

    For example: Roles.Multivalued=true

  • DataType

    This field qualifier is used to specify the datatype of the field name. If you do not specify the data type for any field, then it is considered as a String data type by default.

    The following are the possible values for this qualifier:

    • String

    • Long

    • Character

    • Double

    • Float

    • Integer

    • Boolean

    • Byte

    • BigDecimal

    • BigInteger

    • Date

    For example: startDate.DataType=Date

  • Subfields

    This field qualifier specifies the subfields in a multivalued attribute if they are present.

    For example: Roles.Subfields=roleid,fromdate,todate

  • EmbeddedObjectClass

    This field qualifier specifies the object class name of child forms that have more than one subfield. The value of this qualifier is used internally by ICF and is mandatory for all complex child forms.

    For example: Roles.EmbeddedObjectClass=Roles

See Also:

Sample Schema File for the Target System for a sample schema file

2.1.2 Creating a Schema File

You must create a schema file describing the structure of your target system as follows:

Note:

You must create the schema.properties file on the computer on which you intend to run the metadata generation utility.

  1. Create a .properties file.
  2. Add entries in the schema file according to requirements of your environment.

    The following are the mandatory qualifiers that should be defined in the schema file:

    • FieldNames

    • UidAttribute

    • NameAttribute

  3. Provide values for each of the entries that you added. See Understanding the Schema File Format for more information about the format in which you must specify these values.
  4. Save the .properties file.

2.2 Preparing the Resource Properties File

By default, the connector provides the following parameters in the IT resource to store connection-related information about your target system:

Note:

You must create and place the resource.properties file on the computer that is hosting Oracle Identity Manager.

  • host

  • port

  • user

  • password

The connector uses this information to establish a connection from OIM to your target system to perform connector operations. If there are any additional parameters that the connector requires in the scripts being used for connector operations, then you must create a .properties file with these additional parameters. Ensure that the .properties file contains only parameters that are not already available in the default set of IT resource parameters. Including any default IT resource parameters in the .properties file results in creation of duplicate entries and the custom script that you have written for connecting to your target system might fail. For example, host is a parameter that is already available in the IT resource. If you include a host parameter in the .properties file, then your custom connection script fails.

The following is a sample of the resource properties file:

applicationName = IDM App
domain = sample.com
proxyHost = www-proxy.example.com
proxyPassword = 
proxyPort = 80
scopes = https://www.sample.com/auth/user

2.3 Configuring the ScriptConfiguration.groovy File

The Generic Scripting connector is shipped with a groovy file named ScriptConfiguration.groovy.

This section discusses the following topics related to configuring the groovy file:

2.3.1 About the ScriptConfiguration.groovy File

This ScriptConfiguration.groovy file is located in the genericscript-RELEASE_NUMBER/metadata-generator/resources directory of the connector installation ZIP.

You use the ScriptConfiguration.groovy file to specify values for properties that can store basic information about your target system schema. This file is used by the Scripting Generator to perform the following tasks:

  • Understand the schema

  • Configure the mode (trusted source or target resource) in which you want to run the connector

  • Generate the connector package specific to your target system

The procedure for running the Scripting Generator and directory structure of the generated connector package is discussed later in this chapter.

The ScriptConfiguration.groovy file contains sample configuration (one each for trusted source and target resource) with prepopulated values for most of the entries. Depending upon your requirements, specify or modify values for entries in this file or create new sections for your configuration. The following are the predefined sections in the ScriptConfiguration.groovy file:

  • trusted

    You specify values for the entries in this section if you want to configure the connector for the trusted source mode.

  • target

    You specify values for the entries in this section if you want to configure the connector for the target resource mode.

2.3.2 Understanding Entries in the Predefined Sections of the Groovy File

This section describes the entries in the predefined sections, trusted and target, of the ScriptConfiguration.groovy file.

Note:

  • Unless specified, all entries described here are common to both sections.

  • If you do not want to specify a value for any of the optional entries or attributes in the ScriptConfiguration.groovy file, then comment out that entry or attribute by prefixing it with the double-slash symbol (//).

  • itResourceDefName

    This is a mandatory entry. Enter the name of the IT resource type for the target system. Note that the value that you specify for this entry determines the name of the connector package, connector configuration file, and connector installer file. For example, if you specify GenScriptTrusted as the value of this entry, then the name of the connector package directory is GenScriptTrusted.zip. See Understanding the Generated Connector Package for the directory structure of the connector package.

  • itResourceName

    This is an optional entry. Enter the name of the IT resource for the target system. If this entry is commented, then the IT resource name will be the same as the value of the ITResourceDefName entry.

    Default value: "$itResourceDefName"

    Note:

    The value of this entry must be unique for each connector that you create for your target system, if you plan to install or use the connectors in the same OIM environment. In addition, this value will be a part of the names for all connector components (defined in the connector configuration XML file, which is created after you run the metadata generator) such as lookup definitions, resource objects, process forms, and scheduled tasks.

    For example, if you specify GenScriptTrusted as the value of itResourceName entry, then after you deploy the connector, the configuration lookup definition is created and its name will be Lookup.GenScriptTrusted.Configuration.

  • applicationInstanceName

    This is an optional entry and present only in the section for target resource configuration. Enter the name of the application instance for your target system that the connector must generate. If this entry is commented, then the application instance name will be the same as the value of the ITResourceDefName entry.

    Default value: "$itResourceDefName"

  • connectorDir

    This is an optional entry. This entry is the complete path to the directory that must contain the connector package that is generated when you run the metadata generator. By default, the name of the directory containing the generated connector package is the same as the value of the itResourceDefName entry.

    Sample value: "/scratch/jdoe/OIMPS3/mw4318/idm7854/server/ConnectorDefaultDirectory/GenScriptTrusted"

  • xmlFile

    This is an optional entry. Enter the name and relative path of the XML file that must contain definitions of the connector objects. If you do not specify a value for this entry, then the file name is generated in the following format:

    IT_RES_DEF_NAME-ConnectorConfig.xml

    In this format, IT_RES_DEF_NAME is the value of the itResourceDefName entry.

    For example, if you have not specified a value for this entry and GenScriptTrusted is the value of the itResourceDefName entry, then the name of the XML file that is generated is GenScriptTrusted-ConnectorConfig.xml.

    Note:

    To easily identify files of a specific target system installation, it is recommended that the names of this generated XML file be prefixed with the name of the IT resource for the target system.

    Sample value: GenScriptTrusted-ConnectorConfig.xml

  • configFileName

    This is an optional entry. Enter the name and relative path of the XML file that contains the configuration information of the connector objects. If you do not specify a value for this entry, then the file name is generated in the following format:

    IT_RES_DEF_NAME-CI.xml

    In this format, IT_RES_DEF_NAME is the value of the itResourceDefName entry.

    For example, if you have not specified a value for this entry and GenScriptTrusted is the value of the itResourceDefName entry, then the name of the XML file that is generated is GenScriptTrusted-CI.xml.

  • propertiesFile

    This is an optional entry. Enter the name and relative path of the .properties file which contains the resource bundle translations. If you do not specify a value for this entry, then the file name is generated in the following format:

    IT_RES_DEF_NAME-generator.properties

    In this format, IT_RES_DEF_NAME is the value of the itResourceDefName entry.

    For example, if you have not specified a value for this entry and GenScriptTrusted is the value of the itResourceDefName entry, then the name of the properties file that is generated is GenScriptTrusted-generator.properties.

  • version

    This is an optional entry. Enter the release number of the connector.

    Sample value: 11.1.1.5.0

  • trusted

    This is a mandatory entry and present only in the section for trusted source configuration. Set the value of the entry to true, if you are configuring the connector to run in the trusted source mode.

  • bundleJar

    This is a mandatory entry. Enter the name and relative path of the JAR file containing the ICF bundle that the metadata generator will use.

    Default value: ../lib/org.identityconnectors.genericscript-1.0.11150.jar

    Do not change the value of this entry.

  • config

    This is a mandatory entry in which you specify information about the connector configuration. This connector configuration contains information about the manner in which the connector must behave and connect to the target system.

    Table 2-1 lists and describes the properties of the Config entry.

    Table 2-1 Properties of the config Entry

    Property Mandatory? Description

    schemaFile

    Yes

    Enter the file URL of the schema file that you want to use.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/schema.properties

    See Defining the Schema for information about the schema file that you created.

    resourceProperties

    No

    Enter the file URL of the properties file containing connection-specific information related to your target system.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/resource.properties

    See Preparing the Resource Properties File for more information about creating this file.

    host

    Yes

    Host name or IP address of the computer hosting the target system.

    port

    Yes

    Port number at which the target system is listening.

    user

    Yes

    User ID or user name of the account in the target system that Oracle Identity Manager must use to connect to and access the target system during reconciliation and provisioning operations. This target system user account must have the necessary permissions to perform all connector operations.

    changeLogColumn

    No

    Optional name of the target system attribute where the last update-related number, non-decreasing, date or timestamp-based values are stored. Can also be a column name storing values that are not date or time stamp based (for example, numeric or strings).

    The data type of this target system attribute can be any of the data types supported by the target system.

    The values in this attribute are used during incremental reconciliation to determine the newest or most youngest record reconciled from the target system.

    Note: You must specify a value for this property if you want to perform incremental reconciliation.

    createScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform Create provisioning operations.

    Enter the file URL of the script containing the implementation to create objects in your target system. For example, enter the script containing the implementation to perform a create user account provisioning operation. When this script is called, the parent form data is added.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/create_user.groovy

    updateScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform Update provisioning operations.

    Enter the file URL of the script containing the implementation to update objects in your target system. For example, enter the script containing the implementation to perform an update user account provisioning operation. This script is called when you update the parent form, or enable or disable the user account.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/update_user.groovy

    deleteScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform Delete provisioning operations.

    Enter the file URL of the script containing the implementation to delete objects in your target system. For example, enter the script containing the implementation to perform a delete user account provisioning operation. This script is called when you remove or delete an account.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/delete_user.groovy

    executeQueryScript

    No

    Specify a value for this property if you want to configure the connector to perform reconciliation.

    Enter the file URL of the script containing the implementation to fetch objects from your target system. This script is called while performing an account search (operations such as full and filtered reconciliation).

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/recon_user.groovy

    lookupScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform lookup field synchronization.

    Enter the file URL of the script containing the implementation to fetch values of lookup attributes from your target system.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/lookup_field_sync.groovy

    syncScript

    No

    Specify a value for this property if you want the connector to perform incremental reconciliation.

    Enter the file URL of the script containing the implementation to fetch incremental changes for objects from your target system.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/increm_recon_user.groovy

    addMultiValuedAttributeScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform provisioning operations on child data.

    Enter the file URL of the script containing the implementation to add multivalued child data for objects in your target system. This script is called when you add multivalued child attributes.

    You must enter the file URL in the following format:

    file:///URL

    Sample value:

    file:///home/jdoe/scripts/add_mulval_attr.groovy

    removeMultiValuedAttributeScript

    No

    This property is present only in the section for target resource configuration.

    Specify a value for this property if you want the connector to perform provisioning operations on child data.

    Enter the file URL of the script containing the implementation to remove multivalued child data for objects in your target system. This script is called while removing multivalued child attributes.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/remove_mulval_attr.groovy

    connectionScript

    No

    Enter the file URL of the script containing the implementation to connect to the target system.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/connection.groovy

    checkAliveScript

    No

    Enter the file URL of the script containing the implementation to check whether the connector's physical connection to the target system is alive. This script must do only the minimum that is necessary to check that the connection is still alive

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/checkalive.groovy

    disposeScript

    No

    Enter the file URL of the script containing the implementation to dispose any configuration objects.

    You must enter the file URL in the following format:

    file:///URL

    Sample value: file:///home/jdoe/scripts/dispose.groovy

    scriptType

    Yes

    Enter the language in which the scripts have been written. The possible values are as follows:

    • GROOVY

    • BEANSHELL

    • JAVASCRIPT

    See Also:

    Understanding Script Arguments for information about the arguments that you can include in the custom scripts that you write to perform connector operations

  • lookupAttributeList

    This is an optional entry and is present only in the section for target resource configuration. Enter the list of attributes in your target system that must be handled as lookup fields.

    The connector creates a lookup field for each of the attributes specified in this entry and associates it with the corresponding lookup fields on the OIM User process form.

    If you want to create a lookup field for a single-valued or multivalued field, then enter the value in the following format:

    ['FIELD_NAME']

    In this format, replace FIELD_NAME with the name of the single or multivalued field.

    If you want create a lookup field for a multivalued field that is embedded, then enter the value in the following format:

    ['OBJ_CLASS.SUB_FIELD_NAME']

    In this format, replace:

    • OBJ_CLASS with the EmbeddedObjectClass name for the child form as specified in the schema file.

    • SUB_FIELD_NAME with the subfield name for the child form as specified in the schema file.

    The default value of this entry is:

    ['ROLES.ROLENAME','FirstName']

    In this value, ROLES.ROLENAME is a multivalued field that is embedded. In other words, ROLES is the EmbeddedObjectClass name for roles child form as specified in the schema file (that is, roles.EmbeddedObjectClass=Roles) and ROLENAME is one of the subfields for the roles child form as specified in the schema file (that is roles.Subfileds=ROLENAME). FirstName is a single-valued field.

    You can modify the default value to meet the requirements in your environment.

    For each of the attributes listed in the lookupAttributeList entry, the connector creates a lookup definition and scheduled job in the following format:

    • Lookup definition format:

      Lookup.${IT_RES_NAME}.${FIELD_NAME}

      This lookup definition holds the lookup values reconciled from the target system.

    • Scheduled job format:

      IT_RES_NAME Target FIELD_NAME Lookup Reconciliation

      This scheduled job is used to load or reconcile lookup values from your target system. See Scheduled Job for Lookup Field Synchronization for more information about the attributes of the scheduled job for lookup reconciliation.

    In both the formats, the connector replaces:

    • IT_RES_NAME with the value of the itResourceDefName entry.

    • FIELD_NAME with the name of the field for which the lookup field is created.

  • entitlementAttributeList

    This is also an optional entry and is present only in the section for target resource configuration. Enter the list of fully qualified attributes in the target system that must be tagged as entitlements.

    The connector creates a lookup field for each of the attributes specified in this entry, assigns the lookup fields to a process form, and adds all the required properties of entitlements.

    If you want to tag entitlements for multivalued fields, then enter the value in the following format:

    ["MULTIVALUED_FIELD_NAME"]

    If you want to tag entitlements for a multivalued field that is embedded, then enter the value in the following format:

    ["OBJ_CLASS.SUB_FIELD_NAME"]

    In this format, replace:

    • OBJ_CLASS with the EmbeddedObjectClass name for the child form as specified in the schema file.

    • SUB_FIELD_NAME with the subfield name for the child form as specified in the schema file.

    Default value: ["Roles.roleid","__GROUPS__"]

    You can modify the default value based on your schema.

    In this value, Roles.RoleId is an embedded multivalued field and __GROUPS__ is a multivalued field.

  • objectClassAlias

    This is an optional entry. Enter an alias for object class if it is other than ObjectClass.ACCOUNT_NAME or ObjectClass.GROUP_NAME.

    Default value: ['Person']

  • dateAttributeList

    This is an optional entry. Enter the list of attributes that must be handled as date on the process form. Ensure that the data type of the attributes listed here is set to Long in the schema file.

    The connector creates a date editor for each of the attributes specified in this entry.

    If you want to handle single-valued or multivalued fields as date, then enter the value in the following format:

    ["FIELD_NAME"]

    In this format, replace FIELD_NAME with the name of the single or multivalued field.

    If you want to handle an embedded multivalued field as date, then enter the value in the following format:

    ["OBJ_CLASS.SUB_FIELD_NAME"]

    In this format, replace:

    • OBJ_CLASS with the EmbeddedObjectClass name for the child form as specified in the schema file.

    • SUB_FIELD_NAME with the subfield name for the child form as specified in the schema file.

    Default value: ["JoiningDate","Roles.fromdate","Roles.todate"]

    You can modify the default value to meet the requirements in your environment.

    The following is a sample value for handling embedded multivalued fields as date:

    ["MyRole.StartDate", "MyRole.EndDate"]

  • alias

    This is a mandatory entry. The metadata generator uses aliases to create relationships between the attributes in the target system and resource object field names in Oracle Identity Manager. In addition, the metadata generator uses aliases to shorten long database names to meet the character-length restrictions on form names and form field names in Oracle Identity Manager. Aliasing can be used on column name, form name, and form field name levels. Note that the target system attributes are represented as connector attributes.

    Depending on the type of configuration, specify values for one of the following sections:

    • For trusted source configuration

      In the trusted source configuration section, you use the alias entry to map connector attributes or target system attributes to the OIM User form field names. The mappings that you specify here are used to populate entries in the Recon Attribute map lookup definition for trusted source reconciliation.

      Note that some of the OIM User form field names do not have the same display name internally. For such fields, you must ensure that you map the connector attribute or target system attribute to the internal name rather than the display name. The following table lists the names of the OIM User form display names and their corresponding internal names:

      Display Name Internal Name

      Organization

      Organization Name

      Manager

      Manager Login

      E-mail

      Email

      The following is the default value of the alias entry:

      ['__NAME__':'User Login', 'LastName':'Last Name','Organization':'Organization Name', 'Employee Type':'Xellerate Type', 'Role':'Role']

      In the default value, note that the "Organization" connector attribute has been mapped to "Organization Name", which is the internal name.

      You cannot delete existing mappings in the default value. However, you can modify these mappings.

      If you want to add mappings for fields other than the ones already present in the alias entry, then you can add them either to the existing values in the alias entry, or add them to the alias + entry.

      The following is the default value of the alias + entry:

      ['__ENABLE__':'Status', 'FirstName':'First Name', 'email':'Email', 'JoiningDate':'Start Date']

      The following is the format in which you must specify values for the alias and alias + entry:

      ['CONN_ATTR1': 'OIM_FIELD1', 'CONN_ATTR2': 'OIM_FIELD2', . . . 'CONN_ATTRn': 'OIM_FIELDn']
      

      In this format:

      • CONN_ATTR is the connector attribute name.

      • OIM_FIELD is the name of the field on the OIM User form.

    • For target resource configuration

      In the target resource configuration section, you use the alias entry for one or all of the following purposes:

      • To map connector attributes or target system attributes to fields of the process form. The mappings that you specify here are used to populate entries in the Recon Attribute map and Prov Attribute map lookup definitions for target resource reconciliation.

      • To set an alias (a unique and shortened name) for the IT resource name specified in the itResourceName entry.

      • To specify a short name for a lengthy process form field name.

        When the number of characters in a process form is more than 11, the metadata generator automatically truncates the process form name to 10 characters and then suffixes it with the digit 0. Subsequently, for every process form that results in the same name after truncating, the suffix is incremented by 1. The metadata generator prevents any two process forms from having the same name by using autonumbering. To gain control over the autogenerated form name and to have meaningful form names, you can use an alias to specify a shortened process form name.

        This is illustrated by the following example:

        Assume that the resource name is GENDB and contains child data that is represented as USER_ROLES in the schema.

        When you run the metadata generator, the process form is created and the form name is UD_GENDB_USER_ROLES. As the number of characters in this process form name is more than 11, the metadata generator automatically truncates it to UD_GENDB_U0. The truncated form name, UD_GENDB_U0, is not meaningful.

        To avoid encountering such issues or forms with autogenerated names, you can use the alias entry to specify short and meaningful process form names.

      The following is the default value of the alias entry in the target resource configuration section:

      ['__UID__':'UserId', '__NAME__':'UserId']

      You cannot delete existing mappings in the default value as they are mandatory. However, you must modify the default value to match the values of the UidAttribute and NameAttribute qualifiers in the schema file. For example, in the schema file, if you have set the values of the UidAttribute and NameAttribute qualifiers to UID and UserId respectively, then you must set the value of the alias entry to the following:

      ['__UID__':'UID', '__NAME__':'UserId']

      If you want to add mappings for fields other than the ones already present in the alias entry (in other words, optional aliases), then you can add them either to the existing values in the alias entry, or add them to the alias + entry.

      The following is the default value of the alias + entry in the target resource configuration section:

      ['USERROLERELATIONSHIP':'USRROL', 'comments':'Description', 'Family Name':'Last Name', 'Visibility':'Status']

      The following is the format in which you must specify values for the alias and alias + entries:

      ['CONN_ATTR1': 'ALIAS_FIELD1', 'CONN_ATTR2': 'ALIAS_FIELD2', . . . 'CONN_ATTRn': 'ALIAS_FIELDn']
      

      In this format:

      • CONN_ATTR is the connector attribute name.

      • ALIAS_FIELD is the alias corresponding to the connector attribute or target system attribute.

  • prepopulate

    This is an optional entry that is present only in the section for target resource configuration. Specify a value for this entry if you want Oracle Identity Manager to prepopulate connector's process form fields from OIM User fields while provisioning a enterprise target system resource.

    The default value of this entry is as follows:

    ['__NAME__':'User Login', 'FIRST_NAME':'First Name', 'LAST_NAME':'Last Name', '__PASSWORD__':'Password']

    This means that the groovy file is configured to prepopulate the following fields by default:

    • User Login

    • First Name

    • Last Name

    • Password

    You can add fields to or remove fields from the preceding list. The following is the format in which you must specify values for the prepopulate entry:

    ['CONN_ATTR1 or TARGET_ATTR1': 'OIM_FIELD1', 'CONN_ATTR2 or TARGET_ATTR2': 'OIM_FIELD2', . . . 'CONN_ATTRn or TARGET_ATTRn': 'OIM_FIELDn']
    

    In this format:

    • CONN_ATTR is the connector attribute name.

    • TARGET_ATTR is the target system attribute name.

    • OIM_FIELD is the name of the field on the OIM User form.

    See Working with Prepopulate Adapters in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager for more information about attaching and removing prepopulate adapters.

2.3.3 Configuring the Groovy File

To configure the ScriptConfiguration.groovy file:

  1. Download the connector installation ZIP file from Oracle Technology Network.
  2. Extract the contents of the connector installation ZIP to any directory on the computer on which you intend to run the metadata generation utility. This creates a directory named genericscript-RELEASE_NUMBER. See Files and Directories of the Generic Scripting Connector for information about all the files and directories in the connector installation ZIP.
  3. In a text editor, open the ScriptConfiguration.groovy file located in the genericscript-RELEASE_NUMBER/metadata-generator/resources directory.
  4. Specify values for entries in one of the following predefined sections:
    • trusted - for configuring the connector for trusted source mode.

    • target - for configuring the connector for target resource mode.

    See Also:

    Understanding Entries in the Predefined Sections of the Groovy File for information about entries in the predefined sections

  5. Save and close the ScriptConfiguration.groovy file.

2.4 Generating the Connector

After configuring the ScriptConfiguration.groovy file, you must run the metadata generator to generate the connector package based on your target system schema.

The metadata generator is the GenericScriptGenerator.cmd or GenericScriptGenerator.sh file that is located in the genericscript-RELEASE_NUMBER/metadata-generator/bin directory.

To run the metadata generator, in a command window, change to the genericscript-RELEASE_NUMBER/metadata-generator/bin directory (for example, genericscript-11.1.1.5.0/bin) and run one of the following commands depending on the operating system that you are using:

  • For Microsoft Windows

    GenericScriptGenerator.cmd CONFIG_FILE CONFIG_NAME

  • For UNIX

    GenericScriptGenerator.sh CONFIG_FILE CONFIG_NAME

In this command, replace:

  • CONFIG_FILE with the absolute or relative path name of the ScriptConfiguration.groovy file.

  • CONFIG_NAME with the name of the configuration within the ScriptConfiguration.groovy file, being used for the target system. The predefined configurations within this file are trusted and target. You can create additional custom configurations with different names depending on your requirements.

The following is a sample command:

GenericScriptGenerator.cmd ..\resources\ScriptConfiguration.groovy target

In this command, "target" denotes the name of the section in the ScriptConfiguration.groovy file for which values have been specified. In other words, the connector is being configured for the target resource mode.

If you encounter any errors while running the metadata generator, then you must fix it and then resume running the metadata generator.

2.4.1 Understanding the Generated Connector Package

The connector package is a ZIP file that is generated in the GenericScript-RELEASE_NUMBER/metadata-generator/ directory.

For example, if you have specified GenScript as the value of the itResourceDefName entry in the ScriptConfiguration.groovy file, then the connector package ZIP (GenScript.zip) file is generated in the GenericScript-11.1.1.5.0/metadata-generator/directory. The directory structure of the connector package is as follows:

CONNECTOR_PACKAGE/
         configuration/
                  IT_RES_DEF-CI.xml
         resources/
                  genericscript-generator.properties
         xml/
                  IT_RES_DEF-ConnectorConfig.xml

In this directory structure:

  • CONNECTOR_PACKAGE is replaced with the name of the IT resource definition specified as the value of the itResourceDefName entry in the ScriptConfiguration.groovy file.

  • IT_RES_DEF is replaced with the name of the IT resource definition specified as the value of the itResourceDefName entry in the ScriptConfiguration.groovy file.

The following behavior is observed after generation of the connector configuration XML file:

The length of a field (column) from the target system is not fetched into the process form. Therefore, except for the Unique ID and Password fields, the length of all other data fields (of the String data type) on the process form is always set to 255 characters. The length of the Unique ID and Password fields is set to 40 characters.