shibboleth-dev - Re: [Shib-Dev] Mapped Attribute Definition
Subject: Shibboleth Developers
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: [Shib-Dev] Mapped Attribute Definition
- Date: Sat, 08 Jan 2011 13:15:52 -0500
- Organization: Itumi, LLC
Bradley, just wanted to confirm, the patch you submitted on Jan 6 is the working patch you mentioned?
On 12/28/10 2:40 PM, Bradley Schwoerer wrote:
The code below doesn't work as intended and I will include a working
patch to SC-132.
-Bradley
On 12/24/10 12:04 AM, Bradley Schwoerer wrote:
I submitted a bug about an NPE in MappedAttributeDefinition when the
dependency attribute is null
(https://bugs.internet2.edu/jira/browse/SC-132). I have a question
about desired functionality though.
In code it is setup to allow for multiple dependency attributes
mapping to one new attribute. That is straight forward. What is not
straight forward is the use of default value. If I have three
dependency attributes like this instead of a single multivalued
attribute:
StudentRole = Withdrawn
EmployeeRole = Staff
AffiliateRole =
And a rule setup like:
<DefaultValue>AFFILIATE</DefaultValue>
<ValueMap>
<ReturnValue>STUDENT</ReturnValue>
<SourceValue>enrolled</SourceValue>
<SourceValue>eligible</SourceValue>
</ValueMap>
<ValueMap>
<ReturnValue>EMPLOYEE</ReturnValue>
<SourceValue>Staff</SourceValue>
</ValueMap>
<ValueMap>
<ReturnValue>MEMBER</ReturnValue>
<SourceValue>enrolled</SourceValue>
<SourceValue>eligible</SourceValue>
<SourceValue>Staff</SourceValue>
</ValueMap>
The result would be EMPLOYEE, MEMBER, and AFFILIATE, because on the
third iteration of the for 'Object o' loop for the AffiliateRole
attribute it would add the value defined as a default value. Is that
the desired behavior? I would think that the default value rule would
be added only after all attributes and values return no mapped value.
In the above example the return would be EMPLOYEE and MEMBER instead.
The exception would be if the passThru="true", then it would add each
unmatched value so in code it would look like what is attached. I have
included both a before and after instead of a diff for readability of
logic.
-Bradley
--
Chad La Joie
http://itumi.biz
trusted identities, delivered
- Re: [Shib-Dev] Mapped Attribute Definition, Chad La Joie, 01/08/2011
- Re: [Shib-Dev] Mapped Attribute Definition, Bradley Schwoerer, 01/09/2011
- Re: [Shib-Dev] Mapped Attribute Definition, Chad La Joie, 01/09/2011
- Re: [Shib-Dev] Mapped Attribute Definition, Bradley Schwoerer, 01/09/2011
Archive powered by MHonArc 2.6.16.