Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The Mappped attribute definition performs a many to many mapping from source attributes values according a a series of value mapping statements.  If an input value matches no map, then a default may be provided.

Schema Name and Location

This element is defined by the urn:mace:shibboleth:2.0:resolver:ad schema, which can be located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver-ad.xsd.  

Attributes

Any of the common attributes can be specified.

Child Elements

Any of the common child elements can be specified.  In addition the following attributes can be provided

NameCardinalityDescription
<DefaultValue>0 or 1Describes the action to be taken if a value does not match any of the ValueMap attributes that follow. If the passThru attribute is set to "true" then the input value is passed through untouched, otherwise the contents of the Attribute are used.
<ValueMap>1 or moreSee below.

ValueMap

The ValueMap element can have two child elements

NameCardinalityDescription
<ReturnValue>1The contents are used as an attribute value if any of the source values match
<ScourceValue>1 or more

The contents are matched against each input value and if they match then the <ReturnValue> is provided

The partialMatch attribute (default false) allows partial matches to be performed (any string which contains the pattern is a match)
If partialMatch is false then the pattern is matched as a Java Regular Expression and all matches are replaced by the return value.

 The ignoreCase attribute (default false) allows case insensitive comparisons to be made. This is only valid for regular expression matching.

Example

<resolver:AttributeDefinition id="mapped" xsi:type="ad:Mapped" sourceAttributeID="uid">
    <resolver:Dependency ref="uid" />
    <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="https://example.org/example" friendlyName="Mapped" encodeType="false" />
    <ad:DefaultValue passThru="true"/>
	<ad:ValueMap>
		<ad:ReturnValue>return1</ad:ReturnValue>
		<ad:SourceValue >sou.+rc.+e1</ad:SourceValue>
		<ad:SourceValue partialMatch="true" ignoreCase="true">fred</ad:SourceValue>
	</ad:ValueMap>
	<ad:ValueMap>
		<ad:ReturnValue>return1</ad:ReturnValue>
		<ad:SourceValue>source2</ad:SourceValue>
	</ad:ValueMap>
</resolver:AttributeDefinition>
  • No labels