TransformAttributeResolver adds instead of replacing values
Kimmo Koivisto
kimmo.koivisto at netum.fi
Tue Sep 7 11:15:07 UTC 2021
Hello,
I'm trying to replace existing attribute with values from another attribute using Transform.
I am using 3.2.3 SP/centos 7.9.
When using transform, destination attribute is not replaced as I understood from documentation but transformed value is added and multivalue attribute is created.
https://shibboleth.atlassian.net/wiki/spaces/SP3/pages/2065334474/TransformAttributeResolver
Example source attribute before transform:
schacPersonalUniqueID: urn:schac:personalUniqueID:fi:FIC:123456-123X
Example dest attribute before transform:
nationalIdentificationNumber: 654321-321Y
My transform is:
<AttributeResolver type="Transform" source="schacPersonalUniqueID">
<Regex match="^.*:(.*)$" dest="nationalIdentificationNumber">$1</Regex>
</AttributeResolver>
As I understood from the documentation, dest attribute should be replaced by transform.
Transform regex reads the proper value from source attribute but does not replace dest attribute.
Expected result (content is replaced with transform):
nationalIdentificationNumber:123456-123X
Result:
Transform adds new value and creates multivalue attribute:
nationalIdentificationNumber:123456-123X;654321-321Y
How to replace existing values using transform or is there other ways to handle this?
If not possible, is there any way one could convert multivalue attribute to single value to fix this?
Cheers,
Kimmo Koivisto
More information about the users
mailing list