[java-identity-provider] 04/06: IDP-1423 Remove deprecated attribute 'requestTimeout'

Rod Widdowson rdw at steadingsoftware.com
Sun Mar 3 09:59:37 EST 2019


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9307d475fc84837d6a735525ec14c551d8c853cb

commit 9307d475fc84837d6a735525ec14c551d8c853cb
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Mar 1 16:52:43 2019 +0000

    IDP-1423 Remove deprecated attribute 'requestTimeout'
    
    https://issues.shibboleth.net/jira/browse/IDP-1423
---
 .../AbstractDynamicHTTPMetadataProviderParser.java   |  8 +++-----
 .../metadata/impl/HTTPMetadataProviderParser.java    |  5 ++---
 .../impl/HTTPMetadataProvidersParserSupport.java     |  7 -------
 .../relyingparty/metadata/http-entities-client.xml   |  2 +-
 .../main/resources/schema/shibboleth-metadata.xsd    | 20 +-------------------
 5 files changed, 7 insertions(+), 35 deletions(-)

diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java
index 350e823..4bb507e 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/AbstractDynamicHTTPMetadataProviderParser.java
@@ -84,8 +84,7 @@ public abstract class AbstractDynamicHTTPMetadataProviderParser extends Abstract
 
         if (element.hasAttributeNS(null, "httpClientRef")) {
             builder.addConstructorArgReference(StringSupport.trimOrNull(element.getAttributeNS(null, "httpClientRef")));
-            if (element.hasAttributeNS(null, "requestTimeout")
-                    || element.hasAttributeNS(null, "connectionTimeout")
+            if (element.hasAttributeNS(null, "connectionTimeout")
                     || element.hasAttributeNS(null, "connectionRequestTimeout")
                     || element.hasAttributeNS(null, "socketTimeout")
                     || element.hasAttributeNS(null, "maxConnectionsTotal")
@@ -93,7 +92,7 @@ public abstract class AbstractDynamicHTTPMetadataProviderParser extends Abstract
                     || 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, connectionTimeout, "
+                log.warn("httpClientRef overrides settings for connectionTimeout, "
                     + "connectionRequestTimeout, socketTimeout, maxConnectionsTotal, maxConnectionsPerRoute, "
                     + "disregardTLSCertificate, proxyHost, proxyPort, "
                     + "proxyUser and proxyPassword");
@@ -140,8 +139,7 @@ public abstract class AbstractDynamicHTTPMetadataProviderParser extends Abstract
                         httpClientSecurityParametersRef, httpClientSecurityParameters);
 
         // Set up non standard defaults
-        // Note: 'requestTimeout' is deprecated in favor of 'connectionTimeout'.
-        if (!element.hasAttributeNS(null, "requestTimeout") && !element.hasAttributeNS(null, "connectionTimeout")) {
+        if (!element.hasAttributeNS(null, "connectionTimeout")) {
             clientBuilder.addPropertyValue("connectionTimeout", DEFAULT_CONNECTION_TIMEOUT);
         }
 
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java
index 111feed..cf7d597 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProviderParser.java
@@ -69,14 +69,13 @@ public abstract class HTTPMetadataProviderParser extends AbstractReloadingMetada
 
         if (element.hasAttributeNS(null, "httpClientRef")) {
             builder.addConstructorArgReference(StringSupport.trimOrNull(element.getAttributeNS(null, "httpClientRef")));
-            if (element.hasAttributeNS(null, "requestTimeout")
-                    || element.hasAttributeNS(null, "connectionTimeout")
+            if (element.hasAttributeNS(null, "connectionTimeout")
                     || element.hasAttributeNS(null, "connectionRequestTimeout")
                     || element.hasAttributeNS(null, "socketTimeout")
                     || 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, connectionTimeout, " 
+                log.warn("httpClientRef overrides settings for connectionTimeout, " 
                     + "connectionRequestTimeout, socketTimeout, disregardTLSCertificate, "
                     + " proxyHost, proxyPort, proxyUser and proxyPassword");
             }
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProvidersParserSupport.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProvidersParserSupport.java
index ae46971..87f91cb 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProvidersParserSupport.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/HTTPMetadataProvidersParserSupport.java
@@ -261,13 +261,6 @@ public final class HTTPMetadataProvidersParserSupport {
 
         clientBuilder.setLazyInit(true);
 
-        //Note: 'requestTimeout' is deprecated in favor of 'connectionTimeout'.
-        if (element.hasAttributeNS(null, "requestTimeout")) {
-            DeprecationSupport.warn(ObjectType.ATTRIBUTE, "requestTimeout",
-                    parserContext.getReaderContext().getResource().getDescription(), "connectionTimeout");
-            clientBuilder.addPropertyValue("connectionTimeout",
-                    StringSupport.trimOrNull(element.getAttributeNS(null, "requestTimeout")));
-        }
         if (element.hasAttributeNS(null, "connectionTimeout")) {
             clientBuilder.addPropertyValue("connectionTimeout",
                     StringSupport.trimOrNull(element.getAttributeNS(null, "connectionTimeout")));
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/http-entities-client.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/http-entities-client.xml
index 45a9913..afea733 100644
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/http-entities-client.xml
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/http-entities-client.xml
@@ -4,7 +4,7 @@
 	xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd
                        urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd"
 
-    parserPoolRef="myParserPool"  requestTimeout="PT40M" basicAuthPassword="pass" basicAuthUser="user" disregardTLSCertificate="true" 
+    parserPoolRef="myParserPool"  connectionTimeout="PT40M" basicAuthPassword="pass" basicAuthUser="user" disregardTLSCertificate="true" 
     	id="HTTPEntities" xsi:type="metadata:FileBackedHTTPMetadataProvider"
         backingFile="%{DIR}/spoolhttpentitiesClient.xml"
     	httpClientRef="apacheClient"
diff --git a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
index 73a00fa..b33eece 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
@@ -172,15 +172,6 @@
                         <documentation>Server certificate will be ignored when using an HTTPS source.</documentation>
                     </annotation>
                 </attribute>
-                <attribute name="requestTimeout" type="string">
-                    <annotation>
-                        <documentation>
-                            DEPRECATED: Use connectionTimeout.
-                            The maximum length of time to wait for the remote server to response.
-                            Timeout is expressed in ISO8601 duration notation.
-                        </documentation>
-                    </annotation>
-                </attribute>
                 <attribute name="connectionTimeout" type="string">
                     <annotation>
                         <documentation>
@@ -476,7 +467,7 @@
                             org.apache.http.client.HttpClient object.
                             
                             This attribute conflicts with and overrides the other HttpClient-related properties: 
-                            disregardTLSCertificate, requestTimeout, proxyHost, proxyPort, proxyUser, proxyPassword.
+                            disregardTLSCertificate, proxyHost, proxyPort, proxyUser, proxyPassword.
                        </documentation>
                     </annotation>
                 </attribute>
@@ -501,15 +492,6 @@
                         <documentation>Server certificate will be ignored when using an HTTPS source.</documentation>
                     </annotation>
                 </attribute>
-                <attribute name="requestTimeout" type="string">
-                    <annotation>
-                        <documentation>
-                            DEPRECATED: Use connectionTimeout.
-                            The maximum length of time to wait for the remote server to response.
-                            Timeout is expressed in ISO8601 duration notation.
-                        </documentation>
-                    </annotation>
-                </attribute>
                 <attribute name="connectionTimeout" type="string">
                     <annotation>
                         <documentation>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list