Using the transform AttributeResolver

Scott Hall shall05 at MIT.EDU
Tue Jan 21 15:08:19 EST 2014


Hi All,

I'm trying to understand the usage of the AttributeResolver transform type

I have an attribute named "memberOf" that contains group data from an ldap store in this form:

CN=exchange.users,OU=groups,OU=Admin,DC=exchange,DC=mit,DC=edu;CN=shuttletrack-request,OU=mail,OU=lists,OU=Moira,DC=exchange,DC=mit,DC=edu;CN=pfaids-rt,OU=mail,OU=lists,OU=Moira,DC=exchange,DC=mit,DC=edu;CN=ppl-acl,OU=group,OU=lists,OU=Moira,DC=exchange,DC=mit,DC=edu;CN=sap-lpcaccess-top,OU=mail,OU=lists,OU=Moira,DC=exchange,DC=mit,DC=edu; 
.... (lot's more data)

I need to strip out the OU/DC entries leaving an attribute with data in this form:

CN=exchange.users,CN=shuttletrack-request,CN=pfaids-rt,CN=ppl-acl,CN=sap-lpcaccess-top ...

I have a transform rule that looks like this at the moment:

<AttributeResolver type="Transform" source="memberOf">
	<Regex match="(CN=.*?,)">$1</Regex>
</AttributeResolver>

Using the $1 placeholder I get unchanged data in the attribute - (on a match it passes the data through unchanged?)

Using the $2 placeholder I get the all BUT the matches

Any clues as to how the rule should be structured - or have I missed something?

Thanks in advance

Scott


More information about the users mailing list