NativeSP 2.5.5 Attribute Transforming

Michael A Grady mgrady at unicon.net
Mon Oct 26 13:32:55 EDT 2015


> On Oct 26, 2015, at 12:03 PM, Cantor, Scott <cantor.2 at OSU.EDU> wrote:
> 
> On 10/26/15, 12:41 PM, "users on behalf of O'Dowd, Josh" <users-bounces at shibboleth.net on behalf of Josh.O'Dowd at mso.umt.edu> wrote:
> 
> 
> 
>> The log shows no ERROR entries of any kind, and the following DEBUG entry:
>> 2015-10-26 08:58:59 DEBUG Shibboleth.AttributeResolver.Transform [3]: applying transform from source attribute (uid) to dest attribute (uidnoe)
> 
> Yes, plus the session output, so there's no question the regex is just not matching, or possibly just isn't being loaded into the configuration. Could be that something subtle is going on with the XML in the configuration, but since it's seeing your dest value, I can't think what.
> 
>> ... and I have already shown the session output indicates there is 0 values for our uidnoe attribute and 1 value for uid.  So I agree that would lead to the regex match string.  I am just not understanding how simple match string tests like '^(.+)' are failing to capture any value.  That being said I am not sure where to look for a bug on our system.
> 
> Nowhere to look. At some point in the far distant time horizon when I'm working on the SP again I can re-verify that the code is working if you file a bug, but there's nothing else I can really do.
> 

I have an SP I configured for a demo site for the Internet2 Scalable Privacy project using 'exact match regex'  ;-) with Transform that works:

        <!-- Create an attribute if we get the editing allowed value of isMemberOf, for use in next Resolver -->
        <AttributeResolver type="Transform" source="isMemberOf">
	   <Regex match="^SomeContentEditingAllowed$" dest="editGroup" caseSensitive="false">yes</Regex>
        </AttributeResolver>

        <!-- Create an attribute if we get the "weather spotter" value of yourtownTokens, for use in next Resolver -->
        <AttributeResolver type="Transform" source="yourtownTokens">
	   <Regex match="^approved weather spotter$" dest="spotterToken" caseSensitive="false">yes</Regex>
        </AttributeResolver>

I don't remember if I tried wildcarding; but the above look like if I did, I had also had trouble figuring out how to specify any pattern that would actually match. Try being sure to have the explicit '$' at the end.

--
Michael A. Grady
IAM Architect, Unicon, Inc.



More information about the users mailing list