Namespace: urn:mace:shibboleth:2.0:resolver


The Static data connector allows the generation of one or more fixed IdPAttribute objects from a statically-defined configuration.

It's particularly useful for defining "can't fail" backstops as a <FailoverDataConnector> for something more likely to break. While most connectors support various knobs to control error handling, it's quite difficult and sometimes impossible to absolutely guarantee that a weird problem doesn't ripple out and break the rest of the process, and this makes that essentially bulletproof.

It's also occasionally useful for passing statically-defined data to recalcitrant vendors operating badly broken SPs.









1 or more

Each element defines an IdPAttribute to generate. Note that this is not the same as a <saml:Attribute> element found in other areas of the configuration, but a custom element specific to the resolver.

Each element MUST contain an XML Attribute named id that specifies the name of the IdPAttribute to generate. It MUST also contain one or more nested <Value> elements. The text content of the <Value> elements provide the string values of the attribute being generated.

None of the common elements typical of DataConnectorConfiguration are supported, as this connector has neither dependencies nor failover (since it cannot fail).


Example of a Static DataConnector
1 2 3 4 5 6 7 8 9 <DataConnector id="staticAttributes" xsi:type="Static"> <Attribute id="eduPersonAffiliation"> <Value>member</Value> </Attribute> <Attribute id="eduPersonEntitlement"> <Value></Value> <Value>urn:mace:dir:entitlement:common-lib-terms</Value> </Attribute> </DataConnector>

Spring Configuration

The Static Data Connector can be configured in native Spring XML via the springResources or springResourcesRef attributes.

Example Spring configuration : conf/attribute-resolver.xml
1 2 <DataConnector id="staticAttributesSpring" xsi:type="Static" springResources="${idp.home}/conf/staticAttributesSpring.xml"/>

The Spring Resource must provide a bean of type Collection<IdPAttribute> populated via Collection<IdPAttributeValue>.

Example Spring configuration : conf/staticAttributesSpring.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="" xmlns:xsi="" xmlns:util="" xmlns:p="" xmlns:c="" xmlns:context="" xsi:schemaLocation="" default-init-method="initialize" default-destroy-method="destroy"> <util:list> <bean class="net.shibboleth.idp.attribute.IdPAttribute" c:_0="exampleAttributeId1"> <property name="values"> <list> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:_0="exampleAttributeValue1" /> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:_0="exampleAttributeValue2" /> </list> </property> </bean> <bean class="net.shibboleth.idp.attribute.IdPAttribute" c:_0="exampleAttributeId2"> <property name="values"> <list> <bean class="net.shibboleth.idp.attribute.StringAttributeValue" c:_0="exampleAttributeValue3" /> </list> </property> </bean> </util:list>   </beans>