Cybersecurity
DevOps Cloud
IT Operations Cloud
With the release of NetIQ Identity Manager 4.0 Support Pack 1 (aka IDM 4.01) some bug fixes, and a few new features were added.
Specifically three partner provided drivers were included, an RSA Driver, a Blackboard driver, and a Google Apps driver.
I discussed some of the new features and bugs fixed in IDM 4.01 in this series of articles:
I have been working on a series of articles walking through driver configurations, policy by policy to try and understand what the driver is doing, under the covers.
You can see more of these walk throughs on a Wiki page I maintain to keep them all together: Detailed driver walk through collection.
For this series of articles I would like to start looking at the Google Apps driver in IDM 4.01, that is provided by Consensus Consulting.
In the first article in the series I worked my way through the Subscriber Event transform and half way through the Matching Policy set.
getEntParamField(param, field)
getEntParamFieldBackwardsCompatible(param, idm4field, legacyfield)
getIDM4EntParamField(jsonstr, field)
getParamValue(paramString, paramName)
/**
* Get named field form an entitlement parameter string
* The function tries to determine the parameter format automatically and parse the parameter accordingly
*
* @param param parameter string ( e.g. '{"ID":"b53b65bb0b921548b8830cc698666dc2","ID2":"CN=PamelaGroup,CN=Users,DC=carpathia,DC=qalab,DC=com"}' or 'AG=Group1|LSNAME=S7ECLNT315|FROM=|TO=')
* @param field field name
* @return value field value
*/
function getEntParamField(param, field)
{
return getEntParamFieldBackwardsCompatible(param, field, field);
}
/**
* Get named field form an entitlement parameter string.
* The function tries to determine the parameter format automatically and parse the parameter accordingly.
* If the field names have changed from the legacy format to the idm4 format, this method allows both field names to be specified.
*
* @param param parameter string ( e.g. '{"ID":"b53b65bb0b921548b8830cc698666dc2","ID2":"CN=PamelaGroup,CN=Users,DC=carpathia,DC=qalab,DC=com"}' or 'AG=Group1|LSNAME=S7ECLNT315|FROM=|TO=')
* @param idm4field idm4 format field name
* @param legacyfield legacy format field name
* @return value field value
*/
function getEntParamFieldBackwardsCompatible(param, idm4field, legacyfield)
{
param = String((new JString(param)).trim());
if (param.charAt(0)=='{' && param.charAt(param.length-1)=='}')
{
try {
return getIDM4EntParamField(param, idm4field);
}
catch (e) {
return getParamValue(param, legacyfield);
}
}
else {
return getParamValue(param, legacyfield);
}
}
/**
* Get named field form a JSON-formatted IDM4 entitlement parameter string
*
* @param jsonstr JSON string ( e.g. {"ID":"b53b65bb0b921548b8830cc698666dc2","ID2":"CN=PamelaGroup,CN=Users,DC=carpathia,DC=qalab,DC=com"} )
* @param field field name
* @return value field value
*/
function getIDM4EntParamField(jsonstr, field)
{
var jsonobj = eval('(' jsonstr ')');
return eval("jsonobj." field);
}
/**
* Get named parameter value form a pipe-delimited (|) string
*
* @param paramString parameter string string ( e.g. AG=Group1|LSNAME=S7ECLNT315|FROM=|TO= )
* @param paramName parameter name
* @return value parameter value
*/
function getParamValue(paramString, paramName)
{
try {
var pairs = String(paramString).split('|');
for (i in pairs) {
pair = pairs[i].split('=');
if (pair[0].equals(paramName)) {
return pair[1];
}
}
} catch (e) {
return String(paramString);
}
return paramString;
}