collapse case of released attribute values?
Peter Schober
peter.schober at univie.ac.at
Wed Jan 3 06:14:37 EST 2018
* IAM David Bantz <dabantz at alaska.edu> [2018-01-02 23:45]:
> Is there a simple way to collapse the case of released attribute values?
A Template-type AttributeDefintion can do that:
https://wiki.shibboleth.net/confluence/display/IDP30/TemplateAttributeDefinition
E.g. a Template value of {affiliation.toLowerCase()} would return the
string value of the "affiliation" attribute (specified as
SourceAttribute and provided by the referenced Dependency) but
*lower-cased* as desired. That should also work for multi-valued
attributes without additional looping within Velocity.
There are many ways to structure your resolver to make use of
that. E.g. if you currently have a single AttributeDefinition of type
Simple that depends on the two LDAP DataConnectors you pull data from
you could use that AttributeDefinition as input source for another
Template-type AttributeDefinition (and move the Encoder elements and
the defintion's "id" XML-attribute there, too).
Either way any string processing should be done on the unscoped values
(i.e., this won't work on scoped ones), so that now slapping on the
scope is a simple matter of referencing the AttributeDefintion in
a(nother) Scoped one.
> I'm shopping for a simple fix analogous to the SP attribute
> decoder's "caseSensitive" option in either the encoder or release
> policy.
The IDP's filter already has the equivalent (release an attribute by
comparing its value to a string case-insensitively), but that's not
what you're talking about and setting something to "case-insensitive"
anywhere will not change the actual attribute value(s), neither on the
SP nor on the IDP side.
-peter
More information about the users
mailing list