Scoped attributes available to other definitions?

Kevin Foote kpfoote at uoregon.edu
Mon Jan 13 15:22:32 EST 2014


Just us a xsi:type=“Template” … simpler for you use case (I think)

Its just a quick script ish way of doing what you want. Just make the resolver dependent on your auth connector as a ref .. (below example uses ldap as the connector)

<Template>
 <![CDATA[
    ${cn}@hawaii.edu
 ]]>
</Template>

--------
thanks
 kevin.foote

On Jan 13, 2014, at 12:02 PM, Baron Fujimoto <baron at hawaii.edu> wrote:

> On Sat, Jan 11, 2014 at 06:48:50PM +0000, Cantor, Scott wrote:
>> On 1/10/14, 8:46 PM, "Baron Fujimoto" <baron at hawaii.edu> wrote:
>>> 
>>> Rather than the Script attribute route (since my javascript-fu is weak),
>>> I think I've accomplished my goal with a Mapped attribute kludge. AFAICT
>>> though, I can't directly encode the resulting attribute, so I do that in
>>> a seperate definition.
>> 
>> You shouldn't need a separate definition, not that I can think of.
> 
> Hmmm, I must have some pretty basic flaw in my definition then.
> 
> Given attribute-resolver.xml:
> ===
>    <!-- aacli_kludge_principal_to_email -->
>    <resolver:AttributeDefinition xsi:type="ad:Mapped"
>            id="aacli_kludge_principal_to_email"
>            sourceAttributeID="principal">
> 
>        <resolver:Dependency ref="principal" />
> 
>        <ad:ValueMap>
>            <ad:ReturnValue>$1 at hawaii.edu</ad:ReturnValue>
>            <ad:SourceValue>(.+)</ad:SourceValue>
>        </ad:ValueMap>
> 
>        <resolver:AttributeEncoder xsi:type="enc:SAML2String"
>                name="urn:oid:0.9.2342.19200300.100.1.3" friendlyName="kludge_mail" />
> 
>    </resolver:AttributeDefinition>
>    <!-- /aacli_kludge_principal_to_email -->
> ===
> 
> I get the following error:
> 
> ===
> Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shibboleth.AttributeResolver': Invocation of init method failed; nested exception is edu.internet2.middleware.shibboleth.common.service.ServiceException: Configuration was not loaded for shibboleth.AttributeResolver service, error creating components.
> [...]
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resolver:AttributeEncoder'. One of '{"urn:mace:shibboleth:2.0:resolver:ad":ValueMap}' is expected.
> [...]
> ===
> 
> -baron
> -- 
> Baron Fujimoto <baron at hawaii.edu> :: UH Information Technology Services
> minutas cantorum, minutas balorum, minutas carboratum desendus pantorum
> --
> To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net



More information about the users mailing list