Need help with script to split LDAP "cn" into "firstname" in attribute-resolver.xml?
Peter Schober
peter.schober at univie.ac.at
Fri Nov 13 04:29:02 EST 2015
* Eric Wedaa <Eric.Wedaa at marist.edu> [2015-11-10 15:56]:
> My LDAP server does not populate the "firstname" field. But it
> does populate the "cn" field in a space delimited format. (ie
> "Eric Wedaa", "Eric W. Wedaa", "Eric Smith-Wedaa")
>
> Does anybody have an attribute-resolver.xml entry handy to break
> the "cn" field apart and load the "firstname" field?
See the last example at the very end of
https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverMappedAttributeDefinition
And your ValueMap (child elements) could look something like
<ad:ReturnValue>$1</ad:ReturnValue>
<ad:SourceValue>^(.+) .+$</ad:SourceValue>
or maybe
<ad:ReturnValue>$1</ad:ReturnValue>
<ad:SourceValue>^([^ ]+) .+$</ad:SourceValue>
-peter
More information about the users
mailing list