Input resources are components that define how to retrieve information necessary within other components. Some concrete examples are using the URL input resource to fetch the metadata loaded by a metadata provider or fetch CRLs used by X.509 credentials.
Input resources are always declared as the type of some element within the configuration of the component using the resource. In this example we will use the element <EXAMPLE>
as an example element that might be defined as a resource. Configuration elements which may be resources will be noted as such in the documentation for those components.
An input resource that reads information from a file located on the Java classpath.
The resource is declared using type attribute xsi:type="resource:ClasspathResource"
with the following additional attribute:
<EXAMPLE xsi:type="resource:ClasspathResource" file="/org/example/data/key.pem" /> |
An input resource that reads information from a file located on the filesystem.
The resource is declared using type attribute xsi:type="resource:FilesystemResource"
with the following additional attribute:
<EXAMPLE xsi:type="resource:FilesystemResource" file="/path/to/some/key.pem" /> |
An input resource that reads information from an HTTP(S) URL.
The resource is declared using type attribute xsi:type="resource:HttpResource"
with the following additional attribute:
<EXAMPLE xsi:type="resource:HttpResource" url="http://www.example.org/someFile.xml" /> |
An input resource that reads information from an HTTP(S) URL and also stores a backup on the filesystem. The backup copy is used if the remote copy cannot be reached (assuming an initial copy was successfully fetched).
The resource is declared using type attribute xsi:type="resource:FileBackedHttpResource"
with the following additional attribute:
<EXAMPLE xsi:type="resource:FileBackedHttpResource" url="http://www.example.org/someFile.xml" file="/path/to/backup/someFile.xml" /> |
An input resource that reads information from a Subversion repository.
For licensing reasons, this resoure type is not usable out of the box as of V2.4.1. To enable SVN support, you will need to download SVNKit yourself, add its jars to the install tree's lib folder, and reinstall. Make sure to use a version compatible with your working copy format, or remove the working copy and start fresh. Note that only 1.3 has been tested. |
The resource is declared using type attribute xsi:type="resource:SVNResource"
with the following required attributes:
workingCopyDirectory
, that should be loaded in to the IdPThe following optional attributes may also be set:
<EXAMPLE xsi:type="resource:SVNResource" repositoryURL="http://svn.example.org/myProject/some/path" workingCopyDirectory="/path/to/working/copy" resourceFile="project.xml" revision="513" /> |
After being fetched but prior to being made available to the IdP a resource may be run through a filter. These filters may perform any processing on the resource that they wish.
Resource filters are defined by the <ResourceFilter>
element. If defined, this element must be the first child element within a input resource's configuration. A resource may only have one filter.
A filter that allows a list of child filters to be executed in the order they are defined.
This filter is defined using <ResourceFilter xsi:type="Chaining" xmlns="urn:mace:shibboleth:2.0:resource">
and may contain any number of child <ResourceFilter
elements.
<ResourceFilter xsi:type="Chaining" xmlns="urn:mace:shibboleth:2.0:resource"> <ResourceFilter xsi:type="PropertyReplacement" xmlns="urn:mace:shibboleth:2.0:resource" propertyFile="/path/to/file1.properties"/> <ResourceFilter xsi:type="PropertyReplacement" xmlns="urn:mace:shibboleth:2.0:resource" propertyFile="/path/to/file2.properties"/> </ResourceFilter> |
A filter that replaces macros in a text input resources with values from a property file. Macros must be on the form ${NAME
}.
This filter is defined using <ResourceFilter xsi:type="PropertyReplacement" xmlns="urn:mace:shibboleth:2.0:resource">
and must have the following configuration attribute:
<ResourceFilter xsi:type="PropertyReplacement" xmlns="urn:mace:shibboleth:2.0:resource" propertyFile="/path/to/file1.properties"/> |