ISAM for Mobile: Trace statements in Mapping Rules

 

Edit (13/1/15): There is another example of trace statements which references a different class in the article: ISAM for Mobile: Javascript Policy Information Points

Debugging IBM Security Access Manager (ISAM) for Mobile Mapping rules can be challenging. One of the things that makes it much easier is having regular trace statements.

In developing the other ISAM for Mobile articles, I found it much easier working out certain values using the Mapping extension utilities for tracing.

ISAM for Mobile: OAuth Authorization in Mapping Rules:
https://philipnye.com/posts/isam-for-mobile-oauth-authorization-in-mapping-rules/

ISAM for Mobile: Accessing HTTP Headers in Authentication Service Mapping Rules
https://philipnye.com/posts/isam-for-mobile-accessing-http/

When generating trace, ensure that you have the trace statements enabled in the appliance:

In order to use the trace utilities, add the trace string to the section labelled Tracing Specification:

com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils=ALL

This is very similar to the old WebSphere ISC mechanism for trace strings.

Once enabled, trace data will be generated to the application log files section:

In your mapping rules, import the correct class, and then the trace string is available:

importClass
    (Packages.com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils);
/*
 * your code here
 */
IDMappingExtUtils.traceString("My new trace String: " + someValue);

Now when the mapping rule is executed, the trace string should appear in the trace.log.

[4/2/14 15:46:48:840 EST] 0000004f id= com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils > traceString ENTRY My new trace String: null

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

WordPress.com.

Up ↑

%d bloggers like this: