The Shibboleth IdP V3 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP4 wiki space for current documentation on the supported version.

ChainingMetadataProvider

The ChainingMetadataProvider is a container for an ordered sequence of metadata providers of any type. When searching for a particular entityID, the metadata resolver consults each child provider in the order in which it is listed. See the parent topic for a detailed description of the search ordering algorithm used by the metadata resolver.

Schema Names and location

The <MetadataProvider> element and the type ChainingMetadataProvider are defined by the urn:mace:shibboleth:2.0:metadata schema, which can be located at http://shibboleth.net/schema/idp/shibboleth-metadata.xsd.

Attributes

The following attributes are required on a metadata provider of type ChainingMetadataProvider:

NameTypeDefaultDescription
idStringrequiredIdentifier for logging, identification for command line reload, etc.
xsi:typeStringrequiredMust be set to "ChainingMetadataProvider"

No other attributes are allowed.

Child Elements

A provider of type ChainingMetadataProvider may contain any number of child providers:

NameCardinalityDescription
<MetadataProvider>0 or moreAn ordered sequence of metadata providers of any type (except the ChainingMetadataProvider type)

No other child elements are allowed.

Examples

Here is a brief summary of the examples in this section:

  • Example 1: A traditional configuration using FilesystemMetadataProvider for local metadata and FileBackedHTTPMetadataProvider for federation metadata
  • Example 2: A "no touch" configuration using LocalDynamicMetadataProvider for local metadata and FileBackedHTTPMetadataProvider for federation metadata
  • Example 3: A completely dynamic configuration using LocalDynamicMetadataProvider for local metadata and DynamicHTTPMetadataProvider for federation metadata

The following example illustrates one or more providers of type FilesystemMetadataProvider followed by a single FileBackedHTTPMetadataProvider:

Example 1: A traditional configuration
<MetadataProvider id="chain" xsi:type="ChainingMetadataProvider">
	<!-- 
		One or more providers of type FilesystemMetadataProvider for local metadata.
		Each metadata provider describes a static entity descriptor stored in a file.
	-->
	<MetadataProvider id="LocalMetadata" xsi:type="FilesystemMetadataProvider" ...>
      <!-- ... -->
	</MetadataProvider>
	
	<!-- 
		Exactly one provider of type FileBackedHTTPMetadataProvider for federation metadata.
		The metadata provider automatically refreshes a metadata aggregate (EntitiesDescriptor)
		which would otherwise expire.
	-->
	<MetadataProvider id="FederationMetadata" xsi:type="FileBackedHTTPMetadataProvider" ...>
      <!-- ... -->
	</MetadataProvider>
</MetadataProvider>                                   

In the above example, local metadata is loaded before externally resolved federation metadata. This prevents federation metadata from accidentally overriding local metadata sources.

The following example is similar to the previous example except that multiple providers of type FilesystemMetadataProvider have been replaced with a single LocalDynamicMetadataProvider:

Example 2: A "no touch" configuration
<MetadataProvider id="chain" xsi:type="ChainingMetadataProvider">
	<!-- 
		Exactly one provider of type LocalDynamicMetadataProvider for local metadata.
		The metadata provider configures a source directory containing one or more
		static entity descriptors.
	-->
	<MetadataProvider id="LocalMetadata" xsi:type="LocalDynamicMetadataProvider" ...>
      <!-- ... -->
	</MetadataProvider>

	<!-- 
		Exactly one provider of type FileBackedHTTPMetadataProvider for federation metadata.
		The metadata provider automatically refreshes a metadata aggregate (EntitiesDescriptor)
		which would otherwise expire.
	-->
 <MetadataProvider id="FederationMetadata" xsi:type="FileBackedHTTPMetadataProvider" ...>

      <!-- ... -->
	</MetadataProvider>
</MetadataProvider>                                   

In the above example, all local metadata is handled by a single LocalDynamicMetadataProvider. In this way, new local metadata may be added to the system without touching the configuration.

The following example is similar to the previous example except that the provider of type FileBackedHTTPMetadataProvider has been replaced with a DynamicHTTPMetadataProvider:

Example 3: A completely dynamic configuration
<MetadataProvider id="chain" xsi:type="ChainingMetadataProvider">
	<!-- 
		Exactly one provider of type LocalDynamicMetadataProvider for local metadata.
		The metadata provider configures a source directory containing one or more
		static entity descriptors.
	-->
	<MetadataProvider id="LocalMetadata" xsi:type="LocalDynamicMetadataProvider" ...>
      <!-- ... -->
	</MetadataProvider>
	
	<!-- 
		Exactly one provider of type DynamicHTTPMetadataProvider for federation metadata.
		Individual entity descriptors are fetched dynamically as needed from a metadata
		query server.
	-->
	<MetadataProvider id="FederationMetadata" xsi:type="DynamicHTTPMetadataProvider" ...>
      <!-- ... -->
	</MetadataProvider>
</MetadataProvider>                                   

In the above example, federation metadata is sourced as needed (i.e., dynamically). This avoids having to load a large metadata aggregate.

Avoid redundant providers in the chain

Resolve federation metadata with either a FileBackedHTTPMetadataProvider (Example #2) or a DynamicHTTPMetadataProvider (Example #3) but not both. Assuming the same set of entities are represented in each case, the two approaches are mutually exclusive.