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

The ResourceBackedMetadataProvider loads metadata from a resource - a complex source which cannot be located from a file or an HTTP URL.

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

The provider can be configured to periodically check and reload the metadata if needed.  This is achieved with the  reloading attributes.

Examples

Load Metadata SVN
<MetadataProvider id="FileMetadata" 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>
Load Metadata from the classpath
<MetadataProvider id="FileMetadata" 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>

Schema Names and location

The <MetadataProvider> element and the defining type (FilesystemMetadataProvider) 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 can be specified. 

NameTypeDescription
resourceRef 3.4
string

The id of an externally defined bean which implements org.springframework.core.io.Resource.

See below for more details

Notes on resourceRef 3.4

You can use any kind of Resource supported by Spring, along with the custom resource type provided with the IdP for handling Subversion.

You should not use a Resource for which there already is native metadata provider support (for instance file:, http: or https:).  In practice this limits usefulness to classpath, subversion and locally written extension.

Example - classpath
<MetadataProvider 
	id="resourceRefEntity" 
    xsi:type="ResourceBackedMetadataProvider" 
    resourceRef="metadata.classpathRef"/>


<bean id="metadata.classpathRef" 
      class="org.springframework.core.io.ClassPathResource" 
      c:_0="/class/path/to/resource/entity.xml"/>



Child Elements

Any of the common child elements can be specified. After this exactly one <MetadataResource> element can be specified.  The xsi:type defines what sort of resource is to be defined. Two resource types are supported, one allows collecting metadata from SVN source control system, the other from the java classpath, 

  • No labels