generating attribute from other attribute in SP
Peter Schober
peter.schober at univie.ac.at
Mon Aug 12 11:50:19 EDT 2013
* Flannery, Sean <sean.flannery at jwt.com> [2013-08-12 17:31]:
> need: generate attribute user-dn from user-unique
>
> this is how I have it implemented
>
> in attribute-map.xml:
> <!-- this is the real attribute that comes back from the IDP -->
> <Attribute name="user-unique" id="user-unique" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" />
> <!-- this is the generated attribute, built from user-unique -->
> <Attribute name="user-dn" id="user-dn" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" />
Why put user-dn in the attribute-map if it will never be coming from
the IdP (i.e., there's nothing to map it from)? Try removing that.
> Secondly, though I'm just trying to get the AttributeResolver to
> work at this point, I'll eventually need to combine the value of
> user-unique with a String literal but don't see syntax examples.
> Any idea if this would work,
>
> <AttributeResolver type="Template" sources="user-unique" dest="user-dn">
> <Template>"id=" $user-unique ",ou=people"</Template>
> </AttributeResolver>
Here's the example from the documentation:
<Template>$givenName $sn</Template>
So I'd lose all the double quotes and spurious whitespace, like:
<Template>id=$user-unique,ou=people</Template>
-peter
More information about the users
mailing list