[java-shib-metadata] branch main updated: Move more tests down from IdP.
Scott Cantor
cantor.2 at osu.edu
Wed Jun 29 15:46:11 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-metadata.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-metadata.git;a=commit;h=51ef5812cf643fe5ca1fc1569300c8c543c34193
The following commit(s) were added to refs/heads/main by this push:
new 51ef5812c Move more tests down from IdP.
51ef5812c is described below
commit 51ef5812cf643fe5ca1fc1569300c8c543c34193
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jun 29 11:46:08 2022 -0400
Move more tests down from IdP.
---
.../spring/metadata/MetadataFailFastTest.java | 183 +++++++++++++++++++++
.../spring/testing/AbstractFailFastTest.java | 8 +-
.../shibboleth/spring/failfast/fileMetadata.xml | 10 ++
.../shibboleth/spring/failfast/httpMetadata.xml | 12 ++
.../spring/failfast/inLineMetadataBad.xml | 19 +++
.../spring/failfast/inLineMetadataGood.xml | 19 +++
.../shibboleth/spring/failfast/metadataBeans.xml | 51 ++++++
.../spring/failfast/metadataBeansDefaultFF.xml | 51 ++++++
.../shibboleth/spring/failfast/metadataFileBad.xml | 11 ++
.../spring/failfast/metadataFileGood.xml | 12 ++
10 files changed, 371 insertions(+), 5 deletions(-)
diff --git a/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/MetadataFailFastTest.java b/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/MetadataFailFastTest.java
new file mode 100644
index 000000000..e9a9a9007
--- /dev/null
+++ b/shib-metadata-spring/src/test/java/net/shibboleth/spring/metadata/MetadataFailFastTest.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.spring.metadata;
+
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.opensaml.saml.metadata.resolver.MetadataResolver;
+import org.springframework.mock.env.MockPropertySource;
+import org.testng.annotations.Test;
+
+import net.shibboleth.spring.testing.AbstractFailFastTest;
+import net.shibboleth.utilities.java.support.collection.Pair;
+import net.shibboleth.utilities.java.support.service.ReloadableService;
+import net.shibboleth.utilities.java.support.service.ServiceableComponent;
+
+ at SuppressWarnings({"unchecked", "javadoc"})
+public class MetadataFailFastTest extends AbstractFailFastTest {
+ private static int uniquifier;
+
+ @Test public void workingInline() throws IOException {
+
+ final Object bean = getBean(propertySource("ServiceConfiguration", makePath("inLineMetadataGood.xml")), "metadataBeansDefaultFF.xml");
+ final ReloadableService<MetadataResolver > service = (ReloadableService<MetadataResolver>) bean;
+ assertNotNull(service);
+ final MetadataResolver resolver = service.getServiceableComponent().getComponent();
+ assertNotNull(resolver);
+ }
+
+ private void nonWorkingInline(final Boolean failFast) throws IOException {
+ nonWorkingMetadata(failFast, propertySource("ServiceConfiguration", makePath("inLineMetadataBad.xml")));
+ }
+
+ private void nonWorkingMetadata(final Boolean failFast,
+ final MockPropertySource propertySource) throws IOException {
+ final String beanPath;
+ if (failFast == null) {
+ beanPath = "metadataBeansDefaultFF.xml";
+ } else {
+ beanPath = "metadataBeans.xml";
+ }
+
+ final Object bean = getBean(propertySource, failFast, beanPath);
+ final ReloadableService<MetadataResolver > service = (ReloadableService<MetadataResolver>) bean;
+ if (null != failFast && failFast) {
+ assertNull(service);
+ return;
+ }
+ assertNotNull(service);
+ final ServiceableComponent<MetadataResolver> component = service.getServiceableComponent();
+ assertNull(component);
+ }
+
+ @Test public void nonWorkingInlineFailFast() throws IOException {
+ nonWorkingInline(true);
+ }
+
+ @Test public void nonWorkingInline() throws IOException {
+ nonWorkingInline(false);
+ }
+
+ @Test public void nonWorkingInlineDefault() throws IOException {
+ nonWorkingInline(null);
+ }
+
+ @Test public void workingFile() throws IOException {
+ final List<Pair<String, String>> prop = List.of(new Pair<>("ServiceConfiguration", makePath("fileMetadata.xml")),
+ new Pair<>("File", makePath("metadataFileGood.xml")));
+
+ final Object bean = getBean(propertySource(prop), "metadataBeansDefaultFF.xml");
+ final ReloadableService<MetadataResolver > service = (ReloadableService<MetadataResolver>) bean;
+ assertNotNull(service);
+ final MetadataResolver resolver = service.getServiceableComponent().getComponent();
+ assertNotNull(resolver);
+ }
+
+ private void badFile(final Boolean failFast) throws IOException {
+ final List<Pair<String, String>> prop = List.of(new Pair<>("ServiceConfiguration", makePath("fileMetadata.xml")),
+ new Pair<>("File", makePath("metadataFileBad.xml")));
+ nonWorkingMetadata(failFast, propertySource(prop));
+ }
+
+ @Test public void badFileFailFast() throws IOException {
+ badFile(true);
+ }
+
+ @Test public void badFile() throws IOException {
+ badFile(false);
+ }
+
+ @Test public void badFileDefault() throws IOException {
+ badFile(null);
+ }
+
+ private void nonExistingFile(final Boolean failFast) throws IOException {
+ final List<Pair<String, String>> prop = List.of(new Pair<>("ServiceConfiguration", makePath("fileMetadata.xml")),
+ new Pair<>("File", makePath("metadatNooneHome.xml")));
+ nonWorkingMetadata(failFast, propertySource(prop));
+ }
+
+ @Test public void notThereFileFailFast() throws IOException {
+ nonExistingFile(true);
+ }
+
+ @Test public void notThereFile() throws IOException {
+ nonExistingFile(false);
+ }
+
+ @Test public void notThereFileDefault() throws IOException {
+ nonExistingFile(null);
+ }
+
+ @Test public void workingHttp() throws IOException {
+ final List<Pair<String, String>> prop = List.of(
+ new Pair<>("ServiceConfiguration", makePath("httpMetadata.xml")),
+ new Pair<>("Backing", makeTempPath("workingHttpTmp" + uniquifier++ + ".xml")),
+ new Pair<>("metadataURL", makeURLPath("metadataFileGood.xml")));
+
+ final Object bean = getBean(propertySource(prop), "metadataBeansDefaultFF.xml");
+ final ReloadableService<MetadataResolver > service = (ReloadableService<MetadataResolver>) bean;
+ assertNotNull(service);
+ final MetadataResolver resolver = service.getServiceableComponent().getComponent();
+ assertNotNull(resolver);
+ }
+
+ private void badHttp(final Boolean failFast) throws IOException {
+ final List<Pair<String, String>> prop = List.of(
+ new Pair<>("ServiceConfiguration", makePath("httpMetadata.xml")),
+ new Pair<>("Backing", makeTempPath("badHttpTmp" + uniquifier++ + ".xml")),
+ new Pair<>("metadataURL", makeURLPath("metadataFileBad.xml")));
+ nonWorkingMetadata(failFast, propertySource(prop));
+ }
+
+ @Test public void badHttpFailFast() throws IOException {
+ badHttp(true);
+ }
+
+ @Test public void badHttp() throws IOException {
+ badHttp(false);
+ }
+
+ @Test public void badHttpDefault() throws IOException {
+ badHttp(null);
+ }
+
+ private void nonExistingHttp(final Boolean failFast) throws IOException {
+ final List<Pair<String, String>> prop = List.of(
+ new Pair<>("ServiceConfiguration", makePath("httpMetadata.xml")),
+ new Pair<>("Backing", makeTempPath("badHttpTmp" + uniquifier++ + ".xml")),
+ new Pair<>("metadataURL", makeURLPath("ItsNotThere.xml")));
+ nonWorkingMetadata(failFast, propertySource(prop));
+ }
+
+ @Test public void notThereHttpFailFast() throws IOException {
+ nonExistingHttp(true);
+ }
+
+ @Test public void notThereHttp() throws IOException {
+ nonExistingHttp(false);
+ }
+
+ @Test public void notThereHttpDefault() throws IOException {
+ nonExistingHttp(null);
+ }
+}
diff --git a/shib-metadata-spring/src/test/java/net/shibboleth/spring/testing/AbstractFailFastTest.java b/shib-metadata-spring/src/test/java/net/shibboleth/spring/testing/AbstractFailFastTest.java
index 971270dd3..e69862880 100644
--- a/shib-metadata-spring/src/test/java/net/shibboleth/spring/testing/AbstractFailFastTest.java
+++ b/shib-metadata-spring/src/test/java/net/shibboleth/spring/testing/AbstractFailFastTest.java
@@ -35,7 +35,6 @@ import org.springframework.mock.env.MockPropertySource;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Ignore;
import net.shibboleth.ext.spring.util.ApplicationContextBuilder;
import net.shibboleth.ext.spring.util.SpringSupport;
@@ -46,7 +45,6 @@ import net.shibboleth.utilities.java.support.test.repository.RepositorySupport;
/**
* Base class for testing metadata providers.
*/
- at Ignore
@SuppressWarnings({"javadoc"})
public class AbstractFailFastTest extends OpenSAMLInitBaseTestCase {
@@ -61,7 +59,7 @@ public class AbstractFailFastTest extends OpenSAMLInitBaseTestCase {
}
protected String getPath() {
- return "/net/shibboleth/idp/profile/spring/failfast/";
+ return "/net/shibboleth/spring/failfast/";
}
protected String getWorkspaceDirName() {
@@ -168,8 +166,8 @@ public class AbstractFailFastTest extends OpenSAMLInitBaseTestCase {
}
protected String makeURLPath(final String filePart) {
- return RepositorySupport.buildHTTPResourceURL("java-identity-provider",
- "idp-profile-spring/src/test/resources" + getPath() + filePart,
+ return RepositorySupport.buildHTTPResourceURL("shib-metadata",
+ "shib-metadata-spring/src/test/resources" + getPath() + filePart,
false);
}
}
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/fileMetadata.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/fileMetadata.xml
new file mode 100644
index 000000000..885e09270
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/fileMetadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata:MetadataProvider xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+ xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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" refreshDelayFactor="0.5" maxRefreshDelay="PT55M" minRefreshDelay="PT15M"
+ id="fileEntity" xsi:type="metadata:FilesystemMetadataProvider" metadataFile="%{File}">
+
+</metadata:MetadataProvider>
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/httpMetadata.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/httpMetadata.xml
new file mode 100644
index 000000000..34c50e1a4
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/httpMetadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata:MetadataProvider xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+ xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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" refreshDelayFactor="0.5" maxRefreshDelay="PT55M" minRefreshDelay="PT15M"
+ id="fileEntity" xsi:type="metadata:FileBackedHTTPMetadataProvider"
+ backingFile="%{Backing}"
+ metadataURL="%{metadataURL}">
+
+</metadata:MetadataProvider>
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataBad.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataBad.xml
new file mode 100644
index 000000000..24ed5ca92
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataBad.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata:MetadataProvider xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+ xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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"
+
+ resolveViaPredicatesOnly="true"
+ failFastInitialization="false"
+ id="inLineEntity" xsi:type="metadata:InlineMetadataProvider" sortKey="1">
+
+ <EntityDescriptor ID="ie1">
+ <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.example.org/idpie1/profile/SAML2/Redirect/SSO" />
+ </IDPSSODescriptor>
+ </EntityDescriptor>
+</metadata:MetadataProvider>
+
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataGood.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataGood.xml
new file mode 100644
index 000000000..3764e1a09
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/inLineMetadataGood.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata:MetadataProvider xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+ xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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"
+
+ resolveViaPredicatesOnly="true"
+ id="inLineEntity" xsi:type="metadata:InlineMetadataProvider" sortKey="1">
+
+ <EntityDescriptor ID="ie1"
+ entityID="https://idp.example.org/idp/shibboleth">
+ <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.example.org/idpie1/profile/SAML2/Redirect/SSO" />
+ </IDPSSODescriptor>
+ </EntityDescriptor>
+</metadata:MetadataProvider>
+
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeans.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeans.xml
new file mode 100644
index 000000000..88fed9f29
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeans.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:c="http://www.springframework.org/schema/c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
+
+ default-init-method="initialize" default-destroy-method="destroy">
+
+ <bean id="shibboleth.PropertySourcesPlaceholderConfigurer" destroy-method=""
+ class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
+ p:placeholderPrefix="%{" p:placeholderSuffix="}" />
+
+ <!-- This bean MUST be called "conversionService" to work properly. -->
+ <bean id="conversionService" destroy-method=""
+ class="org.springframework.context.support.ConversionServiceFactoryBean">
+ <property name="converters">
+ <set>
+ <bean class="net.shibboleth.ext.spring.config.StringToIPRangeConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.BooleanToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringBooleanToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringToResourceConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.FunctionToFunctionConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.PredicateToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringToDurationConverter" destroy-method=""/>
+ </set>
+ </property>
+ </bean>
+
+ <bean id="myParserPool"
+ class="net.shibboleth.utilities.java.support.xml.BasicParserPool"
+ p:maxPoolSize="1000"
+ p:coalescing="true" p:ignoreComments="true"
+ p:ignoreElementContentWhitespace="true" p:namespaceAware="true" />
+
+
+ <bean id="shibboleth.MetadataResolverService"
+ class="net.shibboleth.ext.spring.service.ReloadableSpringService"
+ p:serviceConfigurations="%{ServiceConfiguration}"
+ p:beanFactoryPostProcessors-ref="shibboleth.PropertySourcesPlaceholderConfigurer"
+ p:failFast="%{failFast}" p:reloadCheckDelay="0">
+ <constructor-arg name="claz"
+ value="org.opensaml.saml.metadata.resolver.MetadataResolver" />
+ <constructor-arg name="strategy">
+ <bean id="wibble" p:id="wibble"
+ class="net.shibboleth.idp.saml.metadata.impl.MetadataResolverServiceStrategy" />
+ </constructor-arg>
+ </bean>
+</beans>
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeansDefaultFF.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeansDefaultFF.xml
new file mode 100644
index 000000000..b3a140097
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataBeansDefaultFF.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:c="http://www.springframework.org/schema/c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
+
+ default-init-method="initialize" default-destroy-method="destroy">
+
+ <bean id="shibboleth.PropertySourcesPlaceholderConfigurer" destroy-method=""
+ class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
+ p:placeholderPrefix="%{" p:placeholderSuffix="}" />
+
+ <!-- This bean MUST be called "conversionService" to work properly. -->
+ <bean id="conversionService" destroy-method=""
+ class="org.springframework.context.support.ConversionServiceFactoryBean">
+ <property name="converters">
+ <set>
+ <bean class="net.shibboleth.ext.spring.config.StringToIPRangeConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.BooleanToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringBooleanToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringToResourceConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.FunctionToFunctionConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.PredicateToPredicateConverter" destroy-method=""/>
+ <bean class="net.shibboleth.ext.spring.config.StringToDurationConverter" destroy-method=""/>
+ </set>
+ </property>
+ </bean>
+
+ <bean id="myParserPool"
+ class="net.shibboleth.utilities.java.support.xml.BasicParserPool"
+ p:maxPoolSize="1000"
+ p:coalescing="true" p:ignoreComments="true"
+ p:ignoreElementContentWhitespace="true" p:namespaceAware="true" />
+
+
+ <bean id="shibboleth.MetadataResolverService"
+ class="net.shibboleth.ext.spring.service.ReloadableSpringService"
+ p:serviceConfigurations="%{ServiceConfiguration}"
+ p:beanFactoryPostProcessors-ref="shibboleth.PropertySourcesPlaceholderConfigurer"
+ p:reloadCheckDelay="0">
+ <constructor-arg name="claz"
+ value="org.opensaml.saml.metadata.resolver.MetadataResolver" />
+ <constructor-arg name="strategy">
+ <bean id="wibble" p:id="wibble"
+ class="net.shibboleth.idp.saml.metadata.impl.MetadataResolverServiceStrategy" />
+ </constructor-arg>
+ </bean>
+</beans>
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileBad.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileBad.xml
new file mode 100644
index 000000000..ce61fbbc2
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileBad.xml
@@ -0,0 +1,11 @@
+<EntityDescriptor
+ xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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"
+ ID="ie1"
+ <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.example.org/idpie1/profile/SAML2/Redirect/SSO" />
+ </IDPSSODescriptor>
+</EntityDescriptor>
\ No newline at end of file
diff --git a/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileGood.xml b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileGood.xml
new file mode 100644
index 000000000..ac7918cb2
--- /dev/null
+++ b/shib-metadata-spring/src/test/resources/net/shibboleth/spring/failfast/metadataFileGood.xml
@@ -0,0 +1,12 @@
+<EntityDescriptor
+ xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ 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"
+ ID="ie1"
+ entityID="https://idp.example.org/idp/shibboleth">
+ <IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <SingleSignOnService
+ Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+ Location="https://idp.example.org/idpie1/profile/SAML2/Redirect/SSO" />
+ </IDPSSODescriptor>
+</EntityDescriptor>
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list