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

The ResourceBackedMetadataProvider loads metadata from a resource - a complex source that cannot be located from a file or an HTTP URL. The provider can be configured to periodically check and reload the metadata if needed.

Two resource types are supported, one allows collecting metadata from SVN source control system, the other from the java classpath.

Contents

Schema Names and location

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

The xsi:type of the <MetadataResource> is defined by the  urn:mace:shibboleth:2.0:resource schema which can be located at http://shibboleth.net/schema/idp/shibboleth-resource.xsd

Attributes

Any of the Common Attributes or the Reloading Attributes may be configured.

Common Attributes

The following attributes are required on all metadata provider types:
NameTypeDefaultDescription
idStringrequiredIdentifier for logging, identification for command line reload, etc.
xsi:typeStringrequiredSpecifies the exact type of provider to use (from those listed above, or a custom extension type).

The following attributes are common to all metadata provider types except the ChainingMetadataProvider type:

NameTypeDefaultDescription

requireValidMetadata

Booleantrue

Whether candidate metadata found by the resolver must be valid in order to be returned (where validity is implementation specific, but in SAML cases generally depends on a validUntil attribute.) If this flag is true, then invalid candidate metadata will not be returned.

failFastInitialization          

BooleantrueWhether to fail initialization of the underlying MetadataResolverService (and possibly the IdP as a whole) if the initialization of a metadata provider fails. When false, the IdP may start, and will continue to attempt to reload valid metadata if configured to do so, but operations that require valid metadata will fail until it does.
sortKeyInteger
Defines the order in which metadata providers are searched (see below), can only be specified on top level <MetadataProvider> elements.
The following are advanced settings supporting a new low-level feature allowing metadata lookup by keys other than the unique entityID and are rarely of use to a deployer.
criterionPredicateRegistryRef 3.3Bean ID
Identifies the a custom CriterionPredicateRegistry bean used in resolving predicates from non-predicate input criteria.
useDefaultPredicateRegistry 3.3BooleantrueFlag which determines whether the default CriterionPredicateRegistry will be used if a custom one is not supplied explicitly.
satisfyAnyPredicates 3.3BooleanfalseFlag which determines whether predicates used in filtering are connected by a logical 'OR' (true) or by logical 'AND' (false).

Reloading Attributes

The following attributes are common to all reloading "batch-oriented" metadata providers (i.e., FileBackedHTTPMetadataProviderFilesystemMetadataProvider, and ResourceBackedMetadataProvider):
NameTypeDefaultDescription
parserPoolRef                 Bean IDshibboleth.ParserPoolIdentifies a Spring bean for the XML parser used to parse metadata. Generally should not be changed.
taskTimerRefBean ID
Identifies a Spring bean containing a Java TaskTimer used to schedule reloads. When not set, an internal timer is created. Generally should not be changed.
minRefreshDelayDurationPT30SLower bound on the next refresh from the time calculated based on the metadata's expiration.
maxRefreshDelayDurationPT4HUpper bound on the next refresh from the time calculated based on the metadata's expiration.
refreshDelayFactorReal Number (strictly between 0.0 and 1.0)0.75A factor applied to the initially determined refresh time in order to determine the next refresh time (typically to ensure refresh takes place prior to the metadata's expiration). Attempts to refresh metadata will generally begin around the product of this number and the maximum refresh delay.
indexesRef 3.3Bean ID

Identifies an optional Set<MetadataIndex> used to support resolution of metadata based on criteria other than an entityID.

resolveViaPredicatesOnly 3.3Booleanfalse

Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection, when an entityID input criterion is not supplied.

expirationWarningThreshold 3.4DurationPT0S (disabled)For each attempted metadata refresh (whether or not fresh metadata is obtained), if requireValidMetadata is true, and there is a validUntil XML attribute on the document root element, and the difference between validUntil and the current time is less than expirationWarningThreshold, the system logs a warning about the impending expiration.

Child Elements

Any of the following child elements may be specified (in order).

NameCardinalityDescription
<MetadataFilter>0 or moreA metadata filter applied to candidate metadata as it flows through the metadata pipeline
<MetadataResource>Exactly 1Specifies the metadata resource type

The <MetadataFilter> child element is common to all metadata providers. The <MetadataResource> child element is exclusive to the ResourceBackedMetadataProvider type.

Exactly one <MetadataResource> child element is required. If none is configured, an error will occur.

Two metadata resource types are supported. The SVNResource type collects metadata from an SVN source control system while the ClasspathResource type sources metadata from the java classpath.

Examples

The following example loads metadata from SVN:

Load Metadata SVN
<MetadataProvider id="SVNResourceMetadata" xsi:type="ResourceBackedMetadataProvider">
   <MetadataResource xmlns:resource="urn:mace:shibboleth:2.0:resource" xsi:type="resource:SVNResource"
        resourceFile="entity.xml" 
        repositoryURL="https://svn.example.org/repo/path"
        workingCopyDirectory="%{idp.home}/metadata/svn" />
<MetadataProvider>

The following example loads metadata from the Java Classpath:

Load Metadata from the classpath
<MetadataProvider id="ClasspathResourceMetadata" xsi:type="ResourceBackedMetadataProvider">
   <MetadataResource xmlns:resource="urn:mace:shibboleth:2.0:resource" xsi:type="resource:ClasspathResource"
        file="/path/to/a/classpath/location/metadata.xml" />
<MetadataProvider>
  • No labels