IGI gurus should understand that adding rules to Live Events is really the only way you are going to get maximum value from your IGI deployment. Out of the box features within identity tools are rarely sufficiently detailed enough to allow for production deployment and there is always a need to enhance these processes with organisation-specific rules and definitions.
IGI gurus will also be aware that the firing of rules can be somewhat hit and miss. Placing objects into the USER_ERC table will fire a Live Event on the IN queue, but writing an advanced rule to perform a SQL update of the same database table using the internal scheduler will NOT fire a Live Event!
Similarly, modifying a user in the Administration Console will not fire an event either unless you specifically "Enable Internal Events" on your Settings tab.
Enabling Internal Events, however, will only allow a handful of events to trigger a rule, For example, you can add business logic to the Add Entitlement event, but you cannot add business logic to the Publish Entitlement event or the Add Entitlement to an OU event. Maybe one day this will be enabled (and I really hope some of the IBM Development Team read this)!
Anyone who has ever enabled internal events, then clicked on the Monitor/INTERNAL tab to view the events may be sorely disappointed. I call it the "Tab of Disappointment" and why? Well, it will be empty. No matter what events are being fired, it will be empty. That is, until you add this little gem to your system:
when
event : EventBean( )
then
/*
* Version: 1.0
* Date : 2018-02-28
* Purpose: Saves the event so it is viewable in the logs
*/
event.setState(1l);
This piece of code should be added to the BEFORE ruleflow within Rules/Live/Internal. This code instructs the platform to always save the event within the database tables which makes the event visible in the Monitor/INTERNAL tab.
Now you can see what is going on in your system and maybe even replay events.
NOTE: Should you wish to look in your log files for anything you may be spewing out from your rules within Rules/Live/Internal, you may have to look at the accessgovernancecore_event_out.log file. Don't ask why!
In a world where technology is supposed to make things simpler, why is it that the world seems to be more complicated? This blog is made up of the ramblings of an IT Security Consultant specialising in IBM Security software with a heavy focus on IGI, ITIM/ISIM, ITAM/ISAM and ITDI/ISDI. All opinions expressed are my own and have nothing to do with any employer past or present. I hope you find them useful.
Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts
Monday, April 16, 2018
Thursday, December 04, 2014
ISIM Workflow Extensions
During recent ramblings, I mentioned that I would publish some of my favourite ISIM workflow extensions. The workflow extensions that are provided "out of the box" cover tasks such as adding, modifying and deleting accounts and identities as well as enforcing policy and other standard operations. However, the "out of the box" list could do with having a number of useful extensions added.
One of my favourites (and something I pretty much insist on being installed as soon as I've deployed ISIM) is my version of a sendmail. ISIM has the ability to send emails, but only to those identities who have an email address. However, what if you wanted to send an email to an address which was not attached to any identity? What if you wanted to email a user during a self-registration workflow at which point the identity has not yet been created?
My sendmail extension is just a handful of lines long, uses standard ISIM methods and takes just the following arguments: eMail Address, Subject and Body.
The code is very simple indeed:
public ActivityResult sendMail(String mailAddress, String mailSubject, String mailBody) {
try {
List<String> addresses = new ArrayList<String>();
addresses.add(mailAddress);
NotificationMessage nMessage = new NotificationMessage(addresses, mailSubject, mailBody, mailBody);
MailManager.notify(nMessage);
return new ActivityResult(ActivityResult.STATUS_COMPLETE,
ActivityResult.SUCCESS,
"eMail Sent",
null);
} catch (Exception e) {
return new ActivityResult(ActivityResult.STATUS_COMPLETE,
ActivityResult.FAILED,
"eMail Not Sent",
null);
}
}
Registering the JAR and registering the extension in the workflowextensions.xml file is all that is required to make the extension available.
<ACTIVITY ACTIVITYID="sendMail" LIMIT="600000">
<IMPLEMENTATION_TYPE>
<APPLICATION CLASS_NAME="com.sswann.sendMail" METHOD_NAME="sendMail" />
</IMPLEMENTATION_TYPE>
<TRANSITION_RESTRICTION SPLIT="XOR" />
<PARAMETERS>
<IN_PARAMETERS PARAM_ID="recipient" TYPE="String" />
<IN_PARAMETERS PARAM_ID="subject" TYPE="String" />
<IN_PARAMETERS PARAM_ID="body" TYPE="String" />
</PARAMETERS>
</ACTIVITY>
From here, it's merely a matter of constructing your relevant data and handling the activity.resultSummary correctly in your subsequent nodes.
Previously, I stated that workflow extensions should be created when you find you are repeating Javascript over and over again. If you need to check the status of an account owner before invoking an account operation, that would sound like a great candidate for creating a workflow extension and having a solid reusable component. A list of useful extensions might include:
- Check Account Already Exists
- Check Owner Status
- Check Manager Status
- Read/Update LDAP Object (not an identity or account)
- Read/Update Database Object
- Read/Update Message on ESB (MQ)
- Call Web Service
- Create Helpdesk Ticket/Send Alert
Have you any good candidates for an extension?
Monday, February 20, 2012
Copy, Paste And ITIM Workflows
The astute amongst you will have seen that developing ITIM Workflows got a little trickier about a year or so ago when copying and pasting into and out of the script editor just stopped working.
Of course, this isn't an ITIM issue - but rather a "security" loophole plugging issue given to use by the powers that be at Java HQ.
The very astute amonst you will know how to get around this hassle and re-enable clipboard access, but for the rest of you, read on.
Shut-down your browser and any Java based applications. Open your favourite editor - if you are a Windows user, you may want to run it as Administrator! Locate your java.policy file which you may find under {JAVA_HOME}\lib\security and add the following line within the grant { } section:
Restart your browser and you ought to have full copy/paste functionality once again.
Of course, this isn't an ITIM issue - but rather a "security" loophole plugging issue given to use by the powers that be at Java HQ.
The very astute amonst you will know how to get around this hassle and re-enable clipboard access, but for the rest of you, read on.
Shut-down your browser and any Java based applications. Open your favourite editor - if you are a Windows user, you may want to run it as Administrator! Locate your java.policy file which you may find under {JAVA_HOME}\lib\security and add the following line within the grant { } section:
permission java.awt.AWTPermission "accessClipboard";
Restart your browser and you ought to have full copy/paste functionality once again.
Subscribe to:
Posts (Atom)
