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

Comments are closed.

Website Built with WordPress.com.

Up ↑

%d bloggers like this: