18.07.2014 Views

Identity Manager 4.0.1 Driver for Scripting Implementation ... - NetIQ

Identity Manager 4.0.1 Driver for Scripting Implementation ... - NetIQ

Identity Manager 4.0.1 Driver for Scripting Implementation ... - NetIQ

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.5.2 Policy and Script Development<br />

At this point you should have a list of what data will be synchronized, how events will be handled<br />

and what application tools are available. It is time to develop the heart of your driver in policies and<br />

scripts.<br />

Many types of tasks can be handled in driver policies. You can import the driver configuration<br />

provided with the <strong>Scripting</strong> driver, and then edit policies in Novell i<strong>Manager</strong>. You can also edit<br />

policies and simulate their operation in Novell Designer. The extensive functionality of policies is<br />

outside the scope of this document, so you should refer to the appropriate publications at the <strong>Identity</strong><br />

<strong>Manager</strong> <strong>4.0.1</strong> Documentation Web site (http://www.novell.com/documentation/idm401).<br />

It’s often difficult to write complex tasks inside policies, such as executing external commands,<br />

processing input and output, and file I/O. Tasks requiring such operations are better suited in scripts,<br />

where an entire language environment and tools are available. You can also accomplish many of the<br />

operations per<strong>for</strong>med in policies, so if you are more familiar with your scripting language than<br />

policies, you can develop your driver more quickly by using scripts. <strong>Scripting</strong> languages such as<br />

Perl and Shell scripts offer an environment that is often well suited <strong>for</strong> your target application’s APIs<br />

or developer kits. For example, your target application might already contain Perl library routines<br />

<strong>for</strong> manipulating the application’s identities.<br />

Event Data Format<br />

Event data is submitted to the scripts in name/value pair <strong>for</strong>mat. This <strong>for</strong>mat consists of lines<br />

containing a name, an equal sign (=) and a value. There<strong>for</strong>e each line is a name/value pair. Each<br />

name/value pair is unique, but there can be multiple name/value pairs with identical names but<br />

different values.<br />

ASSOCIATION=BobUser<br />

ADD_TELEPHONE=818-555-2100<br />

ADD_TELEPHONE=818-555-9842<br />

You typically don’t need to worry about the <strong>for</strong>mat. The script library provides functions <strong>for</strong><br />

retrieving event data.<br />

Subscriber Script Development<br />

After all Policy processing is complete, <strong>Identity</strong> <strong>Manager</strong> submits the event in XML <strong>for</strong>mat to the<br />

driver shim. The driver shim submits the event data to the scripts.<br />

In the default <strong>Scripting</strong> driver, the subscriber.sh script in the scripts folder is called. This script<br />

does some preliminary processing, and then calls a routine from an included script. The included<br />

scripts correspond to the Subscriber event types: add.sh, modify.sh, modify-password.sh,<br />

delete.sh, rename.sh, move.sh, and query.sh.<br />

For each event type, you should retrieve the in<strong>for</strong>mation you need from the event data, submit<br />

changes to the external application using application-provided tools, and return a status (such as<br />

success or failure) to <strong>Identity</strong> <strong>Manager</strong>.<br />

Event data is retrieved primarily using the IDMGETVAR function. For detailed in<strong>for</strong>mation on how<br />

to use IDMGETVAR, see Section C.1, “UNIX Shell (idmlib.sh) Reference,” on page 143.This<br />

function returns an array of values corresponding to the name specified as the function’s parameter.<br />

The following table shows many item names.<br />

Customizing the <strong>Scripting</strong> <strong>Driver</strong> 47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!