Bi Impl Scripting PDF
Bi Impl Scripting PDF
Bi Impl Scripting PDF
For purposes of clarity, any module, adapter or other similar material ("Module") is licensed under the terms and
conditions of the End User License Agreement for the applicable version of the NetIQ product or software to which it
relates or interoperates with, and by accessing, copying or using a Module you agree to be bound by such terms. If you do
not agree to the terms of the End User License Agreement you are not authorized to use, access or copy a Module and you
must destroy all copies of the Module and contact NetIQ for further instructions.
This document and the software described in this document may not be lent, sold, or given away without the prior written
permission of NetIQ Corporation and Omnibond Systems, LLC., except as otherwise permitted by law. Except as expressly
set forth in such license agreement or non-disclosure agreement, no part of this document or the software described in
this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, or otherwise, without the prior written consent of NetIQ Corporation and Omnibond Systems, LLC. Some
companies, names, and data in this document are used for illustration purposes and may not represent real companies,
individuals, or data.
This document could include technical inaccuracies or typographical errors. Changes are periodically made to the
information herein. These changes may be incorporated in new editions of this document. NetIQ Corporation and
Omnibond Systems, LLC. may make improvements in or changes to the software described in this document at any time.
U.S. Government Restricted Rights: If the software and documentation are being acquired by or on behalf of the U.S.
Government or by a U.S. Government prime contractor or subcontractor (at any tier), in accordance with 48 C.F.R.
227.7202-4 (for Department of Defense (DOD) acquisitions) and 48 C.F.R. 2.101 and 12.212 (for non-DOD acquisitions), the
government’s rights in the software and documentation, including its rights to use, modify, reproduce, release, perform,
display or disclose the software or documentation, will be subject in all respects to the commercial license rights and
restrictions provided in the license agreement.
© 2021 Omnibond Systems, LLC. All Rights Reserved. Licensed to NetIQ Corporation. Portions copyright © 2021 NetIQ
Corporation. All Rights Reserved.
Third-Party Materials
All third-party trademarks are the property of their respective owners.
2
Contents
1 Overview 11
Driver Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Publisher Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Subscriber Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Scriptable Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Schema File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Include/Exclude File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Loopback State Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Contents 3
4 Configuring the Scripting Driver 31
Driver Parameters and Global Configuration Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Properties That Can Be Set Only During Driver Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Driver Configuration Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Global Configuration Values Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The Driver Shim Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4 Contents
7 Securing the Scripting Driver 131
Using SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Physical Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Network Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Driver Security Certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Driver Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
The Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Driver Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Driver Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Administrative Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Connected Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
A Troubleshooting 135
Driver Status and Diagnostic Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
The System Log (Linux/UNIX only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
The Trace File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
The Script Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
DSTRACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
The Status Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Troubleshooting Common Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Driver Shim Installation Failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Driver Rules Installation Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Driver Certificate Setup Failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Driver Start Failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Driver Shim Startup or Communication Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Users or Groups Are Not Provisioned to the Connected System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Users or Groups Are Not Provisioned to the Identity Vault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Identity Vault User Passwords Are Not Provisioned to the Connected System . . . . . . . . . . . . . . . . 140
Connected System User Passwords Are Not Provisioned to the Identity Vault . . . . . . . . . . . . . . . . 140
Metadirectory Objects Are Not Modified, Deleted, Renamed, or Moved . . . . . . . . . . . . . . . . . . . . 140
Shared Memory Errors (Linux/UNIX only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Contents 5
Subscriber Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Publisher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Query Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Heartbeat Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Perl (IDMLib.pm) Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Subscriber Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Publisher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Query Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Heartbeat Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Python (idmlib.py) Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Subscriber Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Publisher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Query Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Heartbeat Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Microsoft VBScript (IDMLib.vbs) Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Subscriber Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Publisher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Query Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Heartbeat Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Windows PowerShell (IDMLib.ps1) Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Subscriber Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Publisher Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Query Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Heartbeat Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
6 Contents
About this Book and the Library
This guide describes implementation of the NetIQ® Identity Manager 4.8 driver for Scripting.
The driver synchronizes data from a connected system through a scriptable interface with Identity
Manager 4.0, the comprehensive identity management suite that allows organizations to manage
the full user life cycle, from initial hire, through ongoing changes, to ultimate retirement of the user
relationship.
We are a global, enterprise software company, with a focus on the three persistent challenges in
your environment: Change, complexity and risk—and how we can help you control them.
Our Viewpoint
Adapting to change and managing complexity and risk are nothing new
In fact, of all the challenges you face, these are perhaps the most prominent variables that deny
you the control you need to securely measure, monitor, and manage your physical, virtual, and
cloud computing environments.
Enabling critical business services, better and faster
We believe that providing as much control as possible to IT organizations is the only way to
enable timelier and cost effective delivery of services. Persistent pressures like change and
complexity will only continue to increase as organizations continue to change and the
technologies needed to manage them become inherently more complex.
Our Philosophy
Selling intelligent solutions, not just software
In order to provide reliable control, we first make sure we understand the real-world scenarios
in which IT organizations like yours operate — day in and day out. That's the only way we can
develop practical, intelligent IT solutions that successfully yield proven, measurable results. And
that's so much more rewarding than simply selling software.
Driving your success is our passion
We place your success at the heart of how we do business. From product inception to
deployment, we understand that you need IT solutions that work well and integrate seamlessly
with your existing investments; you need ongoing support and training post-deployment; and
you need someone that is truly easy to work with — for a change. Ultimately, when you
succeed, we all succeed.
Our Solutions
Identity & Access Governance
Access Management
Security Management
Systems & Application Management
Workload Management
Service Management
Worldwide: www.netiq.com/about_netiq/officelocations.asp
Email: [email protected]
Worldwide: www.netiq.com/support/contactinfo.asp
Email: [email protected]
The Identity Manager 4.8 driver for Scripting synchronizes data between the Identity Vault and a
connected system using a scripting environment suitable for the target application. Languages such
as Shell, Perl* and Microsoft* VBScript* can be used to extend the base set of sample scripts to
update and retrieve information from the target application. Traditional driver development is
accomplished with Java* and the Policy Builder. With the Scripting environment, driver development
can be done in alternate languages, which provide a large set of packages and complex language
syntax. In addition, your target application might already provide management tools, commands, or
APIs written or easily accessible in Perl, Shell Script or VBScript.
The Scripting driver runs on a large number of Linux and UNIX platforms, including Linux, Solaris*,
AIX* and HP-UX*. In addition, a Microsoft Windows* service is available for applications that run on
the Windows platform. The driver also uses embedded Remote Loader technology to communicate
with the Identity Vault, bidirectionally synchronizing changes between the Identity Vault and the
connected system. The embedded Remote Loader component, also called the driver shim, runs as a
native process on the connected Linux or UNIX system or a Windows service on a Windows system.
There is no requirement to install Java on the connected system. The simplicity of installation,
configuration and security provides an excellent environment for the development of new drivers.
Major topics in this section include
“Driver Architecture” on page 11
“Configuration Overview” on page 13
Driver Architecture
The Scripting driver synchronizes information between the Identity Vault and an external account
management system (the connected system).
The Identity Manager detects relevant changes to identities in the Identity Vault and notifies the
Subscriber component of the driver. After customizable policy processing, events are sent to the
Subscriber shim of the embedded Remote Loader process on the connected system. The Subscriber
shim securely passes the information to customizable scripts that perform the required actions.
A process on the connected system polls the account management system for changes at a
configurable interval. If the poll returns identity changes, they are written to the change log.
The Publisher shim of the embedded Remote Loader process submits the changes from the change
log to the Metadirectory engine as events. The Metadirectory engine processes these events using
customizable policies and posts relevant changes to the Identity Vault.
Topics in this section include
“Publisher Channel” on page 12
“Subscriber Channel” on page 13
“Scriptable Framework” on page 13
Overview 11
“Schema File” on page 13
“Include/Exclude File” on page 13
“Loopback State Files” on page 13
Publisher Channel
The Publisher shim provides identity change information to the Metadirectory engine as XDS event
documents. The Metadirectory engine applies policies, takes the appropriate actions, and posts the
events to the Identity Vault.
Change Log
The change log stores identity changes in encrypted form. The polling script uses the change log
update command to record identity changes it detects. Events are removed from the change log by
the Publisher shim at configurable intervals and submitted to the Metadirectory engine for
processing. If communication with the Metadirectory engine is temporarily lost, events remain in
the change log until communication becomes available again.
Polling Script
The polling script periodically scans the local account management system for modifications that
have occurred since the last polling interval. If necessary, the polling script updates the change log by
calling the change log update command. You can specify the polling interval during installation and
by subsequent configuration of the Driver object.
Publisher Shim
The Publisher shim periodically scans the change log for events. Before scanning the change log, the
driver calls the polling script to check the local system for changes that might have been made since
the previous poll.
When the Publisher shim finds events in the change log, it decrypts, processes, and sends them to
the Metadirectory engine in XDS format over a Secure Sockets Layer (SSL) network link.
12 Overview
Subscriber Channel
The Subscriber channel receives XDS command documents from the Metadirectory engine and calls
the appropriate script or scripts to handle the command.
The provided scripts must be customized to handle connected system events. For more information
see Chapter 5, “Customizing the Scripting Driver,” on page 41.
Scriptable Framework
The interface between the connected system and the driver shim uses customizable scripts. You
must extend the scripts that are provided with the driver to support your connected system. Several
utility scripts and helper commands are provided with the driver to facilitate communication with
the driver shim and the change log. An extensible connected system schema file allows you to add
your own objects and attributes to those already supported by the driver.
For more information about the scriptable framework, see Chapter 5, “Customizing the Scripting
Driver,” on page 41.
Schema File
The configuration of class and attribute definitions for the connected system is specified using the
schema file. You can modify and extend this file to include new objects and attributes. For details
about configuring the schema file, see “The Connected System Schema File” on page 44.
Include/Exclude File
The include/exclude file allows local system policy to enforce which objects are included or excluded
from provisioning, on both the Publisher channel and the Subscriber channel, independently. For
details about using the include/exclude file, see “The Connected System Include/Exclude File” on
page 46.
Configuration Overview
This section discusses driver configuration details specific to the Scripting driver. For basic
configuration information, see “Managing Identity Manager Drivers” in the Identity Manager
Administration Guide. For detailed information about configuring the Scripting driver, see Chapter 4,
“Configuring the Scripting Driver,” on page 31.
Topics in this section include
“Data Flow” on page 14
“Policies” on page 14
Overview 13
Data Flow
Filters and policies control the data flow of identities to and from the connected system and the
Identity Vault. The Data Flow option, specified during driver import, determines how these filters
and policies behave.
Bidirectional: Sets classes and attributes to be synchronized on both the Subscriber and
Publisher channels.
Application to Identity Vault: Sets classes and attributes to be synchronized on the Publisher
channel only.
Identity Vault to Application: Sets classes and attributes to be synchronized on the Subscriber
channel only.
Policies
The Metadirectory engine uses policies to control the flow of information into and out of the Identity
Vault. Policies can be customized to support desired operations. The following table describes the
policy functions for the Scripting driver in the default configuration:
Policy Description
Publisher Placement Defines where new objects are placed in the Identity
Vault.
14 Overview
2 Planning for the Scripting Driver
2
The planning process for the NetIQ® Identity Manager Driver for Scripting begins by determining
whether you develop your own scripts and policies for use with your external account management
system or you obtain them from a third party.
If you are customizing the scripts, the process continues by installing the Scripting driver to a
development system. The first decision to make is whether you run the driver shim on Windows or a
Linux/UNIX system. (The driver engine component hosted by NetIQ Identity Manager can run on any
operating system that supports Identity Manager.) The driver shim should be installed on a system
that hosts, or is remotely connected to, the external account management system. The operating
system of this system is the operating system of the driver shim.
Your operating system choice determines what scripting language to use. On Linux and UNIX, pre-
written libraries are included for Bourne shell, Perl and Python*. On Windows, libraries are included
for Microsoft VBScript and PowerShell*. Also, with additional development work, you can port these
libraries to another scripting language.
Continue the development process by reading Chapter 5, “Customizing the Scripting Driver,” on
page 41 and following its instructions.
If you have obtained custom scripts from a third party, you should follow their instructions for
installing the Scripting driver and their custom components.You should install and test the driver on
a test system first and then on production systems.
This section reviews some of the issues to consider before you install the Scripting driver. Major
topics include
“Prerequisites for Linux and UNIX Scripting” on page 15
“Prerequisites for Windows Scripting” on page 16
“Establishing a Security-Equivalent User” on page 17
For general information about planning for identity management, see the Identity Manager 3.6.1
Installation Guide.
Windows PowerShell
Windows PowerShell is installed by default for Windows Server 2008 R2 and later for servers and
Windows 7 and later for workstations. If you are using an older version of Windows, see Microsoft’s
website (http://www.microsoft.com) for information on installing PowerShell.
Also be aware of the following:
Windows PowerShell versions up to 5.x are supported; the latest 5.x version of PowerShell
supported by your Windows edition is recommended. Note that the cross-platform versions of
PowerShell, i.e. 6.x and higher, are not supported.
You must use the x86 or x64 version of PowerShell that corresponds with the version of the
Scripting Driver you intend to use.
Before using the Scripting Driver, you must change PowerShell’s default script execution policy
as follows:
1. Right-click Windows Powershell (in the Windows PowerShell folder) on the Windows
Start Menu and select “Run as Administrator”.
3. Close PowerShell.
Other Software
If you use the Script Service for Windows PowerShell, the Microsoft Web Services Enhancement
module must be installed from the installation media--see the installation instructions for more
information.
The latest version of NetIQ iManager can be installed on the Identity Vault Server or a separate
system.
NetIQ Designer 3 or 4 (optional; for development).
Creating objects in the Identity Browse and Create Compare and Read
Vault without group
synchronization
Creating objects in the Identity Browse and Create Compare, Read, and Write
Vault with group synchronization
Renaming objects in the Identity Browse and Rename Compare and Read
Vault
Deleting objects from the Identity Browse and Erase Compare, Read, and Write
Vault
Retrieving passwords from the Browse and Supervisor Compare and Read
Identity Vault
Updating passwords in the Identity Browse and Supervisor Compare, Read, and Write
Vault
If you do not set Supervisor for [Entry Rights], the driver cannot set passwords. If you do not want to
set passwords, set the Subscribe setting for the User class nspmDistributionPassword attribute to
Ignore in the filter to avoid superfluous error messages. For details about accessing and editing the
filter, see the documentation about policies on the Identity Manager 4.8 Documentation Web site
(https://www.netiq.com/documentation/identity-manager-48/). For complete information about
rights, see the NetIQ eDirectory Administration Guide.
This section provides the information you need to install the Identity Manager 4.8 driver for
Scripting.
Major topics include
“Installing the Linux and UNIX Scripting Driver Shim” on page 19
“Installing the Windows Scripting Driver” on page 20
“Creating the Driver in Designer” on page 24
-address Change the default address and -address <DNS name or IP address>[:port]
port for Script Service.
Default: localhost:8081
NOTE: If you would like to run a driver instance directly (not as a service), use the -instance
option:
wsdriver -instance 2
This option is not needed for the original instance.
NOTE: By default, only the base packages are displayed. Deselect Show Base Packages Only to
display all packages.
7 Click OK to import the selected packages, then click OK in the successfully imported packages
message.
8 After the current packages are imported, continue to the next section, “Installing the Driver
Packages” on page 26.
NOTE: Publications referenced in the following option descriptions can be accessed at the
Identity Manager 4.8 Documentation Web site (https://www.netiq.com/documentation/
identity-manager-48/).
Scripting Language: These packages determine what scripting language will be used by the
Driver--select only one.
Target Applications: These packages provide pre-configured policies for specific applications,
which can be integrated using the Scripting Driver.
Entitlements: This package contains configuration information for synchronizing Scripting
accounts and policies that enable account creation and auditing for the Scripting driver. To
enable account creation and auditing, verify that this option is selected. For more information,
see the Identity Manager 4.8 Entitlements Guide.
Password Synchronization: This package contains the policies that enable the Scripting driver to
synchronize passwords. To synchronize passwords, verify that this option is selected. For more
information, see the Identity Manager 4.8 Password Management Guide.
Data Collection: This package contains the policies that enable the driver to collect data for
reports. If you are using the Identity Reporting Module, verify that this option is selected. For
more information, see the Identity Reporting Module Guide.
Account Tracking: This package contains the policies that enable you to track accounts for
reports. If you are using the Identity Reporting Module, verify that this option is selected. For
more information, see the Identity Reporting Module Guide.
5 After selecting the optional packages, click Next.
6 (Conditional) If the packages you selected to install have package dependencies, you must also
install them to install the selected package. Click OK to install the listed package dependencies.
7 (Conditional) If more than one type of package dependency must be installed, you are
presented with these packages separately. Continue to click OK to install any additional package
dependencies.
8 (Conditional) The Common Settings page is displayed only if the Common Settings package is
installed as a dependency. On the Install Common Settings page, fill in the following fields:
User Container: Select the Identity Vault container where Scripting users will be added if they
don’t already exist in the vault. This value becomes the default for all drivers in the driver set.
If you want a unique location for this driver, set the value for all drivers on this page. After the
driver is created, change the value on the driver’s Global Configuration Values page.
Group Container: Since the Scripting driver does not synchronize Group objects, this setting can
be ignored.
13 (Conditional) On the System Ownership page, fill in the following fields to define the ownership
of the Scripting system, then click Next:
Business Owner: Select a user object in the Identity Vault that is the business owner of the
Scripting system. This can only be a user object, not a role, group, or container.
Application Owner: Select a user object in the Identity Vault that is the application owner of the
Scripting system. This can only be a user object, not a role, group, or container.
14 (Conditional) On the General Information page, fill in the following fields to define your
Scripting system, then click Next:
Name: Specify a descriptive name for this Scripting system. The name is displayed in reports.
Description: Specify a brief description for this Scripting system. The description is displayed in
reports.
Location: Specify the physical location for this Scripting system. The location is displayed in
reports.
Vendor: Replace AppVendor with an appropriate value for your Scripting application. This
information is displayed in reports.
Version: Specify the version of this Scripting system. The version is displayed in reports.
15 (Conditional) On the Generic Application page, fill in the following fields, and click Next:
Auto Associate Objects: Select whether to automatically assign associations to objects.
Application Supports Query: Select whether your application supports query operations.
Auto Resolve Association References: Select whether policy should automatically resolve
association references.
Auto Associate Value: If auto-associating objects, select the method of assigning associations.
Valid options are “Source Name” and “GUID”.
Process Older Events: Select whether to process old events on the subscriber queue, or
automatically discard them based on cached timestamps.
16 (Conditional) On the Account Tracking page, review the fields, Edit if necessary, then click Next:
17 Review the summary of tasks that will be completed to create the driver, then click Finish.
The driver is created. You can modify the configuration settings by continuing with the next section,
“Configuring the Driver” on page 28. If you don’t need to configure the driver, skip ahead to
“Deploying the Driver” on page 29.
IMPORTANT: In addition to the driver settings, you should review the set of default policies and
rules provided by the basic driver configuration. Although these policies and rules are suitable
for synchronizing with Scripting*, your synchronization requirements for the driver might differ
from the default policies. If this is the case, you need to change them to carry out the policies
you want. The default policies and rules are discussed in “Configuration Overview” on page 13.
4 Continue with the next section, “Deploying the Driver” on page 29.
After you have installed the Identity Manager 4.8 driver for Scripting, use the information in this
section for configuration. Major topics include
“Driver Parameters and Global Configuration Values” on page 31
“The Driver Shim Configuration File” on page 38
To edit the properties shown on the Driver Configuration page and the Global Configuration Values
page:
1 In iManager, select Identity Manager Overview from the Identity Manager task list on the left
side of the window.
2 Navigate to your driver set by searching the tree or by entering its name.
3 Click the driver to open its overview.
4 Click the driver icon.
5 Select Driver Configuration or Global Config Values as appropriate.
6 Edit the property values as desired, then click OK.
No
Use SSL No
Data Flow
Bidirectional: Identities are synchronized from both the Identity Vault and the connected
system (application). After all pending events are processed, the Identity Vault and connected
system mirror each other.
Application to Identity Vault: Identities are synchronized from the connected system
(application) to the Identity Vault, but not vice versa. For example, an identity created in the
Identity Vault is not created on the connected system unless explicitly migrated.
Identity Vault to Application: Identities are synchronized from the Identity Vault to the
connected system (application), but not vice versa. For example, changes made to a connected
system’s identity are not synchronized to the Identity Vault.
Enable Entitlements
Specifies whether the driver uses either Approval Flow or Role-Based Entitlements with the
Entitlements Service driver.
Enable entitlements for the driver only if you plan to use the User Application or Role-Based
Entitlements with the driver.
You can use Role-Based Entitlements to integrate the Scripting driver with the Identity Manager User
Application.
Use SSL
Specifies whether the driver uses Secure Sockets Layer (SSL) to encrypt the connection between the
Identity Vault and the application.
We strongly recommend that you use SSL. If you do not use SSL, identity data (including passwords)
is sent across the network in clear text.
Remote Loader Connection Parameters Host name or IP address and port number
of the driver shim on the connected system, and the
RDN of the object with server certificate.
Manual
No
Parameter Description
Script Command
Specifies the command line the driver uses when executing scripts. The driver provides default
values for Shell scripts, Perl, Python, VBScript and PowerShell. Normally this value does not need to
be changed.
Subscriber Script
Specifies the script file that the driver runs for Subscriber events. The driver provides default values
for Shell scripts, Python, Perl, VBScript and PowerShell, so this value does not normally need to be
changed.
Heartbeat Script
Specifies the script file that the Publisher shim runs to check the external account management
system’s status. The driver provides default values for Shell scripts, Perl, Python, VBScript and
PowerShell, so this value does not normally need to be changed.
Polling Interval
Specifies the number of seconds that the Publisher shim waits after running the polling script and
sending events from the change log to the Metadirectory engine. The default interval is 60 seconds,
and the minimum interval is 1 second.
Heartbeat Interval
Specifies how often, in seconds, the driver shim contacts the Metadirectory engine to verify
connectivity. Specify 0 to disable the heartbeat.
No
No
No
The Scripting Connected System Accepts Passwords from the Identity Vault True
False
The Identity Vault Accepts Passwords from the Scripting Connected System True
False
The Identity Vault Accepts Administrative Password Resets from the Scripting True
Connected System
False
False
False
False
Reset User’s External System Password to the Identity Manager Password on True
Failure
False
False
To view and edit Password Management GCVs, select Show for Show Password Management Policy.
To view and edit User and Group Placement GCVs, select Show for Show User and Group Placements.
port=driverShimPort
-hp httpPort Specifies the HTTP services port number. The default
HTTP services port number is 8091.
-httpport httpPort
You can connect to this port to view log files. For
details, see “Driver Status and Diagnostic Files” on
page 135.
-path driverPath Specifies the path for driver files. The default path is /
usr/local/nxdrv.
-tfm size Specifies the limit to the size of the trace file for this
instance. Specify the value in kilobytes, megabytes, or
-tracefilemax size gigabytes, using the abbreviation for the byte type.
The minimum value is 100K. For example:
-tracefilemax 1000K
-tracefilemax 100M
-tracefilemax 10G
NOTE:
destino. Los conjuntos de secuencias de comandos para Linux y UNIX y para Windows
proporcionan bibliotecas, accesibles por los scripts, para recuperar datos de eventos y
controladores del shim del conductor y devolver información al motor para su procesamiento.
El motor Identity Manager tiene algunos requisitos simples para procesar eventos con éxito. La
biblioteca provista complementa sus scripts para proporcionar las herramientas necesarias para
esta interacción exitosa.
EXCLUDE
adminUser
CLASS secureUser
The format of this file is the same regardless of operating system and scripting language. See “The
Connected System Include/Exclude File” on page 46 for more information.
Comments
Lines that begin with an octothorpe (#) are comments.
# This is a comment.
Schema Definition
The first line in the schema file that is not a comment must be the schema definition.
SCHEMA [HIERARCHICAL]
HIERARCHICAL specifies that the target application is not a flat set of users and groups, but is
organized by hierarchical components, such as a directory-based container object.
Class Definition
CLASS className [CONTAINER]
You must specify a class name. Enclose the class name in double quotes (").
Add the CONTAINER keyword if objects of this class can contain other objects.
The class definition is ended by another class definition or by the end of the file.
Attribute Definition
Any number of attribute definitions can follow a class definition. Attribute definitions define
attributes for the class whose definition they follow.
ATTRIBUTE attributeName [TypeAndProperties]
An attribute name is required. Enclose the attribute name in double quotes (").
If no attribute type is specified, the attribute has the string type. The allowable types are:
STRING
INTEGER
STATE
DN
Include/Exclude Processing
Identity Vault events for identities that match an exclude rule are discarded by the Subscriber shim.
Connected system events for identities that match an exclude rule are not sent to the Metadirectory
engine by the Publisher shim.
Included identities are treated normally by the Subscriber and Publisher shims.
Identities that do not match an include rule or an exclude rule in the file are included.
Comments
Lines that begin with an octothorpe (#) are comments.
# This is a comment.
CLASS className
.
.
.
ENDCLASS
You can use attribute matching rules within a class matching rule.
Single-Line Rules
[SUBSCRIBER|PUBLISHER] INCLUDE|EXCLUDE [className] objectSelection
Where objectSelection can be
{associationMatch | attributeName=expression}
Single-line rules can specify the Subscriber or Publisher channel at the start of the rule. If a channel
is specified, the rule applies only to that channel. Otherwise it applies to both channels.
You must specify whether the rule is to include or exclude the objects it matches.
Example 1
# Exclude users whose names start with temp
EXCLUDE
CLASS User
loginName=temp.*
ENDCLASS
ENDEXCLUDE
Example 3
# Exclude all users except those whose names start with idm
# This works because channel-specific matching takes precedence
# over general matching.
EXCLUDE
CLASS User
ENDCLASS
ENDEXCLUDE
For each event type, you should retrieve the information you need from the event data, submit
changes to the external application using application-provided tools, and return a status (such as
success or failure) to Identity Manager.
Event data is retrieved primarily using the IDMGETVAR function. For detailed information on how to
use IDMGETVAR, see “UNIX Shell (idmlib.sh) Reference” on page 155.This function returns an array
of values corresponding to the name specified as the function’s parameter. The following table
shows many item names.
Name Description
COMMAND The command for the event, usually indicating the event type. Possible
values are: add, modify, delete, rename, modify-password,
check-object-password.
SRC_ENTRY_ID An identifier for the identity that generated the event, in the
namespace of the source (sender).
REMOVE_ALL_attr_name Indicates that all values for the attribute attr_name should be
removed.
OLD_PASSWORD The previous password for an identity that has changed its password.
Used in Modify Password events.
PASSWORD The new password for an identity. Used in Add and Modify Password
events.
Handling Associations
The association value indicates which identity has been changed. If the identity has no association,
an association must be generated for it using an implementation-specific rule that you have
adopted. When Identity Manager processes an event for an identity with no association, it executes
the driver’s Matching policy. This policy attempts to match the event’s identity to an identity on the
external application’s system. Usually doing this involves executing a query. The default Matching
policy included with the Scripting driver queries for matching Users and Groups based on the CN
attribute. If the event’s identity matches an identity on the external application, both identities must
be assigned the new association. Assigning this association can be done as part of the query-
handling script. (Handling queries is discussed in more detail in “Handling Query Events” on
page 58.) If no identity matches, an Add event is issued, and the new association can be assigned as
part of the Add event-handling script:
# Adding an association
IDMSETVAR "COMMAND" "ADD_ASSOCIATION"
IDMSETVAR "ASSOCIATION" "$MyAssociation"
IDMSETVAR "EVENT_ID" "$EVENT_ID"
IDMSETVAR "DEST_DN" "$SRC_DN"
IDMSETVAR "DEST_ENTRY_ID" "$SRC_ENTRY_ID"
The above example demonstrates each name/value pair that must be set for an association to be
assigned by the Identity Manager engine. The values of EVENT_ID, SRC_DN and SRC_ENTRY_ID are
always sent by the engine during an add event, and therefore, are available for your add script to
obtain using IDMGETVAR. The example above also illustrates the IDMSETVAR function. For detailed
information on how to use IDMSETVAR, see “UNIX Shell (idmlib.sh) Reference” on page 155. This
function sets a name and value which indicates what action Identity Manager should perform. For
example, the pair COMMAND and ADD_ASSOCIATION instructs the shim to create an add-association
document to assign an association to an identity, as discussed above. The pair EVENT_ID and
$EVENT_ID instruct the shim to assign add-association document an event-id described by the
variable $EVENT_ID. This is important for the engine to match documents sent and returned on the
subscriber channel.
# Modifying an association
IDMSETVAR "COMMAND" "MODIFY_ASSOCIATION"
IDMSETVAR "ASSOCIATION" "$OldAssociation"
IDMSETVAR "ASSOCIATION" "$NewAssociation"
IDMSETVAR "EVENT_ID" "$EVENT_ID"
IDMSETVAR "DEST_DN" "$SRC_DN"
IDMSETVAR "DEST_ENTRY_ID" "$SRC_ENTRY_ID"
STATUS_SUCCESS Identity Manager marks the event as a success and submits the next event
in the event queue, if any. You should issue this status even if your script
does nothing.
STATUS_WARNING The event can be processed, but it might require attention. Identity
Manager issues your warning message in its log, and then submits the
next event.
STATUS_RETRY The event cannot be processed, but Identity Manager should resubmit the
event because it should be able to be processed soon. This status can be
issued if your external application appears to be temporarily unavailable.
However, this status should be used cautiously because a backlog results if
Identity Manager continually retries one event.
STATUS_ERROR The event cannot be processed and it should not be resubmitted. Identity
Manager issues the error message and submits the next event. You should
make a detailed error message so the problem can be corrected.
STATUS_FATAL For some reason, the driver must be stopped. Identity Manager issues
your message and stops the driver. This could be used if the external
application appears to be permanently offline. The event remains in the
queue and is resubmitted when the driver is restarted.
Writing Values
IDMSETVAR is used to set values to return to Identity Manager. For detailed information on how to
use IDMSETVAR, see “UNIX Shell (idmlib.sh) Reference” on page 155. It is passed a name and value.
In the previous ADD_ASSOCIATION example, IDMSETVAR is used to set the ASSOCIATION value. You
can specify values for items listed in the table above. Generally, the only time IDMSETVAR is used is
to add, modify and delete associations or return information for a query operation. Other
information returned to the shim by the scripts is done through other command functions, such as
STATUS_SUCCESS, which use IDMSETVAR indirectly.
ASSOCIATION The base object for the search. If both ASSOCIATION and DEST_DN
have values, ASSOCIATION is used. If neither is specified, the base
object is the root of the identity management system.
DEST_DN The base object for the search (see also ASSOCIATION above).
SEARCH_CLASSES A list of classes for which to search. Only identities of these classes are
returned. If not specified, all identities in the scope matching
SEARCH_ATTR_ values are returned (see below).
SEARCH_ATTR_attr_name A value that the specified attribute must match. Replace attr_name
with the desired attribute name. Only identities matching all
SEARCH_ATTR_ filters are returned.
READ_ATTRS A list of the attribute names whose values are returned for each
matching identity.
ALL_READ_ATTRS The presence of this value indicates that all attribute values should be
returned for matching identities.
NO_READ_ATTRS The presence of this value indicates that no attribute values should be
returned for matching identities.
READ_PARENT The presence of this value indicates that the parent object of each
matching identity should be returned. Only relevant in hierarchical
systems.
Execute the query against the external application using application-provided tools. Then return
each identity by setting an INSTANCE command, followed by relevant values from the list below.
PARENT The association of the parent object of the identity (optional). Only
relevant in hierarchical systems.
Below is an example add.sh, which forms an association from an identity’s CN and class name, and
uses a hypothetical tool called appadd.
#!/bin/sh
ClassName=`IDMGETVAR "CLASS_NAME"` CN=`IDMGETVAR "CN"`
EVENT_ID=`IDMGETVAR "EVENT_ID"`
SRC_DN=`IDMGETVAR "SRC_DN"`
SRC_ENTRY_ID=`IDMGETVAR "SRC_ENTRY_ID"`
PhoneNumber=`IDMGETVAR "Telephone"`
if [ -z "$SearchName" ]; then
STATUS_ERROR "Query: no search value"
else
Command="appsearch -n $SearchName"
Results=`$Command`
if [ -n "$Results" ]; then
Phone=`echo $Results | awk '{print $1}'`
IDMSETVAR "COMMAND" "INSTANCE"
IDMSETVAR "EVENT_ID" "$EVENT_ID"
IDMSETVAR "CLASS_NAME" "$CLASS_NAME"
IDMSETVAR "ASSOCIATION" "$ASSOCIATION"
IDMSETVAR "ATTR_Telephone" "$Phone"
Driver Parameters
A driver has values known as driver parameters. The driver parameters are divided into driver
settings applicable to the whole driver, and Subscriber and Publisher settings for their respective
channels. The IDMGETDRVVAR, IDMGETSUBVAR, and IDMGETPUBVAR functions can be used to
retrieve these values. The table below shows parameters in the default Scripting driver. Other
parameters can be added to the driver’s XML configuration file see “Managing Identity Manager
Drivers” in the Identity Manager Administration Guide).
Query support is currently limited. It only returns one instance based on the specified association or
DN. (If both association and DN are specified, association is used.) The functions below allow you to
retrieve information from the instance.
The following is an example of a query of the Identity Vault that retrieves the address and ZIP code
for user Bob.
IDMQUERY "User" "Bob" "SA,Postal Code"
Address=`IDMGETQVAR "SA"`
ZIPCode=`IDMGETQVAR "Postal Code"`
# ... etc. ...
0 No debugging.
1-3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and Driver connection messages.
5-7 Previous level plus Change Log and loopback messages. Higher trace levels provide more
detail.
8 Previous level plus Driver status log, Driver parameters, Driver command line, Driver
security, Driver Web server, Driver schema, Driver encryption, Driver SOAP API, and
Driver include/exclude file messages.
The trace level is set using the -trace option in usdrv.conf, for example -trace 9.
You can view the trace file through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Trace.
The IDMTrace function described above writes output to the trace file specified in the Driver
Parameters (logs/script-trace.log by default).
The eDirectory tool DSTrace can be used to monitor Identity Manager activity. Set the tracing
level for the driver in iManager. DSTrace shows the XML documents being submitted to the
driver for events, and how Policies are evaluated. It also shows the status and message for each
event.
The Status Log is written to logs/dirxml.log. It shows a summary of the events that have
been recorded on the Subscriber and Publisher channels.
You can view the Status Log through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Status.
Although it is best to start the driver in production environments from the startup script, you can run
usdrv manually. When you do so, any text written to standard output from scripts is displayed in the
interactive shell.
ussmh
usclh
For each event type, you should retrieve the information you need from the event data, submit
changes to the external application using application-provided tools and return a status (such as
success or failure) to Identity Manager.
Event data is retrieved primarily by using the $idmlib->idmgetvar() function. This function
returns an array of values corresponding to the name specified as the function’s parameter. The
following table shows many item names.
Name Description
COMMAND The command for the event, usually indicating the event type.
Possible values are: add, modify, delete, rename, modify-
password, check-object-password.
SRC_ENTRY_ID An identifier for the identity that generated the event, in the
namespace of the source (sender).
OLD_PASSWORD The previous password for an identity that has changed its
password. Used in Modify Password events.
PASSWORD The new password for an identity. Used in Add and Modify
Password events.
# Modifying an association
my $idmlib = new IDMLib();
$idmlib->idmsetvar("COMMAND", "MODIFY_ASSOCIATION");
$idmlib->idmsetvar("ASSOCIATION", $OldAssociation);
$idmlib->idmsetvar("ASSOCIATION", $NewAssociation);
$idmlib->idmsetvar("EVENT_ID", $EVENT_ID);
$idmlib->idmsetvar("DEST_DN", $SRC_DN);
$idmlib->idmsetvar("DEST_ENTRY_ID", $SRC_ENTRY_ID);
status_success() Identity Manager marks the event as a success and submits the next event
in the event queue, if any. You should issue this status even if your script
does nothing.
status_warning() The event can be processed, but it might require attention. Identity
Manager issues your warning message in its log, and then submits the
next event.
status_retry() The event cannot be processed, but Identity Manager should resubmit
the event because it should be able to be processed soon. This status can
be issued if your external application appears to be temporarily
unavailable. However, this status should be used cautiously because a
backlog results if Identity Manager continually retries one event.
status_error() The event cannot be processed and it should not be resubmitted. Identity
Manager issues the error message and submits the next event. You should
make a detailed error message so the problem can be corrected.
status_fatal() For some reason, the driver must be stopped. Identity Manager issues
your message and stops the driver. This could be used if the external
application appears to be permanently offline. The event remains in the
queue and is resubmitted when the driver is restarted.
SCOPE Specifies what identities are searched. A base object is specified with the
ASSOCIATION or DEST_DN values (see below). The value entry means
that only the base object is searched. The value subordinates means
that the immediate subordinates of the base object are searched. The
value subtree (the default) indicates that the base object and all
subordinates are searched. The last two values are only relevant in a
hierarchical system.
ASSOCIATION The base object for the search. If both ASSOCIATION and DEST_DN have
values, ASSOCIATION is used. If neither is specified, the base object is the
root of the identity management system.
DEST_DN The base object for the search (see also ASSOCIATION above).
SEARCH_CLASSES A list of classes for which to search. Only identities of these classes are
returned. If not specified, all identities in the scope matching
SEARCH_ATTR_ values are returned (see below)
SEARCH_ATTR_attr_name A value that the specified attribute must match. Replace attr_name with
the desired attribute name. Only identities matching all SEARCH_ATTR_
filters are returned.
READ_ATTRS A list of the attribute names whose values are returned for each matching
identity.
ALL_READ_ATTRS The presence of this value indicates that all attribute values should be
returned for matching identities.
NO_READ_ATTRS The presence of this value indicates that no attribute values should be
returned for matching identities.
READ_PARENT The presence of this value indicates that the parent object of each
matching identity should be returned. Only relevant in hierarchical
systems.
Execute the query against the external application using application-provided tools. Then return
each identity by setting an INSTANCE command, followed by relevant values from the list below.
PARENT The association of the parent object of the identity (optional). Only
relevant in hierarchical systems.
ATTR_attr_name A list of values for the attribute specified by attr_name. Return attribute
values specified by the READ_ATTRS value.
Below is an example add.pl, which forms an association from an identity’s CN and class name, and
uses a hypothetical tool called appadd.
use IDMLib;
my $idmlib = new IDMLib();
my $ClassName = $idmlib->idmgetvar("CLASS_NAME");
my $CN = $idmlib->idmgetvar("CN");
my $PhoneNumber = $idmlib->idmgetvar("Telephone");
my $EVENT_ID = $idmlib->idmgetvar("EVENT_ID");
use IDMLib;
my $idmlib = new IDMLib();
my $SearchName = $idmlib->idmgetvar("SEARCH_ATTR_CN");
my $EVENT_ID = $idmlib->idmgetvar("EVENT_ID");
my $ASSOCIATION = $idmlib->idmgetvar("ASSOCIATION");
my $CLASS_NAME = $idmlib->idmgetvar("CLASS_NAME");
if ($SearchName eq "") {
$idmlib->status_error( "Query: no search value" );
} else {
my $Command = "appsearch -n ". $SearchName;
$Results = `$Command`;
if ($Results ne "") {
my @phoneinfo = split(" ", $Results);
$idmlib->idmsetvar("COMMAND", "INSTANCE");
$idmlib->idmsetvar("CLASS_NAME", $CLASS_NAME);
$idmlib->idmsetvar("EVENT_ID", $EVENT_ID);
$idmlib->idmsetvar("ASSOCIATION", $ASSOCIATION);
$idmlib->idmsetvar("ATTR_Telephone", $Phone);
use IDMLib;
$my idmlib = new IDMLib();
my $Results = `appchg --passwd-changes`;
foreach $Result ( split("\n", $Results) ) {
# Entries are in the format "association:password"
($Association, $Password) = split(":", $Result);
`usclh -t modify-password -a $Association <<EOF
$Password
EOF`;
}
0 No debugging.
1-3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and Driver connection
messages.
5-7 Previous level plus Change Log and loopback messages. Higher trace levels provide
more detail.
8 Previous level plus Driver status log, Driver parameters, Driver command line,
Driver security, Driver Web server, Driver schema, Driver encryption, Driver SOAP
API, and Driver include/exclude file messages.
The trace level is set using the -trace option in usdrv.conf, for example -trace 9.
You can view the trace file through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Trace.
Deployment
The Scripting driver is installed by using a setup program. See “Installing the Linux and UNIX Scripting
Driver Shim” on page 19, for more information on installing the default driver.
ussmh
usclh
For each event type, you should retrieve the information you need from the event data, submit
changes to the external application using application-provided tools and return a status (such as
success or failure) to Identity Manager.
Event data is retrieved primarily by using the idmgetvar() function. This function returns an array
of values corresponding to the name specified as the function’s parameter. The following table
shows many item names.
Name Description
COMMAND The command for the event, usually indicating the event type.
Possible values are: add, modify, delete, rename, modify-
password, check-object-password.
SRC_ENTRY_ID An identifier for the identity that generated the event, in the
namespace of the source (sender).
OLD_PASSWORD The previous password for an identity that has changed its
password. Used in Modify Password events.
PASSWORD The new password for an identity. Used in Add and Modify
Password events.
command = idmgetvar("COMMAND")
# check for an add event
if command = "add":
# call the add script
os.system("add.py")
Example 2:
from idmlib import *
Handling Associations
The association value indicates which identity has been changed. If the identity has no association,
an association must be generated for it using an implementation-specific rule that you have
adopted. When Identity Manager processes an event for an identity with no association, it executes
the driver’s Matching policy. This policy attempts to match the event’s identity to an identity on the
external application’s system. Doing this usually involves executing a query. The default Matching
policy included with the Scripting driver queries for matching Users and Groups based on the CN
attribute. If the event’s identity matches an identity on the external application, both identities must
be assigned the new association. Assigning this association can be done as part of the query-
handling script. (Handling queries is discussed in “Handling Query Events” on page 58.) If no identity
matches, an Add event is issued, and the new association can be assigned as part of the Add event-
handling script:
# Adding an association
from idmlib import *
idmsetvar("COMMAND", "ADD_ASSOCIATION")
idmsetvar("ASSOCIATION", MyAssociation)
idmsetvar("EVENT_ID", EVENT_ID)
idmsetvar("DEST_DN", SRC_DN)
idmsetvar("DEST_ENTRY_ID", SRC_ENTRY_ID)
The above example demonstrates each name/value pair that must be set for an association to be
assigned by the Identity Manager engine. The values of EVENT_ID, SRC_DN and SRC_ENTRY_ID are
always sent by the engine during an add event, and therefore, are available for your add script to
obtain using idmgetvar(). The example above also illustrates the idmsetvar() function. For
detailed information on how to use idmsetvar(), see “Python (idmlib.py) Reference” on page 161.
This function sets a name and value which indicates what action Identity Manager should perform.
For example, the pair “COMMAND" and “ADD_ASSOCIATION" instructs the shim to create an add-
association document to assign an association to an identity, as discussed above. The pair
idmsetvar("COMMAND", "REMOVE_ASSOCIATION")
idmsetvar("ASSOCIATION", MyAssociation)
idmsetvar("EVENT_ID", EVENT_ID)
idmsetvar("DEST_DN", SRC_DN)
idmsetvar("DEST_ENTRY_ID", SRC_ENTRY_ID)
# Modifying an association
my idmlib import *
idmsetvar("COMMAND", "MODIFY_ASSOCIATION")
idmsetvar("ASSOCIATION", OldAssociation)
idmsetvar("ASSOCIATION", NewAssociation)
idmsetvar("EVENT_ID", EVENT_ID)
idmsetvar("DEST_DN", SRC_DN)
idmsetvar("DEST_ENTRY_ID", SRC_ENTRY_ID)
status_success() Identity Manager marks the event as a success and submits the next event
in the event queue, if any. You should issue this status even if your script
does nothing.
status_warning() The event can be processed, but it might require attention. Identity
Manager issues your warning message in its log, and then submits the
next event.
status_retry() The event cannot be processed, but Identity Manager should resubmit
the event because it should be able to be processed soon. This status can
be issued if your external application appears to be temporarily
unavailable. However, this status should be used cautiously because a
backlog results if Identity Manager continually retries one event.
status_error() The event cannot be processed and it should not be resubmitted. Identity
Manager issues the error message and submits the next event. You should
make a detailed error message so the problem can be corrected.
status_fatal() For some reason, the driver must be stopped. Identity Manager issues
your message and stops the driver. This could be used if the external
application appears to be permanently offline. The event remains in the
queue and is resubmitted when the driver is restarted.
rc = exec(cmd)
if (rc != 0):
status_error("Command failed")
Writing Values
The idmsetvar() function is used to set values to return to Identity Manager. It is passed a name
and value. For detailed information on how to use idmsetvar(), see “Python (idmlib.py)
Reference” on page 161. In the previous ADD_ASSOCIATION example, idmsetvar() is used to set
the ASSOCIATION value. You can specify values for items listed in the table above. Generally,
idmsetvar() is used is to add, modify and delete associations or return information for a query
operation. Other information is returned to the shim through other command functions, such as
status_success(), which use idmsetvar() indirectly.
SCOPE Specifies what identities are searched. A base object is specified with the
ASSOCIATION or DEST_DN values (see below). The value entry means
that only the base object is searched. The value subordinates means
that the immediate subordinates of the base object are searched. The
value subtree (the default) indicates that the base object and all
subordinates are searched. The last two values are only relevant in a
hierarchical system.
ASSOCIATION The base object for the search. If both ASSOCIATION and DEST_DN have
values, ASSOCIATION is used. If neither is specified, the base object is the
root of the identity management system.
DEST_DN The base object for the search (see also ASSOCIATION above).
SEARCH_CLASSES A list of classes for which to search. Only identities of these classes are
returned. If not specified, all identities in the scope matching
SEARCH_ATTR_ values are returned (see below)
SEARCH_ATTR_attr_name A value that the specified attribute must match. Replace attr_name with
the desired attribute name. Only identities matching all SEARCH_ATTR_
filters are returned.
READ_ATTRS A list of the attribute names whose values are returned for each matching
identity.
ALL_READ_ATTRS The presence of this value indicates that all attribute values should be
returned for matching identities.
NO_READ_ATTRS The presence of this value indicates that no attribute values should be
returned for matching identities.
READ_PARENT The presence of this value indicates that the parent object of each
matching identity should be returned. Only relevant in hierarchical
systems.
When a query invokes your query script, use the parameter information to query your external
application using application-provided tools. Then return each identity by setting an INSTANCE
command, followed by relevant values from the list below.
PARENT The association of the parent object of the identity (optional). Only
relevant in hierarchical systems.
ATTR_attr_name A list of values for the attribute specified by attr_name. Return attribute
values specified by the READ_ATTRS value.
Below is an example add.py, which forms an association from an identity’s CN and class name, and
uses a hypothetical tool called appadd.
#!/usr/bin/python
ClassName = idmgetvar("CLASS_NAME")
CN = idmgetvar("CN")
PhoneNumber = idmgetvar("Telephone")
EventId = idmgetvar("EVENT_ID")
SrcDn = idmgetvar("SRC_DN")
SrcEntryId = idmgetvar("SRC_ENTRY_ID")
if ClassName = "" || CN = "":
status_error("Add event: missing CLASS_NAME and/or CN")
else:
Command = "appadd -n " + CN + -t " + PhoneNumber
rc = exec(Command)
if rc = 0:
idmsetvar("COMMAND", "ADD_ASSOCIATION")
idmsetvar("ASSOCIATION", CN + ClassName)
idmsetvar("EVENT_ID", EventId)
idmsetvar("DEST_DN", SrcDn)
idmsetvar("DEST_ENTRY_ID", SrcEntryId)
status_success("Add event succeeded")
else:
status_error("Add event failed with error code" + rc)
Handling a query is a similar process, except that you return INSTANCE items rather than using
other commands. Below is an example query.py that searches an external application for a
telephone number. It uses a hypothetical tool called appsearch.
import os
from idmlib import *
SearchName = idmgetvar("SEARCH_ATTR_CN")
EventId = idmgetvar("EVENT_ID")
Association = idmgetvar("ASSOCIATION")
ClassName = idmgetvar("CLASS_NAME")
if SearchName = "":
status_error("Query: no search value")
else:
Command = "appsearch -n " + SearchName
Results = os.popen(Command, ‘r').readlines()
if Results != "":
phoneinfo = split(" ", Results)
Phone = phoneinfo[0]
idmsetvar("COMMAND", "INSTANCE")
idmsetvar("CLASS_NAME", ClassName)
idmsetvar("EVENT_ID", EventId)
idmsetvar("ASSOCIATION", Association)
idmsetvar("ATTR_Telephone", Phone)
status_success("Query succeeded")
else:
# Return success with no results
status_success("Query succeeded (no matches)")
import os
from idmlib import *
rc = os.sytem("apphealth")
if (rc = 0):
heartbeat_success("Heartbeat succeeded")
else:
heartbeat_error("Heartbeat failed with error code " + rc)
Driver Parameters
A driver has values known as driver parameters. The driver parameters are divided into driver
settings applicable to the whole driver, and Subscriber and Publisher Settings for their respective
channels. The idmgetdrvvar(), idmgetsubvar() and idmgetpubvar() functions can be used
to retrieve these values. The table below shows parameters in the default Scripting driver. Other
parameters can be added to the driver’s XML Configuration file (see the NetIQ Identity Manager
3.6.1 Administration Guide).
Query support is currently limited. It returns only one instance based on the specified association or
DN. If both association and DN are specified, association is used. The functions below allow you to
retrieve information from the instance.
The following is an example of a query of the Identity Vault that retrieves the address and ZIP code
for user Bob.
from idmlib import *
trace("Trace Message")
When you develop scripts, you might need to do some debugging to track down problems. The
following list indicates some facilities for debugging.
The Driver traces activity to its Trace file (logs/trace.log by default). The trace level setting
in conf/usdrv.conf controls how much debugging is written to the log.
0 No debugging.
1-3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and Driver connection
messages.
5-7 Previous level plus Change Log and loopback messages. Higher trace levels provide
more detail.
8 Previous level plus Driver status log, Driver parameters, Driver command line,
Driver security, Driver Web server, Driver schema, Driver encryption, Driver SOAP
API, and Driver include/exclude file messages.
The trace level is set using the -trace option in usdrv.conf, for example -trace 9.
You can view the trace file through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Trace.
The eDirectory tool DSTrace can be used to monitor Identity Manager activity. Set the tracing
level for the Driver in iManager. DSTrace shows the XML documents being submitted to the
driver for events and how policies are evaluated. It also shows the status and message for each
event.
The Status Log is written to logs/dirxml.log. It shows a summary of the events that have
been recorded on the Subscriber and Publisher channels.
You can view the Status Log through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Status.
Although it is best to start the driver in production environments from the startup script, you can run
usdrv manually. When you do so, any text written to standard output from scripts is displayed in the
interactive shell.
Deployment
The Scripting driver is installed by using a setup program. See “Installing the Linux and UNIX Scripting
Driver Shim” on page 19, for more information on installing the default driver.
ussmh
usclh
Input(0) = "USERNAME=bobsmith"
Input(1) = "TELEPHONE=818-555-2100"
ExitCode = Output(0)
Application Objects
Another way to modify application data is through Windows COM (Common Object Model) objects.
Consult your application’s documentation to see whether it exposes any COM objects. These COM
objects can be loaded directly in VBScript:
Set AppObject = WScript.CreateObject("MyApplication.MyObject")
AppObject.AddIdentity("Bob Smith", "818-555-2100")
There are no guarantees regarding what types of tools are available, or even whether any tools are
available. You must determine if sufficient tools are provided by the application. If they are not, you
can contact the application’s developers and request that such tools be made available.
You should make a list of what tools can be used for each event type. The application might provide
one program that can be used for any event type, or it might provide multiple tools.
For each event type, you should retrieve the information you need from the event data, submit
changes to the external application using application-provided tools and return a status (such as
success or failure) to Identity Manager.
Event data is retrieved primarily using the IDMGetEventValues function. This function returns an
array of values corresponding to the name specified as the function’s parameter.
(IDMGetEventValue is available for single-valued items.) The following table shows many item
names.
Value Description
COMMAND The command for the event, usually indicating the event type.
SRC_ENTRY_ID An identifier for the identity that generated the event, in the
namespace of the source (sender).
OLD_PASSWORD The previous password for an identity that has changed its password.
Used in Modify Password events.
PASSWORD The new password for an identity. Used in Add and Modify Password
events.
Handling Associations
The association value indicates which identity has been changed. If the identity has no association,
an association must be generated for it using an implementation-specific rule that you have
adopted. When Identity Manager processes an event for an identity with no association, it executes
the driver’s Matching policy. This policy attempts to match the event’s identity to an identity on the
external application’s system. Doing this usually involves executing a query. The default Matching
IDMStatusSuccess Identity Manager marks the event as a success and submits the next event
in the event queue, if any. You should issue this status even if your script
does nothing.
IDMStatusWarning The event can be processed, but it might require attention. Identity
Manager issues your warning message in its log, and then submits the next
event.
IDMStatusRetry The event cannot be processed, but Identity Manager should resubmit the
event because it should be able to be processed soon. This status can be
issued if your external application appears to be temporarily unavailable.
However, this status should be used cautiously because a backlog results if
Identity Manager continually retries one event.
IDMStatusError The event cannot be processed and it should not be resubmitted. Identity
Manager issues the error message and submits the next event. You should
make a detailed error message so the problem can be corrected.
IDMStatusFatal For some reason, the driver must be stopped. Identity Manager issues your
message and stops the driver. This could be used if the external application
appears to be permanently offline. The event remains in the queue and is
resubmitted when the driver is restarted.
SCOPE Specifies what identities will be searched. A base object is specified with
the ASSOCIATION or DEST_DN values (see below). The value “entry”
means that only the base object is searched. The value “subordinates”
means that the immediate subordinates of the base object are searched.
The value “subtree” (the default) indicates that the base object and all
subordinates are searched. The last two values are only relevant in a
hierarchical system.
ASSOCIATION The base object for the search. If both ASSOCIATION and DEST_DN have
values, ASSOCIATION is used. If neither is specified, the base object is the
root of the identity management system.
DEST_DN The base object for the search (see also ASSOCIATION above).
SEARCH_CLASSES A list of classes for which to search. Only identities of these classes are
returned. If not specified, all identities in the scope matching
SEARCH_ATTR_ values are returned (see below).
SEARCH_ATTR_attr_name A value that the specified attribute must match. Replace attr_name with
the desired attribute name. Only identities matching all SEARCH_ATTR_
filters are returned.
READ_ATTRS List of attribute names whose values returned for each identiy match.
ALL_READ_ATTRS The presence of this value indicates that all attribute values should be
returned for matching identities.
NO_READ_ATTRS The presence of this value indicates that no attribute values should be
returned for matching identities.
READ_PARENT The presence of this value indicates that the parent object of each
matching identity should be returned. Only relevant in hierarchical
systems.
Execute the query against the external application using application-provided tools. Then return
each identity by setting an INSTANCE command, followed by relevant values from the list below.
PARENT The association of the parent object of the identity (optional). Only
relevant in hierarchical systems.
ATTR_attr_name A list of values for the attribute specified by attr_name. Return attribute
values specified by the READ_ATTRS value.
Below is an example of the Add.vbs script, which forms an association from an identity’s CN and
class name, and uses a hypothetical tool called appadd.
IDMPublishInit takes a command name as its single parameter. Below is a list of valid command
names for IDMPublishInit.
Below is an example of a Poll.wsf that checks for a password change. It uses a hypothetical
application tool called apppwd.
Results = IDMExecuteIO("apppwd --changes", Empty)
For I = 1 To UBound(Results)
' Entries are in the format "association=password"
Association = Left(Results(I), InStr(Results(I), "=")-1)
Password = Mid(Results(I), InStr(Results(I), "=")+1)
IDMPublishInit "MODIFY_PASSWORD"
IDMPublishValue "ASSOCIATION", Association
IDMPublishValue "PASSWORD", Password
IDMPublish
Next
Driver Parameters
A driver has values known as driver parameters. The driver parameters are divided into driver
settings applicable to the whole driver, and Subscriber and Publisher Settings for their respective
channels. The IDMGetDriverParam, IDMGetSubscriberParam, and IDMGetPublisherParam functions
can be used to retrieve these values. The table below shows parameters in the default Scripting
driver. Other parameters can be added to the driver’s XML Configuration file (see “Managing Identity
Manager Drivers” in the NetIQ Identity Manager Administration Guide).
Function Description
Function Description
The following is an example of a query that retrieves an object’s address and postal code.
IDMQueryInit
IDMQuerySetAssociation IDMGetEventValue("ASSOCIATION")
IDMQueryAddReadAttr "SA" ' Street Address
IDMQueryAddReadAttr "Postal Code"
If IDMQuery Then
Address = IDMQueryGetInstanceAttrValue("SA")
ZIPCode = IDMQueryGetInstanceAttrValue("Postal Code")
' ... etc. ...
End If
0 No debugging.
1-3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and Driver connection
messages.
5-7 Previous level plus Change Log and loopback messages. Higher trace levels
provide more detail.
8 Previous level plus Driver status log, Driver parameters, Driver command line,
Driver security, Driver Web server, Driver schema, Driver encryption, Driver
SOAP API, and Driver include/exclude file messages.
The trace level is set using the -trace option in wsdrv.conf, for example. -trace 9.
You can view the trace file through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Trace.
The IDMTrace function described above writes output to the trace file specified in the Driver
Parameters (logs\script-trace.log by default).
The eDirectory tool DSTrace can be used to monitor Identity Manager activity. Set the tracing
level for the Driver in iManager. DSTrace shows the XML documents being submitted to the
Driver for events, and how Policies are evaluated. It also shows the status and message for each
event.
The Status Log is written to logs\dirxml.log. It shows a summary of the events that have
been recorded on the Subscriber and Publisher channels.
You can view the Status Log through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091. Substitute the
DNS name or IP address of your driver for driver-address.
2. Authenticate by using any username and the password that you specified as the Remote
Loader password.
3. Click Status.
VBScript programs can be debugged using programs such as Microsoft Visual Studio and Microsoft
Script Debugger. Change the Script Command driver parameter to use the //x option: cscript //
nologo //x. When the driver shim executes a script, you are prompted to debug the script execution.
Deployment
The Scripting driver is installed by using a setup program. See “Installing the Windows Scripting
Driver” on page 20 for information on installing the default driver.
idmevent.exe
wsdriver.exe
The certificate will be stored in the keys\ directory. You must have LDAP with SSL available for the
Metadirectory. When making an installation program for deployment, you might want to include this
command as part of the installation:
To ensure that only authorized systems access the Metadirectory, a Driver Object password and
Remote Loader password are used. Run the following command and enter the passwords at the
prompts:
wsdriver.exe -sp
The service, which can then be run from the Services applet, can be removed as follows:
wsdriver.exe -removeService
You should distribute the XML configuration file that contains parameters and policies your driver
needs. The user can then select it when installing your driver.
For each event type, you should retrieve the information you need from the event data, submit
changes to the external application using application-provided tools and return a status (such as
success or failure) to Identity Manager.
Event data is retrieved primarily using the idm_geteventvalues function. This function returns an
array of values corresponding to the name specified as the function’s parameter.
(idm_geteventvalue is available for single-valued items.) The following table shows many item
names.
Value Description
COMMAND The command for the event, usually indicating the event type.
SRC_ENTRY_ID An identifier for the identity that generated the event, in the
namespace of the source (sender).
OLD_PASSWORD The previous password for an identity that has changed its password.
Used in Modify Password events.
PASSWORD The new password for an identity. Used in Add and Modify Password
events.
Handling Associations
The association value indicates which identity has been changed. If the identity has no association,
an association must be generated for it using an implementation-specific rule that you have
adopted. When Identity Manager processes an event for an identity with no association, it executes
the driver’s Matching policy. This policy attempts to match the event’s identity to an identity on the
external application’s system. Doing this usually involves executing a query. The default Matching
policy included with the Scripting driver queries for matching Users and Groups based on the CN
attribute. If the event’s identity matches an identity on the external application, both identities must
be assigned the new association. Assigning this association can be included as part of the query-
handling script. (Handling queries is discussed in “Handling Query Events” on page 58.) If no identity
matches, an Add event is issued, and the new association can be assigned as part of the Add event-
handling script:
idm_setcommand "ADD_ASSOCIATION"
idm_writevalue "ASSOCIATION" $my_association
(etc.)
The example above also illustrates the idm_setcommand function. This function sets a command
value that indicates what action Identity Manager should perform. The ADD_ASSOCIATION
command assigns an association to an identity, as discussed above. The Subscriber can also issue
MODIFY_ASSOCIATION and REMOVE_ASSOCIATION commands.
idm_statussuccess Identity Manager marks the event as a success and submits the next event
in the event queue, if any. You should issue this status even if your script
does nothing.
idm_statuswarning The event can be processed, but it might require attention. Identity
Manager issues your warning message in its log, and then submits the next
event.
idm_statusretry The event cannot be processed, but Identity Manager should resubmit the
event because it should be able to be processed soon. This status can be
issued if your external application appears to be temporarily unavailable.
However, this status should be used cautiously because a backlog results if
Identity Manager continually retries one event.
idm_statuserror The event cannot be processed and it should not be resubmitted. Identity
Manager issues the error message and submits the next event. You should
make a detailed error message so the problem can be corrected.
idm_statusfatal For some reason, the driver must be stopped. Identity Manager issues your
message and stops the driver. This could be used if the external application
appears to be permanently offline. The event remains in the queue and is
resubmitted when the driver is restarted.
Writing Values
idm_setcommand and the status functions must be issued before specifying values with
idm_writevalues. idm_writevalues (or its single-valued version idm_writevalue) is used to set values
to return to Identity Manager. It is passed a value name and an array of values. In the
ADD_ASSOCIATION example above, idm_writevalue is used to set the ASSOCIATION value. You can
specify values for items listed in the table above.
SCOPE Specifies what identities will be searched. A base object is specified with
the ASSOCIATION or DEST_DN values (see below). The value “entry”
means that only the base object is searched. The value “subordinates”
means that the immediate subordinates of the base object are searched.
The value “subtree” (the default) indicates that the base object and all
subordinates are searched. The last two values are only relevant in a
hierarchical system.
ASSOCIATION The base object for the search. If both ASSOCIATION and DEST_DN have
values, ASSOCIATION is used. If neither is specified, the base object is the
root of the identity management system.
DEST_DN The base object for the search (see also ASSOCIATION above).
SEARCH_CLASSES A list of classes for which to search. Only identities of these classes are
returned. If not specified, all identities in the scope matching
SEARCH_ATTR_ values are returned (see below).
SEARCH_ATTR_attr_name A value that the specified attribute must match. Replace attr_name with
the desired attribute name. Only identities matching all SEARCH_ATTR_
filters are returned.
READ_ATTRS A list of attribute names whose values are returned for each matching
identity.
ALL_READ_ATTRS The presence of this value indicates that all attribute values should be
returned for matching identities.
NO_READ_ATTRS The presence of this value indicates that no attribute values should be
returned for matching identities, only associations.
READ_PARENT The presence of this value indicates that the parent object of each
matching identity should be returned. Only relevant in hierarchical
systems.
Execute the query against the external application using application-provided tools. Then return
each identity by setting an INSTANCE command, followed by relevant values from the list below.
PARENT The association of the parent object of the identity (optional). Only
relevant in hierarchical systems.
ATTR_attr_name A list of values for the attribute specified by attr_name. Return attribute
values specified by the READ_ATTRS value.
Below is an example of the Add.ps1 script, which forms an association from an identity’s CN and
class name, and uses a hypothetical tool called appadd.
idm_publishinit takes a command name as its single parameter. Below is a list of valid command
names for idm_publishinit.
Below is an example of a Poll.ps1 that checks for a password change. It uses a hypothetical
application tool called apppwd.
apppwd --changes | Set-Variable results
foreach ($result in $results) {
# Entries are in the format "association=password"
$tokens = $result.split("=")
$association = $tokens[0]
$password = $tokens[1]
idm_publishinit "MODIFY_PASSWORD"
idm_publishvalue "ASSOCIATION" $association
idm_publishvalue "PASSWORD" $password
idm_publish
next
Driver Parameters
A driver has values known as driver parameters. The driver parameters are divided into driver
settings applicable to the whole driver, and Subscriber and Publisher settings for their respective
channels. The idm_getdriverparam, idm_getsubscriberparam, and idm_getpublisherparam
functions can be used to retrieve these values. The table below shows parameters in the default
Scripting driver. Other parameters can be added to the driver’s XML Configuration file (see
“Managing Identity Manager Drivers” in the NetIQ Identity Manager Administration Guide).
Currently query support is limited. It will only return one instance based on the specified association
or DN. (If both association and DN are specified, association is used.) The functions below allow you
to retrieve information from the instance.
Function Description
Following is an example of a query of the Identity Vault that retrieves an object’s address and postal
code.
$result = idm_doquery
if ($result) {
$address = idm_querygetinstanceattrvalue "SA"
$zipcode = idm_querygetinstanceattrvalue "Postal Code"
# ... etc. ...
}
0 No debugging.
1-3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and driver connection
messages.
5-7 Previous level plus Change Log and loopback messages. Higher trace levels
provide more detail.
8 Previous level plus driver status log, driver parameters, driver command line,
driver security, driver Web server, driver schema, driver encryption, driver SOAP
API, and driver include/exclude file messages.
The trace level is set using the -trace option in wsdrv.conf, for example, -trace 9.
You can view the trace file through a Web browser:
1. Use a Web browser to access the driver shim at https://driver-address:8091.
Substitute the DNS name or IP address of your driver for driver-address.
Deployment
The Scripting driver is installed by using a setup program. See “Installing the Windows Scripting
Driver” on page 20 for information on installing the default driver.
idmevent.exe
wsdriver.exe
If you are using an installation program, you can obtain the driver’s installation path from the
following registry value:
HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Windows Script Driver\Path
Or for the x86 driver running an x64 version of Windows, use the path from the following registry
value:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Novell
\Windows Script Driver\Path
The formats of wsdrv.conf and schema.def can be viewed in “The Driver Shim Configuration
File” on page 38 and “The Connected System Schema File” on page 44.
If SSL encryption is desired for communication between the driver shim and Identity Manager
engine, a certificate must be retrieved from the Identity Vault. Run the following command and
follow the prompts to retrieve the certificate:
wsdriver.exe -s
The certificate will be stored in the keys\ directory. You must have LDAP with SSL available for the
Metadirectory. When making an installation program for deployment, you might want to include this
command as part of the installation:
To ensure that only authorized systems access the Metadirectory, a Driver Object password and
Remote Loader password are used. Run the following command and enter the passwords at the
prompts:
wsdriver.exe -sp
The service, which can then be run from the Services applet, can be removed as follows:
wsdriver.exe -removeService
The names of the Subscriber, Polling and Heartbeat scripts can be altered in the driver parameters.
This section provides information about operational tasks commonly used with the Identity
Manager driver for Scripting.
Topics include
“Starting and Stopping the Driver” on page 127
“Starting and Stopping the Driver Shim” on page 127
“Displaying Driver Shim Status” on page 128
“Monitoring Driver Messages” on page 129
Windows Use the Windows Services application to start the NetIQ Identity Manager
Windows Script Driver service.
To stop the driver shim, perform the task appropriate for your operating system as shown in the
following table:
Windows Use the Windows Services application to stop the NetIQ Identity Manager
Windows Script Driver service.
You can also run the driver shim on Windows from the command line by executing wsdriver.exe
in the bin directory under the driver installation directory. Output is written to the console. Stop the
driver shim by pressing Ctrl+Break. Running the driver shim this way is recommended only for
development and testing.
The section describes best practices for securing the Identity Manager driver for Scripting. Topics
include
“Using SSL” on page 131
“Physical Security” on page 131
“Network Security” on page 131
“Auditing” on page 131
“Driver Security Certificates” on page 132
“Driver Shell Scripts” on page 132
“The Change Log” on page 132
“Driver Passwords” on page 132
“Driver Code” on page 133
“Administrative Users” on page 133
“Connected Systems” on page 133
For additional information about Identity Manager security, see the NetIQ® Identity Manager 3.6.1
Administration Guide on the Identity Manager 4.8 Documentation Web site (https://
www.netiq.com/documentation/identity-manager-47/).
Using SSL
Enable SSL for communication between the Metadirectory engine and the driver shim on the
connected system. For more information, see “Use SSL” on page 32. If you don’t enable SSL, you are
sending information, including passwords, in the clear.
Physical Security
Keep your servers in a physically secure location with access by authorized personnel only.
Network Security
Require users outside of the corporate firewall to use a VPN to access corporate data.
Auditing
Track changes to sensitive information. Examine audit logs periodically. For details about using NetIQ
Audit to monitor driver operation, see the NetIQ Audit Documentation Web site (http://
www.novell.com/documentation/novellaudit20/index.html).
Driver Passwords
Use strong passwords for the Driver object and Remote Loader passwords, and restrict knowledge of
them to authorized personnel. These passwords are stored in encrypted form in the security
certificate directory keys. The installation program sets secure file permissions for this directory.
Administrative Users
Ensure that accounts with elevated rights on the Metadirectory system, Identity Vault systems, and
the connected systems are appropriately secure. Protect administrative user IDs with strong
passwords.
Connected Systems
Ensure that connected systems can be trusted with account information, including passwords, for
the portions of the tree that are configured as their base containers.
This section provides information about troubleshooting the Identity Manager 4.8 driver for
Scripting. Major topics include
“Driver Status and Diagnostic Files” on page 135
“Troubleshooting Common Problems” on page 137
“Shared Memory Errors (Linux/UNIX only)” on page 141
# sample /etc/syslog.conf
#
*.err;kern.notice;auth.notice /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit /var/adm/messages
*.alert;kern.err;daemon.err operator
*.alert root
The options in the first column determine which messages are logged. The options in the second
column specify the destination file or user to send the log output to. For example, specifying *.err
logs all messages with a priority of err or above. For more information about syslog priorities, view
your system documentation using the man syslog command. Messages from the driver shim and
messages from the scripts are logged with various priorities as shown in Table A-1. The information
that is recorded depends on your syslog configuration.
Troubleshooting 135
Table A-1 Message Priorities
Failures ERR
0 No debugging
1–3 Identity Manager messages. Higher trace levels provide more detail.
4 Previous level plus Remote Loader, driver, driver shim, and driver connection
messages.
5–7 Previous level plus change log and loopback messages. Higher trace levels provide
more detail.
8 Previous level plus driver status log, driver parameters, driver command line, driver
security, driver Web server, driver schema, driver encryption, driver PAM, driver
SOAP API, and driver include/exclude file messages.
136 Troubleshooting
The Script Output File
By default, script output is written to script-trace.log in the logs directory under the driver
installation directory on the connected system. This file captures the output from all scripts executed
by the driver shim. The location of the script output file is set in the driver parameters.
DSTRACE
You can view Identity Manager information using the DSTRACE facility on the Metadirectory server.
Use iManager to set the tracing level. For example, trace level 2 shows Identity Vault events in XML
documents, and trace level 5 shows the results of policy execution. Because a high volume of trace
output is produced, we recommend that you capture the trace output to a file. For details about
using DSTRACE, see the Identity Manager Administration Guide on the Identity Manager 4.8
Documentation Web site (https://www.netiq.com/documentation/identity-manager-47/).
Troubleshooting 137
Driver Shim Installation Failure
Ensure that you use the correct installation program for your operating system and that you are
running on a supported operating system. For details, see Chapter 2, “Planning for the Scripting
Driver,” on page 15.
Ensure that you run the installation as root (Linux/UNIX) or Administrator (Windows) or
equivalent.
(Linux/UNIX only) Ensure that your package management software, such as RPM, is installed
and up-to-date.
138 Troubleshooting
The driver must be specified as a Remote Loader driver, even if the Identity Vault and connected
system are the same computer. You can set this option in the iManager Driver Edit Properties
window.
You must activate both Identity Manager and the driver within 90 days. The Driver Set Overview
page in iManager shows when Identity Manager requires activation. The Driver Overview page
shows when the driver requires activation.
For details about activating NetIQ Identity Manager Products, see the Identity Manager
Installation Guide on the Identity Manager 4.8 Documentation Web site (https://
www.netiq.com/documentation/identity-manager-47/).
For more information about troubleshooting Identity Manager engine errors, see the Identity
Manager 4.8 Documentation Web site (https://www.netiq.com/documentation/identity-manager-
47/).
Troubleshooting 139
Users or Groups Are Not Provisioned to the Identity Vault
Examine the status log, DSTRACE output, and trace file.
Examine the User Base Container and Group Base Container GCV values. For more details,
“Global Configuration Values Page” on page 35.
To provision identities from the connected system to the Identity Vault, the driver Data Flow
property must be set to Bidirectional or Application to Identity Vault. To change this value,
reimport the driver rules file over your existing driver.
The user that the driver is security equivalent to must have rights to update the base container.
For details about the rights required, see Table 2-1 on page 18.
140 Troubleshooting
Examine the driver Data Flow setting to verify the authoritative source for identities.
Identity Vault and connected system identities must be associated before events are
synchronized. To view an identity’s associations, use Modify User/Group in iManager and click
the Identity Manager tab.
Identity Vault move events can remove the identity from the base container monitored by the
driver to a container that is not monitored by the driver. This makes the move appear to be a
delete.
Troubleshooting 141
142 Troubleshooting
B System and Error Messages
B
Components of the Identity Manager 4.8 driver for Scripting write messages to the system log to
report operational status and problems. For more information about the system log, see “The
System Log (Linux/UNIX only)” on page 135 For detailed troubleshooting information, see
Appendix A, “Troubleshooting,” on page 135.
Each message begins with a code of 3-6 characters associated with the driver component that
generated the message. Use this code to find message information quickly as follows:
“CFG Messages” on page 143
“CHGLOG Messages” on page 144
“DOM Messages” on page 144
“DRVCOM Messages” on page 145
“HES Messages” on page 145
“LWS Messages” on page 146
“NET Messages” on page 147
“NIX Messages (Linux/UNIX only)” on page 147
“OAP Messages” on page 150
“RDXML Messages” on page 151
CFG Messages
Messages beginning with CFG are issued by configuration file processing.
CHGLOG Messages
Messages beginning with CHGLOG are issued by change log processing.
DOM Messages
Messages beginning with DOM are issued by driver components as they communicate among
themselves.
DRVCOM Messages
Messages beginning with DRVCOM are issued by the include/exclude system.
HES Messages
Messages beginning with HES are issued by driver components as they use HTTP to communicate.
LWS Messages
Messages beginning with LWS are issued by the integrated HTTP server.
NET Messages
Messages beginning with NET are issued by driver components during verification of SSL certificates.
NIX008S The shared memory tool was unable to retrieve a key from the
environment.
Explanation: The shared memory tool uses an environment variable to retrieve the key used
to unlock the shared memory region and access driver shim data. The tool could
not obtain the key from the environment.
Possible Cause: The driver shim cannot set environment variables, or the environment has
become corrupt during event processing.
Action: Restart the driver shim process and clear any residual shared memory
segments.Action:
The Identity Manager 4.8 driver for Scripting provides an API library for accessing and updating data
to and from the driver shim during event subscription and publication.
Major topics in this section include
“UNIX Shell (idmlib.sh) Reference” on page 155
“Perl (IDMLib.pm) Reference” on page 158
“Python (idmlib.py) Reference” on page 161
“Microsoft VBScript (IDMLib.vbs) Reference” on page 165
“Windows PowerShell (IDMLib.ps1) Reference” on page 171
The Publisher calls poll.sh periodically. The frequency of the poll is determined by the Polling
Interval driver parameter (60 seconds by default). Edit poll.sh to allow the driver to respond to
events in the external account management system.
The Publisher calls heartbeat.sh periodically to determine whether the external account
management system is responding correctly.
The built-in functions below are defined in idmlib.sh.
General Functions
“IDMGETDRVVAR ParamName” on page 156
“TRACE Message” on page 156
“EXEC Command” on page 156
“STATUS Level Message” on page 156
“STATUS_SUCCESS Message” on page 156
“STATUS_WARNING Message” on page 156
“STATUS_RETRY Message” on page 156
“STATUS_ERROR Message” on page 156
“STATUS_FATAL Message” on page 156
TRACE Message
Appends the specified message to the user-defined trace file.
EXEC Command
Executes an external program using the specified command line, and returns its numerical exit code
on completion.
STATUS_SUCCESS Message
Sends a status document with a success level and message to return to the Identity Manager engine
when the script completes.
STATUS_WARNING Message
Sends a status document with a warning level and message to return to the Identity Manager engine
when the script completes.
STATUS_RETRY Message
Sends a status document with a retry level and message to return to the Identity Manager engine
when the script completes.
STATUS_ERROR Message
Sends a status document with a error level and message to return to the Identity Manager engine
when the script completes.
STATUS_FATAL Message
Sends a status document with a fatal level and message to return to the Identity Manager engine
when the script completes.
IDMGETSUBVAR ParamName
Returns the string value for the Subscriber parameter specified by the string ParamName.
IDMGETVAR Name
Returns a string value for the item specified by Name through standard output. If no values exist,
Empty is returned. If the value is multi-valued, each value will be separated by a newline character.
Publisher Functions
Only one function exists in this category.
IDMGETPUBVAR ParamName
Returns the string value for the Publisher parameter specified by the string ParamName.
Query Functions
“IDMQUERY ClassName Association ReadAttrs” on page 157
“IDMGETQVAR ParamName” on page 157
IDMGETQVAR ParamName
Retrieves a string value for the query result item, specified by ParamName, through standard output.
If no values exist, Empty is returned. If the value is multi-valued, each value is separated by a newline
character.
HEARTBEAT_SUCCESS Message
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
HEARTBEAT_ERROR Message
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
HEARTBEAT_WARNING Message
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
idmgetvar($ParamName)
Returns the string value for the Driver parameter specified by the string ParamName.
idmtrace($Message)
Appends the specified message to the user-defined trace file.
exec($Command)
Executes an external program using the specified command line, and returns its numerical exit code
on completion.
status($Level, $Message)
Sends a status document with given level and message to return to the Identity Manager engine
when the script completes.
The status document as seen by the engine looks like the following:
<status level="success">This is a message</status>
status_success($Message)
Sends a status document with a success level and message to return to the Identity Manager engine
when the script completes.
status_warning($Message)
Sends a status document with a warning level and message to return to the Identity Manager engine
when the script completes.
status_error($Message)
Sends a status document with a error level and message to return to the Identity Manager engine
when the script completes.
status_fatal($Message)
Sends a status document with a fatal level and message to return to the Identity Manager engine
when the script completes.
Subscriber Functions
“idmgetsubvar($ParamName)” on page 160
“idmgetvar($Name)” on page 160
“idmsetvar($Name, $Value)” on page 160
idmgetsubvar($ParamName)
Returns the string value for the Subscriber parameter specified by the string ParamName.
idmgetvar($Name)
Returns a string value for the item specified by Name through standard output. If no values exist,
Empty is returned. If the value is multi-valued, each value is separated by a newline character.
idmsetvar($Name, $Value)
Sets a single string value for the item specified by Name to be returned to the driver engine.
Publisher Functions
“idmgetpubvar($ParamName)” on page 160
idmgetpubvar($ParamName)
Returns the string value for the Publisher parameter specified by the string ParamName.
Query Functions
“idmquery($ClassName, $Association, $ReadAttrs)” on page 161
“idmgetqva($ParamName)” on page 161
idmgetqva($ParamName)
Retrieves a string value for the query result item, specified by ParamName, through standard output.
If no values exist, Empty is returned. If the value is multi-valued, each value is separated by a newline
character.
Heartbeat Functions
“heartbeat_success($Message)” on page 161
“heartbeat_error($Message)” on page 161
“heartbeat_warning($Message)” on page 161
heartbeat_success($Message)
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
heartbeat_error($Message)
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
heartbeat_warning($Message)
Use these functions in the heartbeat.sh script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
General Functions
“idmgetvar(VariableName)” on page 162
“idmtrace(Message)” on page 162
“exec(Command)” on page 162
“status(Level, Message)” on page 162
“status_success(Message)” on page 162
“status_warning(Message)” on page 163
“status_retry(Message)” on page 163
“status_error(Message)” on page 163
“status_fatal(Message)” on page 163
idmgetvar(VariableName)
Returns the string value for the Driver parameter specified by the string ParamName.
idmtrace(Message)
Appends the specified message to the user-defined trace file.
exec(Command)
Executes an external program using the specified command line, and returns its numerical exit code
on completion.
status(Level, Message)
Sends a status document with given level and message to return to the Identity Manager engine
when the script completes.
status_success(Message)
Sends a status document with a success level and message to return to the Identity Manager engine
when the script completes.
status_retry(Message)
Sends a status document with a retry level and message to return to the Identity Manager engine
when the script completes.
status_error(Message)
Sends a status document with a error level and message to return to the Identity Manager engine
when the script completes.
status_fatal(Message)
Sends a status document with a fatal level and message to return to the Identity Manager engine
when the script completes.
Subscriber Functions
“idmgetsubvar(VariableName)” on page 163
“idmgetvar(Name)” on page 163
“idmsetvar(Name, Value)” on page 163
idmgetsubvar(VariableName)
Returns the string value for the Subscriber parameter specified by the string VariableName.
idmgetvar(Name)
Returns a string value for the item specified by Name through standard output. If no values exist,
Empty is returned. If the value is multi-valued, each value is separated by a newline character.
idmsetvar(Name, Value)
Sets a single string value for the item specified by Name to be returned to the driver engine.
Publisher Functions
“idmgetpubvar(VariableName)” on page 163
idmgetpubvar(VariableName)
Returns the string value for the Publisher parameter specified by the string VariableName.
idmgetqva(ParamName)
Retrieves a string value for the query result item, specified by ParamName, through standard output.
If no values exist, Empty is returned. If the value is multi-valued, each value is separated by a newline
character.
Heartbeat Functions
“heartbeat_success(Message)” on page 164
“heartbeat_error(Message)” on page 164
“heartbeat_warning($Message)” on page 164
heartbeat_success(Message)
Use these functions in the heartbeat.py script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
heartbeat_error(Message)
Use these functions in the heartbeat.py script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
heartbeat_warning($Message)
Use these functions in the heartbeat.py script to indicate the status of the external application.
Heartbeat documents are sent to the engine in following format:
<status level="success" type="heartbeat">This is a heartbeat message</
status>
General Functions
“Function IDMGetDriverParam(ParamName)” on page 165
“Sub IDMTrace Message” on page 165
“Function IDMExecute(Command)” on page 166
“Function IDMExecuteIO(Command, Input)” on page 166
“Sub IDMStatus(Level, Message)” on page 166
“Sub IDMStatusSuccess(Message)” on page 166
“Sub IDMStatusWarning(Message)” on page 166
“Sub IDMStatusRetry(Message)” on page 166
“Sub IDMStatusError(Message)” on page 166
“Sub IDMStatusFatal(Message)” on page 166
Function IDMGetDriverParam(ParamName)
Returns the string value for the Driver parameter specified by the string ParamName.
Sub IDMStatusSuccess(Message)
Set the status level and message to return to the Identity Manager engine when the script
completes.
Sub IDMStatusWarning(Message)
Set the status level and message to return to the Identity Manager engine when the script
completes.
Sub IDMStatusRetry(Message)
Set the status level and message to return to the Identity Manager engine when the script
completes.
Sub IDMStatusError(Message)
Set the status level and message to return to the Identity Manager engine when the script
completes.
Sub IDMStatusFatal(Message)
Set the status level and message to return to the Identity Manager engine when the script
completes.
Subscriber Functions
“Function IDMGetSubscriberParam(ParamName)” on page 167
“Sub IDMSetCommand(Command)” on page 167
Function IDMGetSubscriberParam(ParamName)
Returns the string value for the Subscriber parameter specified by the string ParamName.
Sub IDMSetCommand(Command)
Sets the command that the Subscriber return to the Identity Manager engine. This function must be
called before using IDMWriteValue functions. If only a status needs to be returned, use one of the
IDMStatus functions (see above).
Function IDMGetEventValueCount(Name)
Returns the number of values for the item specified by Name. (Items include event information and
attribute changes.)
Function IDMGetEventValues(Name)
Returns an array of string values for the item specified by Name. If no values exist, Empty is returned.
Function IDMGetEventValue(Name)
Returns the string value for the item specified by Name. If multiple values exist for the item, it
returns the first value. If no values exist, Empty is returned.
Function IDMSubGetNamedPassword(Name)
Returns a named password specifed by Name from the Identity Manager engine. The value Empty is
returned if no such password exists.
Function IDMGetPublisherParam(ParamName)
Returns the string value for the Publisher parameter specified by the string ParamName.
Sub IDMPublishInit(Command)
Sets the Publisher command specified by Command to return to the driver engine when IDMPublish
is called.
Function IDMPublish
Submit the command and item values specified above to the driver engine for Publication to the
identity vault.
Function IDMPubGetNamedPassword(Name)
Returns a named password specified by Name from the Identity Manager engine. The value Empty is
returned if no such password exists.
Query Functions
“Sub IDMQueryInit” on page 169
“Sub IDMQuerySetAssociation(Association)” on page 169
“Sub IDMQuerySetSearchRoot(SearchRoot)” on page 169
“Sub IDMQueryAddSearchAttr(Name, Value)” on page 169
“Sub IDMQueryAddReadAttr(Name)” on page 169
Sub IDMQueryInit
Initializes a query to be submitted to the identity vault with the IDMQuery call. NOTE: Currently only
queries that query a single object are supported.
Sub IDMQuerySetAssociation(Association)
Specifies the association of the identity vault object to query.
Sub IDMQuerySetSearchRoot(SearchRoot)
Specifies the DN of the identity vault object to query. Either the object’s association or DN must be
specified. If both are specified, the association value is used by the Identity Manager engine.
Sub IDMQueryAddReadAttr(Name)
Specifies an attribute name whose values should be returned by the query. By default, all attributes
are returned.
Sub IDMQuerySetReadParent(ReadParent)
Specifies whether the association and DN of the parent of the queried object should be returned
(ReadParent is boolean). The default is False.
Function IDMGetQueryInstanceAssociation
Returns the association for the returned instance.
Function IDMGetQueryInstanceDN
Returns the DN for the returned instance. The DN is in slash format, such as \ACME\Users\Bob.
Function IDMGetQueryInstanceClass
Returns the class name for the returned instance.
Function IDMGetQueryInstanceParentAssociation
Returns the association for instance’s parent object, if the ReadParent flag was specified.
Function IDMGetQueryInstanceParentDN
Returns the DN for instance’s parent object, if the ReadParent flag was specified.
Function IDMGetQueryInstanceAttrNames
Returns an array containing the names of the attributes retrieved for the instance. Returns Empty if
no attributes were retrieved.
Function IDMGetQueryInstanceAttrCount
Returns the number of attributes retrieved for the instance.
Function IDMGetQueryInstanceAttrValues(AttrName)
Returns an array of values for the attribute with the specified AttrName. Returns Empty if no values
are available.
Function IDMGetQueryInstanceAttrValue(AttrName)
Returns a string value for the attribute with the specified AttrName. If multiple values are available
for the attribute, the first one is returned. If no values are available, Empty is returned.
Sub IDMHeartbeatSuccess(Message)
Use these functions in the heartbeat.wsf script to indicate the status of the external application.
Sub IDMHeartbeatError(Message)
Use these functions in the heartbeat.wsf script to indicate the status of the external application.
Sub IDMHeartbeatWarning(Message)
Use these functions in the heartbeat.wsf script to indicate the status of the external application.
General Functions
“function idm_getdriverparam($paramname)” on page 172
“function idm_trace($message)” on page 172
function idm_getdriverparam($paramname)
Returns the string value for the Driver parameter specified by the string $paramname.
function idm_trace($message)
Appends the specified message to the user-defined trace file.
function idm_statussuccess($message)
Set the status success message to return to the Identity Manager engine when the script completes.
function idm_statuswarning($message)
Set the status warning message to return to the Identity Manager engine when the script completes.
function idm_statusretry($message)
Set the status retry message to return to the Identity Manager engine when the script completes.
function idm_statuserror($message)
Set the status error message to return to the Identity Manager engine when the script completes.
function idm_statusfatal($message)
Set the status fatal message to return to the Identity Manager engine when the script completes.
Subscriber Functions
“function idm_getsubscriberparam($paramname)” on page 173
“function idm_setcommand($command)” on page 173
“function idm_geteventvalues($name)” on page 173
function idm_getsubscriberparam($paramname)
Returns the string value for the Subscriber parameter specified by the string $paramname.
function idm_setcommand($command)
Sets the command that the Subscriber returns to the Identity Manager engine. This function must be
called before using idm_writevalue functions. If only a status needs to be returned, use one of the
idm_status functions (see above).
function idm_geteventvalues($name)
Returns an array of string values for the item specified by $name. If no values exist, $null is returned.
function idm_geteventvalue($name)
Returns the string value for the item specified by $name. If no values exist, $null is returned.
function idm_geteventvaluenames
Returns an array containing each value name for the event. This function can be used to iterate over
every value.
function idm_geteventattrnames
Returns an array containing each attribute item for the event. This includes ADD_attrname,
REMOVE_attrname and PASSWORD values.
Publisher Functions
“function idm_getpublisherparam($paramname)” on page 174
“function idm_publishinit($command)” on page 174
“function idmpublishvalues($name, $values)” on page 174
“function idm_publishvalue($name, $value)” on page 174
“function idm_publish” on page 174
“function idm_pubgetnamedpassword($name)” on page 174
function idm_getpublisherparam($paramname)
Returns the string value for the Publisher parameter specified by the string $paramname.
function idm_publishinit($command)
Sets the Publisher command specified by $command to return to the driver engine when
idm_publish is called.
function idm_publish
Submit the command and item values specified above to the driver engine for Publication to the
identity vault.
function idm_pubgetnamedpassword($name)
Returns a named password specified by $name from the Identity Manager engine. The value $null is
returned if no such password exists.
function idm_queryinit
Initializes a query to be submitted to the identity vault with the idm_doquery call. NOTE: Currently
only queries that query a single object are supported.
function idm_querysetassociation($association)
Specifies the association of the identity vault object to query.
function idm_querysetsearchroot($searchroot)
Specifies the DN of the identity vault object to query. Either the object’s association or DN must be
specified. If both are specified, the association value is used by the Identity Manager engine.
function idm_queryaddreadattr($name)
Specifies an attribute name whose values should be returned by the query. By default, all attributes
are returned.
function idm_doquery
Executes the query with the parameters specified by idm_querysetXXX calls. The function returns
$True if an object (called an instance) is returned.
function idm_getqueryinstanceassociation
Returns the association for the returned instance.
function idm_getqueryinstancedn
Returns the DN for the returned instance. The DN is in slash format, for example:
\ACME\Users\Bob.
function idm_getqueryinstanceclass
Returns the class name for the returned instance.
function idm_getqueryinstanceparentassociation
Returns the association for instance’s parent object, if the $readparent flag was specified.
function idm_getqueryinstanceparentDN
Returns the DN for instance’s parent object, if the $readparent flag was specified.
function idm_getqueryinstanceattrnames
Returns an array containing the names of the attributes retrieved for the instance. Returns $null if
no attributes were retrieved.
function idm_getqueryinstanceattrcount
Returns the number of attributes retrieved for the instance.
function idm_getqueryinstanceattrvalues($attrname)
Returns an array of values for the attribute with the specified $attrname. Returns $null if no values
are available.
Heartbeat Functions
“function idmheartbeatsuccess($message)” on page 177
“function idmheartbeaterror($message)” on page 177
“function idmheartbeatwarning($message)” on page 177
function idmheartbeatsuccess($message)
Use this function in the heartbeat.ps1 script to indicate a success status of the external
application.
function idmheartbeaterror($message)
Use this function in the heartbeat.ps1 script to indicate an error status of the external
application.
function idmheartbeatwarning($message)
Use this function in the heartbeat.ps1 script to indicate a warning status of the external
application.
Certificate Authority:
Subject: ou=Organizational CA,o=TREENAME
Not Before: 20070321144845Z
Not After: 20170321144845Z
Do you accept the Certificate Authority? (Y/N) y
Enter the host name or IP address and TCP port number of an LDAP server for your Identity Vault.
The LDAP server must be configured for SSL, and it must be listening on the SSL port. The default SSL
port is 636.
The driver shim connects to the specified server and displays information about the Certificate
Authority. If you accept the Certificate Authority, the driver shim saves it to the local file system.
If you do not have LDAP configured for SSL, you can use a manual process to configure the driver for
SSL. For details, see Section A.2.3, "Driver Certificate Setup Failure."
Table D-1 Driver Shim Command Line Options for Setting Up SSL Certificates
-password
Other Options
Table D-2 Other Driver Shim Command Line Options
-sp [remoteLoaderPassword driverObjectPassword] Sets the Remote Loader and driver object passwords
to the passwords specified on the command line,
-setpassword [remoteLoaderPassword then stops the driver shim. If the passwords are
driverObjectPassword] omitted, the driver shim prompts for the passwords.
-help
-v-version Displays the driver shim version and build date, then
exits.
Name Description
type The command type, which could be one of the following: add,
delete, modify, modify-password, rename, modify-
association, status, xds. When using the xds type, a raw XML
document can be passed to the tool to be published as is.
association The association string value for which the event being published
describes.
src-dn The source distinguished name of the object being published, if this
object resides in a hierarchical directory structure.
old-src-dn If the published event is a move or rename, the old-src-dn specifies the
old distinguished name before the move or rename event.
password The new password of the object being published. This is only valid for
add or modify-password events.
old-password The old password of the object being published. This is only valid for
modify-password events.
new-name The new name of an object being published during a rename event.
old-association Specifies the name of the old association value, during a modify-
association event.
new-association Specifies the name of the new association value, during a modify-
association event.
status-level Specifies the status level for a status message. Valid levels are: success,
error, warning, retry, fatal.
status-message Specifies the text messages that should be included for a status
document.
-1 Specifies that the event should be put on hold (do not publish), until a
release is issued.
When invoked, the changelog utility waits for input on standard input until an EOF (end of file)
character is received. If entered on the command-line, you can terminate it with the Ctl-d meta
character. Additional name/value pairs can then be passed to this tool to supply additional event
information such as attribute values being added or removed.
When invoked from a script, you can use a “here-is” document format to pass standard input to the
changelog tool. When passing input to a command-line utility through standard input, you have the
advantage that the information is protected from the environment, adding security to your
publisher. When using command-line arguments, these options will appear in cleartext to the
outside environment with tools such as “ps”.
Examples from a script:
usclh -t add -c User -a bob <<EOF
ADD_CN=bob
ADD_Login Disabled=true
EOF
EOF
Examples from a command line:
# ./usclh -t xds
<nds dtdversion="1.1" ndsversion="8.6">
<input>
<modify class-name="User" event-id="12345">
<association>bob</association>
<modify-attr attr-name="MyAttr">
<remove-all-values/>
<add-value>
<value>some new value</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
^d
Command Function
Table D-5 Commands for Starting, Stopping, and Displaying the Status of the Driver Shim
AIX /etc/rc.d/init.d/usdrvd
HP-UX /sbin/init.d/usdrvd
Linux /etc/init.d/usdrvd
Solaris /etc/init.d/usdrvd