[java-identity-provider COMMIT] /trunk/idp-conf/src/main/resources/conf/services.xml
noreply at shibboleth.net
noreply at shibboleth.net
Fri Dec 19 08:49:57 EST 2014
Author: rdw
Date: Fri Dec 19 08:49:56 2014
New Revision: 7171
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7171&view=rev
Log:
IDP-544 Add HTTPFileResource examples
Modified:
trunk/idp-conf/src/main/resources/conf/services.xml
Modified: trunk/idp-conf/src/main/resources/conf/services.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/services.xml?rev=7171&r1=7170&r2=7171&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/services.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/services.xml Fri Dec 19 08:49:56 2014
@@ -51,6 +51,46 @@
http://svnkit.com/javadoc/org/tmatesoft/svn/core/auth/BasicAuthenticationManager.html#constructor_detail
http://svnkit.com/javadoc/org/tmatesoft/svn/core/SVNURL.html
+ -->
+
+ <!-- Advanced configuration of services from HTTP.
+
+ To use an HTTP resource you first need to configure the Apache HttpClient which will be used
+ to communicate with the web server. Any HttpClient can be used, but two Factory Beans allow simple
+ configuration of in-memory or file-based caching clients.
+
+ Examples are:
+
+ A resource which will be supplied from an in-memory cache for as long as the file on the webserver does not change.
+ If the webserver becomes unavailable the resource will be unavailable.
+
+ <bean id="inMemoryClient"
+ class="net.shibboleth.idp.profile.spring.relyingparty.metadata.InMemoryCachingHttpClientFactoryBean"
+ p:maxCacheEntries="1"
+ p:connectionTimeout="PT3M" />
+
+ <bean id="inMemoryResource" class="net.shibboleth.ext.spring.resource.HTTPResource"
+ c:client-ref="inMemoryClient"
+ c:url="http://example.org/path/to/file.xml" />
+
+ Two resources which will be supplied from an on disk cache (suitable for multiple or large files) for as long
+ as the file on the webserver does not change. If the webserver becomes unavailable the last used contents
+ of the file will be returned (even if that was in a previous IdP lifetime).
+
+ <bean id="fileClient"
+ class="net.shibboleth.idp.profile.spring.relyingparty.metadata.FileCachingHttpClientFactoryBean"
+ p:maxCacheEntries="3000"
+ p:cacheDirectory="/var/shibboleth/caches/httpcache"/>
+
+ <bean id="fileResource" class="net.shibboleth.ext.spring.resource.FileBackedHTTPResource"
+ c:client-ref="fileClient"
+ c:url="http://example.org/path/to/file.xml"
+ c:resource="/var/shibboleth/caches/resourcecache/file.xml"/>
+
+ <bean id="otherFileResource" class="net.shibboleth.ext.spring.resource.FileBackedHTTPResource"
+ c:client-ref="fileClient"
+ c:url="http://another.server.example.org/path/to/different/file.xml"
+ c:resource="/var/shibboleth/caches/resourcecache/differentFile.xml"/>
-->
<!--
More information about the commits
mailing list