[java-identity-provider] 02/05: IDP-1181 Deprecate failFast for StoredID dataconnector and replace with failFastInitialize
Rod Widdowson
rdw at steadingsoftware.com
Thu Sep 26 10:43:01 EDT 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=b5b574f4cab933134b8d7ce8aa4e112207bb4e47
commit b5b574f4cab933134b8d7ce8aa4e112207bb4e47
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Sep 25 15:53:19 2019 +0100
IDP-1181 Deprecate failFast for StoredID dataconnector and replace with failFastInitialize
https://issues.shibboleth.net/jira/browse/IDP-1181
---
.../resolver/spring/dc/impl/StoredIdDataConnectorParser.java | 9 +++++++++
.../resolver/spring/dc/resolver/containerManagedConnection.xml | 2 +-
.../idp/attribute/resolver/spring/dc/resolver/stored.xml | 2 +-
.../attribute/resolver/spring/dc/resolver/storedBeanManaged.xml | 2 +-
.../src/main/resources/schema/shibboleth-attribute-resolver.xsd | 7 +++++++
5 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/StoredIdDataConnectorParser.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/StoredIdDataConnectorParser.java
index 9ca560d..5c19d86 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/StoredIdDataConnectorParser.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/dc/impl/StoredIdDataConnectorParser.java
@@ -23,6 +23,8 @@ import javax.xml.namespace.QName;
import net.shibboleth.ext.spring.util.SpringSupport;
import net.shibboleth.idp.attribute.impl.JDBCPairwiseIdStore;
import net.shibboleth.idp.attribute.resolver.spring.impl.AttributeResolverNamespaceHandler;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import org.slf4j.Logger;
@@ -84,9 +86,16 @@ public class StoredIdDataConnectorParser extends ComputedIdDataConnectorParser {
}
if (config.hasAttributeNS(null, "failFast")) {
+ // V4 Deprecation
+ DeprecationSupport.warnOnce(ObjectType.ATTRIBUTE, "failFast",
+ parserContext.getReaderContext().getResource().getDescription(), "failFastInitialize");
builder.addPropertyValue("verifyDatabase",
StringSupport.trimOrNull(config.getAttributeNS(null, "failFast")));
}
+ if (config.hasAttributeNS(null, "failFastInitialize")) {
+ builder.addPropertyValue("verifyDatabase",
+ StringSupport.trimOrNull(config.getAttributeNS(null, "failFastInitialize")));
+ }
if (config.hasAttributeNS(null, "retryableErrors")) {
builder.addPropertyValue("retryableErrors",
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/containerManagedConnection.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/containerManagedConnection.xml
index 97ca8a8..1bef63d 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/containerManagedConnection.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/containerManagedConnection.xml
@@ -1,7 +1,7 @@
<DataConnector id="stored" xsi:type="StoredId"
xmlns="urn:mace:shibboleth:2.0:resolver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- failFast="false"
+ failFastInitialize="false"
queryTimeout="PT5S"
transactionRetries="5"
retryableErrors="25000 25001"
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/stored.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/stored.xml
index e8f0ca3..7721468 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/stored.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/stored.xml
@@ -2,7 +2,7 @@
<DataConnector id="stored" xsi:type="StoredId"
xmlns="urn:mace:shibboleth:2.0:resolver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- failFast="false"
+ failFastInitialize="false"
queryTimeout="PT5S"
transactionRetries="5"
retryableErrors="25000 25001"
diff --git a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/storedBeanManaged.xml b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/storedBeanManaged.xml
index 834d6d8..835875d 100644
--- a/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/storedBeanManaged.xml
+++ b/idp-attribute-resolver-spring/src/test/resources/net/shibboleth/idp/attribute/resolver/spring/dc/resolver/storedBeanManaged.xml
@@ -2,7 +2,7 @@
<DataConnector id="stored" xsi:type="StoredId"
xmlns="urn:mace:shibboleth:2.0:resolver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- failFast="false"
+ failFastInitialize="false"
queryTimeout="PT5S"
transactionRetries="5"
retryableErrors="25000 25001"
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 9275811..0db683b 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-attribute-resolver.xsd
@@ -1452,6 +1452,13 @@
<attribute name="failFast" type="resolver:string">
<annotation>
<documentation>
+ Deprecated, use failFastInitialize
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="failFastInitialize" type="resolver:string">
+ <annotation>
+ <documentation>
Whether to fail if the store cannot be verified at startup (defaults to false).
</documentation>
</annotation>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list