Skip to main content

Novell IdM 3.6 : Creating custom Subscriber PostProcessor Java extension for Delimited Text Driver Part 1

I had chance to write a custom PostProcessor extension for a Delimited Text Driver for Novell Identity Manager, 

"the PostProcessor extension should execute the code under another Windows Domain User account. So I decided to run the driver with Remote Loader Configuration, running the DirXML windows Service under another Windows Domain User Account."

Software and settings in my setup:

* Novell Designer 3.0.1 (build  Jan 5, 2009)
* Novell Identity Manager 3.6 / Windows Server 2003 R2
* Novell iManager 2.7.2
* Delimited Text Driver 3.6 ver 2.0 (imported configuration  file from Designer 3.0.1)
* And the Delimited Text Driver was going to run on the remote server (Remote Loader), 
* Java IDE was  (IntelliJIDEA)


i started first with digging into documentation of the driver, and i came a cross this section:

Using Java Interfaces to Customize File Processing:


so in my case i was about to wite a Subscriber PostProcessor extension for my use.

so to complete the process,  i performed following tasks:
  • Create a Java class that implements one of the new interfaces
  • Create a Java .jar file that contains your new class, and deploy it
  • Configure the driver to use the new class

Create a Java class that implements one of the new interfaces:

Writing interface requires you to understand little UML about the interface, so i got to read javaDoc for the delimited text driver, which i found on the Installation media of the Novell Identity Manager 3.6  ..delimited\delimitedtext\javadocs\api docs\index.htm

Class Diagram









While creating your custom class, your class has to implement the interface in package com.novell.nds.dirxml.driver.delimitedtext.PostProcessor, which extends the interface Extension.

Methods that interface PostProcessor requires  to be implement by your class are:

void nextOutputFile(java.io.File outputFile) 
void init(java.lang.String parameterString, Tracer tracer)   (inherited from the interface Extension).

to implement these abstract methods , you need to import some libs into  your java project.

import com.novell.nds.dirxml.driver.delimitedtext.PostProcessor;
import com.novell.nds.dirxml.driver.delimitedtext.StatusException;
import com.novell.nds.dirxml.driver.delimitedtext.Tracer;
import java.io.*;


you will find these imports in JAR "DelimitedTextUtil.jar", in my case  "C:\Novell\RemoteLoader\lib" on the server where i have installed the Remote Loader software and the Delimited Driver shim.

implementation foot print of methods in my class:

public void nextOutputFile(java.io.File outputFile)
  {
  // TODO:  do something with the notified outputFile the driver just created in the output directory.
}


public void init(String paramsHere, Tracer paramHereTracer)
    throws StatusException, Exception
  {
//TODO:  if you want to initialize your classe with some  paramters from the driver, then you need to implement this method. In my case it was not required!

}


Create a Java .jar file that contains your new class, and deploy it

I had to package my class into a JAR file ( excluding external libs).  and copied that .JAR file to the remote server where the Remote Loader was running:  into the path  "C:\Novell\RemoteLoader\lib"


Configure the driver to use the new class


the pre-configured .XML file does not come up with the configuration paramters, so you have to define them on your driver.  Click the Driver, Under the Driver Configuration Tab, goto the  Driver Paramter Section, and click the "Edit Xml".

Find the section name 

subscriber-options
configuration-values
definitions

under these definations add following two definations: ( please mind you have define them as other definations are defined, im writing here just names and values here in another format)

 name="post-processor" type="string"  value= mypackage.CustomPostProcessor
 name="post-processor-params" type="string" value=



so, Finally close the Configuration tab and try to Start the Driver, it should start without any problems and will do the stuff which you expect from your class to do.


Few things which help:

* Before deploying your class, test it localy in the IDE with the scenarios you want to acheive.
* Deploy and run the IdM Delimited Driver with Local setup first, Which in turns can give you good debugging info about your class in DSTrace view.
* After testing the class, you can deploy your code on the remote server, with remote loder configuration.

Debugging remote requires  attaching java Debuger into Remote Loader JVM. which can be little tricky, if you are not familar attaching java debugger already. so its good to run the driver Local first if you want to see if your class hooks with driver configuration.


Comments

Popular posts from this blog

My own developed - Active Directory Cache Inspector for AD Driver Novell Identity manager

Sometimes there is a need for us (Consultants) to see a snapshot of all the changes that happened on the Active directory side while the Novell AD IDM driver was stopped or was not running, before we decide to start the AD driver. Since Novell Identity Manager currently allows us to see all the events which happened in the Identity vault only, but not on the AD side, I decided to write such a tool myself, and of course wanted to share this tool with the consultants/community out there. It's a .NET 2.0 WinForm application, written in C# programming language. To run this tool you should have at minimum: .NET 2.0 framework installed, ( Not supported on the Linux platforms yet) This application must be run under the same user which is configured on the AD driver. Short Tutorial (How To): When you run the application (ADCView.exe), the application automatically discovers the current domain, a domain controller, and default domain naming context in the user logged in domain automatically

NETIQ IDM - Boost strap your start with identity application REST API

Boost strap your start with identity application REST API: If you want to play out with NetIQ rest API within identity application (IDMProv), you can see a few examples here: these are the rest API protected by Oauth2 Authorization (resource owner password credentials grant): The first step is to obtain token: ( you must have enabled client "rbpm" in the OSPF for the resource owner password credential grant) flow: An example is taken in c#: (postman) Get an access token: var client = new RestClient("https://<your host>/osp/a/idm/auth/oauth2/grant"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddHeader("Authorization", "Basic Basic bas64 encoded string clientid<rbpm>:clientsecret>"); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); req