[java-identity-provider COMMIT] in /trunk: idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relying...

noreply at shibboleth.net noreply at shibboleth.net
Mon Oct 17 20:46:27 EDT 2016


Author: putmanb
Date: Mon Oct 17 20:46:27 2016
New Revision: 8501

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8501&view=rev
Log:
IDP-1065: HTTP metadata resolver XML config schema and parsers should support more HttpClient config options

Added:
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamicTimeouts.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-timeouts.xml   (with props)
Modified:
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java
    trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd

Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java?rev=8501&r1=8500&r2=8501&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java	(original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java	Mon Oct 17 20:46:27 2016
@@ -87,12 +87,16 @@
         if (element.hasAttributeNS(null, "httpClientRef")) {
             builder.addConstructorArgReference(StringSupport.trimOrNull(element.getAttributeNS(null, "httpClientRef")));
             if (element.hasAttributeNS(null, "requestTimeout")
+                    || element.hasAttributeNS(null, "connectionTimeout")
+                    || element.hasAttributeNS(null, "connectionRequestTimeout")
+                    || element.hasAttributeNS(null, "socketTimeout")
                     || element.hasAttributeNS(null, "disregardSslCertificate")
                     || element.hasAttributeNS(null, "disregardTLSCertificate")
                     || element.hasAttributeNS(null, "proxyHost") || element.hasAttributeNS(null, "proxyPort")
                     || element.hasAttributeNS(null, "proxyUser") || element.hasAttributeNS(null, "proxyPassword")) {
-                log.warn("httpClientRef overrides settings for requestTimeout, disregardSslCertificate, "
-                        + "disregardTLSCertificate, proxyHost, proxyPort, proxyUser and proxyPassword");
+                log.warn("httpClientRef overrides settings for requestTimeout, connectionTimeout, connectionRequestTimeout, " 
+                        + "socketTimeout disregardSslCertificate, disregardTLSCertificate, proxyHost, proxyPort, " 
+                        + "proxyUser and proxyPassword");
             }
         } else {
             builder.addConstructorArgValue(buildHttpClient(element, parserContext, haveTLSTrustEngine));
@@ -177,9 +181,22 @@
 
         clientBuilder.setLazyInit(true);
 
+        //Note: 'requestTimeout' is deprecated in favor of 'connectionTimeout'.
         if (element.hasAttributeNS(null, "requestTimeout")) {
             clientBuilder.addPropertyValue("connectionTimeout",
                     StringSupport.trimOrNull(element.getAttributeNS(null, "requestTimeout")));
+        }
+        if (element.hasAttributeNS(null, "connectionTimeout")) {
+            clientBuilder.addPropertyValue("connectionTimeout",
+                    StringSupport.trimOrNull(element.getAttributeNS(null, "connectionTimeout")));
+        }
+        if (element.hasAttributeNS(null, "connectionRequestTimeout")) {
+            clientBuilder.addPropertyValue("connectionRequestTimeout",
+                    StringSupport.trimOrNull(element.getAttributeNS(null, "connectionRequestTimeout")));
+        }
+        if (element.hasAttributeNS(null, "socketTimeout")) {
+            clientBuilder.addPropertyValue("socketTimeout",
+                    StringSupport.trimOrNull(element.getAttributeNS(null, "socketTimeout")));
         }
 
         if (haveTLSTrustEngine) {

Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java?rev=8501&r1=8500&r2=8501&view=diff

[... 160 lines stripped ...]


More information about the commits mailing list