Converse agora com nosso suporte
Chat com o suporte

Quick Connect Sync Engine 5.5 - Administrator Guide

One Identity Quick Connect Overview Deploying One Identity Quick Connect Sync Engine Getting started Connections to external data systems Synchronizing identity data Mapping objects Automated password synchronization Synchronization history Scenarios of use Appendices

Appendices

Appendices

Appendix A: Developing PowerShell scripts for attribute synchronization rules

Appendices > Appendix A: Developing PowerShell scripts for attribute synchronization rules

You can configure synchronization rules for steps performing such as provisioning, deprovisioning, or update synchronization rules. One Identity Quick Connect Sync Engine provides a user interface (Quick Connect Administration Console) that allows you to set up a direct or rules-based synchronization rule without any coding (for more information, refer to the Quick Connect Administrator Guide).

However, to set up a script-based synchronization rule, you must develop a Windows PowerShell script that will build values of the target object attributes using values of the source object attributes.

This section provides some reference materials on using the Windows PowerShell Script Host feature and provides the sample script.

Accessing source and target objects using built-in hash tables

Appendices > Appendix A: Developing PowerShell scripts for attribute synchronization rules > Accessing source and target objects using built-in hash tables

One Identity Quick Connect Sync Engine synchronizes data between the source and target objects using the pre-configured synchronization rules.

In the PowerShell scripts used to set up the script-based synchronization rules, you can employ the $srcObj and $dstObj built-in associative arrays (hash tables) that allow the scripts to access the current values of attributes of the source and target objects, respectively. The array keys names are names of the object attributes.

For more information about the use of the associative arrays, refer to Windows PowerShell documentation.

In addition to $srcObj and $dstObj, Quick Connect defines the $Request built-in hash table. The $Request key names are also names of the object attributes. The $Request hash table contains new values of the target object attributes to which the target object attributes must be set after completing the synchronization process.

To clarify the use of built-in hash tables, let us consider the following scenario: you synchronize between the "mail" attributes of user objects in an LDAP directory (source connected system) and ActiveRoles Server (target connected system) using the following synchronization rule: the value of the "mail" attribute in the target connected system must be equal to that in the source connected system concatenated with current date.

For example, before the synchronization process started, the source object had the "mail" attribute: JDoe@mail1.mycompany.com, the target object had the "mail" attribute: JDoe@mail2009.mycompany.com. After the synchronization process completes, the target user will have the following mail: JDoe@mail1.mycompany.com (5 December, 2012) (if you performed the synchronization process on 5 December, 2012.

The following code snippet illustrates the use of built-in hash tables:

#Returns "JDoe@mail1.mycompany.com

$strSourceMail=$srcObj["mail"]

#Returns JDoe@mail2009.mycompany.com

$strTargetMail=$DstObj["mail"]

#Returns JDoe@mail1.mycompany.com (5 January, 2010)

$strNewMail=$Request["mail"]

Example script

The following script illustrates the use of $srcObj.

A provisioning task (provisioning step of a synchronization workflow as applied to Quick Connect) causes One Identity Quick Connect Sync Engine to provision user identity information from a delimited text file to Active Directory using the following provisioning rule: the "co" attribute in all provisioned users must be set to the name of country where the user lives. The script-based provisioning rule calculates the "co" attribute value basing on the user's city (the "City" attribute in the connected data source).

The following script implements the described scenario:

# --- Retrieve the City attribute of the user object in connected data source.

$userCity = $srcObj["City"]

# --- Determine the user's country

switch ($UserCity)

{

"New York" {$country = "United States"; break}

"Paris" {$country = "France"; break}

"Tokyo" {$country = "Japan"; break}

default {$country = "Unknown"}

}

# --- Return the user country. The script-based provisioning rule

# --- assigns this value to the "co" attribute in the provisioned user object.

$country

# End of the script

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação