[java-identity-provider] branch master updated: Restore some unsupported LDAP DC settings and add deprecations.

Scott Cantor cantor.2 at osu.edu
Tue Jan 28 11:13:57 EST 2020


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

scantor 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=e788a9e68a9323c3ff519cfbc603af0e468cd7f4

The following commit(s) were added to refs/heads/master by this push:
       new  e788a9e   Restore some unsupported LDAP DC settings and add deprecations.
e788a9e is described below

commit e788a9e68a9323c3ff519cfbc603af0e468cd7f4
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 28 11:13:03 2020 -0500

    Restore some unsupported LDAP DC settings and add deprecations.
---
 .../dc/ldap/impl/LDAPDataConnectorParser.java      | 25 ++++++++++++++++++++--
 .../schema/shibboleth-attribute-resolver.xsd       | 19 ++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
index ce483ff..5878988 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/ldap/impl/LDAPDataConnectorParser.java
@@ -120,8 +120,15 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
      */
     @Override protected void doV2Parse(@Nonnull final Element config, @Nonnull final ParserContext parserContext,
             @Nonnull final BeanDefinitionBuilder builder) {
-        log.debug("{} Parsing v2 configuration {}", getLogPrefix(), config);
+        log.debug("{} Parsing XML configuration {}", getLogPrefix(), config);
 
+        final List<Element> oldProperties = ElementSupport.getChildElementsByTagNameNS(config,
+                AttributeResolverNamespaceHandler.NAMESPACE, "LDAPProperty");
+        if (oldProperties != null && !oldProperties.isEmpty()) {
+            // V4 Deprecation
+            DeprecationSupport.warn(ObjectType.ELEMENT, "LDAPProperty", "LDAP Connector", "(none), will be ignored");
+        }
+        
         final V2Parser v2Parser = new V2Parser(config, getLogPrefix());
 
         final BeanDefinitionBuilder connectionFactory =
@@ -290,6 +297,13 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
                     connectionConfig.addPropertyValue("connectionStrategy", new RandomConnectionStrategy());
                     break;
 
+                case "DEFAULT":
+                    // V4 Deprecation
+                    DeprecationSupport.warn(ObjectType.CONFIGURATION, "connectionStrategy=DEFAULT", "LDAP Connector",
+                            "ACTIVE_PASSIVE");
+                    connectionConfig.addPropertyValue("connectionStrategy", new ActivePassiveConnectionStrategy());
+                    break;
+                    
                 default:
                     connectionConfig.addPropertyValue("connectionStrategy", new ActivePassiveConnectionStrategy());
                     break;
@@ -540,6 +554,13 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
             if (null == poolConfigElement) {
                 return null;
             }
+            
+            if (poolConfigElement.hasAttributeNS(null, "blockWhenEmpty")) {
+                // V4 Deprecation
+                DeprecationSupport.warn(ObjectType.ATTRIBUTE, "blockWhenEmpty", "<ConnectionPool>",
+                        "(none), will be ignored");
+            }
+            
             final String blockWaitTime =
                     AttributeSupport.getAttributeValue(poolConfigElement, new QName("blockWaitTime"));
             final String expirationTime =
@@ -573,7 +594,7 @@ public class LDAPDataConnectorParser extends AbstractDataConnectorParser {
             final String failFastInitialize =
                     AttributeSupport.getAttributeValue(poolConfigElement, new QName("failFastInitialize"));
             if (failFastInitialize != null) {
-                // V4 Deprecations
+                // V4 Deprecation
                 DeprecationSupport.warnOnce(ObjectType.ATTRIBUTE, "failfastInitialize (on a ConnectionPool element)", 
                         null, "failfastInitialize (on a DataConnector)");
                 pool.addPropertyValue("failFastInitialize", failFastInitialize);
diff --git a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
index d9b079c..bfcee8a 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
@@ -782,6 +782,13 @@
                             </documentation>
                         </annotation>
                     </element>
+                    <element name="LDAPProperty" type="resolver:PropertyType"> <!-- Deprecated - Remove in V5. -->
+                        <annotation>
+                            <documentation>
+                                DEPRECATED: LDAP connection properties relevant to the underlying provider being used.
+                            </documentation>
+                        </annotation>
+                    </element>
                     <element name="StartTLSTrustCredential" type="sec:X509Credential">
                         <annotation>
                             <documentation>
@@ -1588,6 +1595,7 @@
             <documentation>Supported connection strategies.</documentation>
         </annotation>
         <restriction base="string">
+            <enumeration value="DEFAULT"/> <!-- Deprecated, remove in V5. -->
             <enumeration value="ACTIVE_PASSIVE"/>
             <enumeration value="ROUND_ROBIN"/>
             <enumeration value="RANDOM"/>
@@ -1652,6 +1660,17 @@
                 </documentation>
             </annotation>
         </attribute>
+        <attribute name="blockWhenEmpty" type="resolver:string"> <!-- Deprecated - Remove in V5 -->
+            <annotation>
+                <documentation>
+                    DEPRECATED
+                    Whether the pool should block when maxPoolSize objects are in use.
+                    If false, pool will grow beyond the maxPoolSize value.
+                    Note that a properly configured blocking pool will yield better performance.
+                    Default value is true.
+                </documentation>
+            </annotation>
+        </attribute>
         <attribute name="blockWaitTime" type="resolver: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