Custom Attribute definitation

Santu Ghosh mon.snahasish at gmail.com
Fri Nov 24 07:35:20 EST 2017


Hi All

Can anyone please help how to define a custom attribute in IDP side which
will return to SP after successfull loging.

For example, I want to define a custom attribute "AREA" and it will always
return value "USA" to SP.


To do this I have done in :

1) attribute-resolver-full.xml

<AttributeDefinition xsi:type="Mapped" id="AREA">
        <DefaultValue>USA</DefaultValue>
         <ValueMap>
                <ReturnValue>USA</ReturnValue>
                 <SourceValue>USA</SourceValue>
        </ValueMap>
<!--         <Dependency ref="abc" />  -->
        <AttributeEncoder xsi:type="SAML2String"
name="urn:unsolicited:area" friendlyName="AREA" encodeType="false" />
    </AttributeDefinition>



2) attribute-resolver-ldap.xml

 <AttributeDefinition xsi:type="Simple" id="AREA">
        <DefaultValue>USA</DefaultValue>
         <ValueMap>
                <ReturnValue>USA</ReturnValue>
                 <SourceValue>USA</SourceValue>
        </ValueMap>
        <Dependency ref="abc" />
<!--        <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:uid" encodeType="false" /> -->
        <AttributeEncoder xsi:type="SAML2String"
name="urn:unsolicited:AREA" friendlyName="AREA" encodeType="false" />
    </AttributeDefinition>


3) ldap.properties

idp.attribute.resolver.LDAP.returnAttributes    = ou,uid,mail,surname,realm

4) global.xml


<bean id="abc" class="java.lang.String">
  <constructor-arg value="USA"/>
</bean>

<bean id="AREA" class="java.lang.String">
  <constructor-arg value="USA"/>
</bean>

but above setting ends with an error.

Please help.

-- 
Snahasish Ghosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20171124/40c3b670/attachment.html>


More information about the users mailing list