Custom Attribute definitation
Peter Schober
peter.schober at univie.ac.at
Fri Nov 24 08:59:11 EST 2017
* Santu Ghosh <mon.snahasish at gmail.com> [2017-11-24 13:35]:
> To do this I have done in :
>
> 1) attribute-resolver-full.xml
[...]
> 2) attribute-resolver-ldap.xml
None of these files are being used by the IDP by default, only
attribute-resolver.xml is. The files you changed are merely examples
(none of which you are following, so this is doubly useless).
> <AttributeDefinition xsi:type="Mapped" id="AREA">
> <DefaultValue>USA</DefaultValue>
> <ValueMap>
> <ReturnValue>USA</ReturnValue>
> <SourceValue>USA</SourceValue>
> </ValueMap>
What should mapping "USA" to "USA" accomplish?
> <AttributeDefinition xsi:type="Simple" id="AREA">
> <DefaultValue>USA</DefaultValue>
> <ValueMap>
> <ReturnValue>USA</ReturnValue>
> <SourceValue>USA</SourceValue>
> </ValueMap>
Obviously (?) a "Simple" attribute defintion is not a mapped attribute
defintion and therefore cannot have a ValueMap.
Nothing you're doing here makes any sense. If the existing
documentation doesn't help you can ask specific questions about parts
that are unclear.
> 3) ldap.properties
>
> idp.attribute.resolver.LDAP.returnAttributes = ou,uid,mail,surname,realm
The fact that you limit your default LDAP query to these attributes
does not influence anything you're doing above. So this is immaterial
unless you (later) want to generate something based on data from LDAP.
> 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>
Could you point out the documentattion that suggests this?
To answer the (not asked) question of how to produce an attribute with a
static string as its value:
* You define a "Static" data connector that has an Attribute as child
element, with an id of your choice, and a Value child element with
the static string value.
* You define a "Simple" attribute with a uniquie id and the
sourceAttributeID set to the id of the attribute you defined in the
Data COnnector. Also add a Dependency element to reference the data
connector.
To release the attribute you write a filter rule referencing the id of
the attribute you dedined, as always.
> but above setting ends with an error.
No doubt. But for the future you'll also need to be specific and
provide the error message. We do not have access to your system (nor
do we want to) and most of us here are not clairvoyant.
-peter
More information about the users
mailing list