template attribute definition possible bug?

Athanasios Douitsis aduitsis at gmail.com
Mon Nov 2 17:45:53 EST 2015


Hello and thanks for the reply,

Unfortunately it doesn't work no matter what. I tried what you suggested.

This has all the makings of a bug, seeing that the value of attr1 gets
placed in both $attr1 and $attr2. So I always get 2 different values for
the final templated attribute, first val1:val1 and then val2:val2. If I
have 3 attributes in my template, I get 3 different values. The number of
dependencies or source attributes does not play a role, only what
attributes are mentioned in the template expression. Go figure. If I put in
6 dependencies and 6 source attributes but I only say $attr1:$attr2:$attr3,
I will get 3 values, val1:val1:val1, val2:val2:val3 and val3:val3:val3. I
don't suppose the ':' has any special meaning in templates.

I cannot imagine a normal way for this to be happening. All the source
attribute names and all the ids are different from one another.

Cheers,
Athanasios


On Mon, Nov 2, 2015 at 10:48 PM, Krug, Jeff <Jeff.Krug at gtri.gatech.edu>
wrote:

> I have something extremely similar to what you have in IDP3 and it works
> fine for me (references 2 other Attribute Definitions and them combines
> them based on a template).  I would suggest not having your attribute
> definition use the same name as the LDAP attribute...  Whether that is the
> root of the problem or not, it's only going to confuse you and be a
> potential source of errors...  So change the attr1 definition to something
> like this:
>
>
>        <resolver:AttributeDefinition xsi:type="Mapped"
> xmlns="urn:mace:shibboleth:2.0:resolver:ad"
>                               id="myAttr1" sourceAttributeID="attr1"
> dependencyOnly="true">​
>
>
> then have the dependency and the source in the testing attribute reference
> myAttr1.
>
>
> You would have to make a similar uniqueness change to attr2.
>
>
>
> ------------------------------
> *From:* users <users-bounces at shibboleth.net> on behalf of Athanasios
> Douitsis <aduitsis at gmail.com>
> *Sent:* Monday, November 2, 2015 3:39 PM
> *To:* Shib Users
> *Subject:* Re: template attribute definition possible bug?
>
>
> On Mon, Nov 2, 2015 at 10:34 PM, Cantor, Scott <cantor.2 at osu.edu> wrote:
>
>> It's entirely possible.
>
>
> Always glad to hear that, but at this point the solution eludes me :)
>
> Assuming a number of mapped attributes like this:
>
>        <resolver:AttributeDefinition xsi:type="Mapped"
> xmlns="urn:mace:shibboleth:2.0:resolver:ad"
>                               id="attr1" sourceAttributeID="attr1"
> dependencyOnly="true">
>         <resolver:Dependency ref="myLDAP" />
>                 <DefaultValue>undefined</DefaultValue>
>                 <ValueMap>
>                     <ReturnValue>$1</ReturnValue>
>                     <SourceValue>(.+)</SourceValue>
>                 </ValueMap>
>         </resolver:AttributeDefinition>
>
> Would kindly suggest what would I need to change in the template of my
> original mail ?
>
> <resolver:AttributeDefinition xsi:type="Template"
> xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="testing">
>                 <resolver:Dependency ref="attr1" />
>                 <resolver:Dependency ref="attr2" />
>                 <Template>
>                   <![CDATA[
> ${attr1}:${attr2}
>                   ]]>
>                 </Template>
>                 <SourceAttribute>attr1</SourceAttribute>
>                 <SourceAttribute>attr2</SourceAttribute>
> </resolver:AttributeDefinition>
>
> Cheers and thanks,
> --
> Athanasios Douitsis
>
>
>
> --
> To unsubscribe from this list send an email to
> users-unsubscribe at shibboleth.net
>



-- 
Athanasios Douitsis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20151103/b2286eb5/attachment.html>


More information about the users mailing list