IdPv3: Problem with back references in mapped attribute definition
Jarno Huuskonen
jarno.huuskonen at uef.fi
Tue Mar 17 11:08:49 EDT 2015
Hi,
On Tue, Mar 17, Etienne Dysli-Metref wrote:
> Hi list!
>
> The XML schema for attribute resolver configuration says that back
> references (as supported by java.util.regex.Pattern) are supported in
> the ReturnValue element (see
> http://shibboleth.net/schema/idp/shibboleth-attribute-resolver-ad.xsd
> complexType "ValueMapType"), but I can't get this to work. I have the
> following mapped attribute definition and I'm using IdP version 3.1.0.
>
> <resolver:AttributeDefinition xsi:type="ad:Mapped"
> id="eduPersonAffiliation" sourceAttributeID="eduPersonAffiliation">
> [...]
> <ad:ValueMap>
> <ad:ReturnValue>member</ad:ReturnValue>
> <ad:SourceValue>staff|student|faculty|employee</ad:SourceValue>
> </ad:ValueMap>
> <ad:ValueMap>
> <ad:ReturnValue>\\1</ad:ReturnValue>
> <ad:SourceValue>(staff|student|faculty|employee)</ad:SourceValue>
> </ad:ValueMap>
> </resolver:AttributeDefinition>
Does it work if you use <ad:ReturnValue>$1</ad:ReturnValue> ?
I have something like this in attribute-resolver:
<ad:ValueMap>
<ad:ReturnValue>some_string_to_add_before_val:$1</ad:ReturnValue>
<ad:SourceValue>(.+)</ad:SourceValue>
</ad:ValueMap>
and it works for me.
-Jarno
--
Jarno Huuskonen
More information about the users
mailing list