[java-identity-provider] branch master updated: IDP-1181 Test FastFail behavior
Rod Widdowson
rdw at steadingsoftware.com
Mon Sep 2 11:22:26 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=3cc7be6ceadde30c07b57f056795ea3f0b55a401
The following commit(s) were added to refs/heads/master by this push:
new 3cc7be6 IDP-1181 Test FastFail behavior
3cc7be6 is described below
commit 3cc7be6ceadde30c07b57f056795ea3f0b55a401
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Sep 2 16:21:18 2019 +0100
IDP-1181 Test FastFail behavior
https://issues.shibboleth.net/jira/browse/IDP-1181
---
.../spring/failfast/AbstractFailFastTest.java | 155 +++++++++++++++++++++
.../spring/failfast/MetadataFailFastTest.java | 133 ++++++++++++++++++
.../idp/profile/spring/failfast/fileMetadata.xml | 10 ++
.../profile/spring/failfast/inLineMetadataBad.xml | 19 +++
.../profile/spring/failfast/inLineMetadataGood.xml | 19 +++
.../idp/profile/spring/failfast/metadataBeans.xml | 50 +++++++
.../spring/failfast/metadataBeansDefaultFF.xml | 50 +++++++
.../profile/spring/failfast/metadataFileBad.xml | 11 ++
.../profile/spring/failfast/metadataFileGood.xml | 12 ++
9 files changed, 459 insertions(+)
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/AbstractFailFastTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/AbstractFailFastTest.java
new file mode 100644
index 0000000..a6f6140d
--- /dev/null
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/AbstractFailFastTest.java
@@ -0,0 +1,155 @@
+/*
+ * 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.idp.profile.spring.failfast;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.opensaml.core.OpenSAMLInitBaseTestCase;
+import org.opensaml.core.criterion.EntityIdCriterion;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.mock.env.MockPropertySource;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+
+import net.shibboleth.ext.spring.util.ApplicationContextBuilder;
+import net.shibboleth.ext.spring.util.SpringSupport;
+import net.shibboleth.utilities.java.support.collection.Pair;
+import net.shibboleth.utilities.java.support.resolver.CriteriaSet;
+import net.shibboleth.utilities.java.support.service.ReloadableService;
+
+/**
+ * Base class for testing metadata providers.
+ */
+public class AbstractFailFastTest extends OpenSAMLInitBaseTestCase {
+
+ private static final String PATH = "/net/shibboleth/idp/profile/spring/failfast/";
+
+ static private String workspaceDirName;
+
+ static List<GenericApplicationContext> contexts;
+
+ protected void registerContext(final GenericApplicationContext context) {
+ synchronized(contexts) {
+ contexts.add(context);
+ }
+ }
+
+ @BeforeSuite public void beforeSuite() throws IOException {
+ final ClassPathResource resource =
+ new ClassPathResource(PATH);
+ workspaceDirName = resource.getFile().getAbsolutePath() + "/";
+ contexts = new ArrayList<>();
+ }
+
+
+ @SuppressWarnings("resource")
+ @AfterSuite public void tearDownContexts() {
+ final Iterator<GenericApplicationContext> contextIterator = contexts.iterator();
+ while (contextIterator.hasNext()) {
+ final GenericApplicationContext context;
+ synchronized (contexts) {
+ context = contextIterator.next();
+ }
+ context.close();
+ }
+ }
+
+ protected ApplicationContext getApplicationContext(final String contextName, final MockPropertySource propSource, final String... files)
+ throws IOException {
+ final Resource[] resources = new Resource[files.length];
+
+ for (int i = 0; i < files.length; i++) {
+ resources[i] = new ClassPathResource(PATH + files[i]);
+ }
+
+ final ApplicationContextBuilder builder = new ApplicationContextBuilder();
+
+ builder.setName(contextName);
+
+ builder.setPropertySources(Collections.singletonList(propSource));
+
+ builder.setServiceConfigurations(Arrays.asList(resources));
+
+ final GenericApplicationContext context = builder.build();
+
+ registerContext(context);
+
+ return context;
+ }
+
+ protected ApplicationContext getApplicationContext(final String contextName, final String... files) throws IOException {
+ return getApplicationContext(contextName, null, files);
+ }
+
+ protected Object getBean(final MockPropertySource propSource, final String... files) throws IOException {
+ return getBean(propSource, true, files);
+ }
+ protected Object getBean(final MockPropertySource propSource, Boolean failFast, final String... files) throws IOException {
+ @SuppressWarnings("rawtypes") final Class<ReloadableService> claz = ReloadableService.class;
+
+ if (null == failFast) {
+ propSource.setProperty("failFast", "");
+ } else if (failFast) {
+ propSource.setProperty("failFast", "true");
+ } else {
+ propSource.setProperty("failFast", "false");
+ }
+
+ try {
+ final ApplicationContext context = getApplicationContext(claz.getCanonicalName(), propSource, files);
+ return SpringSupport.getBean(context, claz);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ protected Object getBean(final String... files) throws IOException {
+ return getBean(null, files);
+ }
+
+ protected MockPropertySource propertySource(final String name, final String value) {
+ MockPropertySource propSource = new MockPropertySource("localProperties");
+ propSource.setProperty(name, value);
+ return propSource;
+ }
+
+ protected MockPropertySource propertySource(final Collection<Pair<String,String>> values) {
+ MockPropertySource propSource = new MockPropertySource("localProperties");
+ for (final Pair<String, String> value: values) {
+ propSource.setProperty(value.getFirst(), value.getSecond());
+ }
+ return propSource;
+ }
+ static public CriteriaSet criteriaFor(final String entityId) {
+ final EntityIdCriterion criterion = new EntityIdCriterion(entityId);
+ return new CriteriaSet(criterion);
+ }
+
+ protected String makePath(final String filePart) {
+ return workspaceDirName + filePart;
+ }
+}
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/MetadataFailFastTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/MetadataFailFastTest.java
new file mode 100644
index 0000000..cb2032d
--- /dev/null
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/failfast/MetadataFailFastTest.java
@@ -0,0 +1,133 @@
+/*
+ * 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.idp.profile.spring.failfast;
+
+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.utilities.java.support.collection.Pair;
+import net.shibboleth.utilities.java.support.service.ReloadableService;
+import net.shibboleth.utilities.java.support.service.ServiceableComponent;
+
+/**
+ *
+ */
+ at SuppressWarnings("unchecked")
+public class MetadataFailFastTest extends AbstractFailFastTest {
+
+ @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);
+ }
+
+}
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/fileMetadata.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/fileMetadata.xml
new file mode 100644
index 0000000..885e092
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/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/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/inLineMetadataBad.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/inLineMetadataBad.xml
new file mode 100644
index 0000000..24ed5ca
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/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/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/inLineMetadataGood.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/inLineMetadataGood.xml
new file mode 100644
index 0000000..3764e1a
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/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/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeans.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeans.xml
new file mode 100644
index 0000000..5a79e97
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeans.xml
@@ -0,0 +1,50 @@
+<?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"
+ class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
+ p:placeholderPrefix="%{" p:placeholderSuffix="}" />
+
+ <!-- This bean MUST be called "conversionService" to work properly. -->
+ <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean">
+ <property name="converters">
+ <set>
+ <bean class="net.shibboleth.ext.spring.config.StringToIPRangeConverter" />
+ <bean class="net.shibboleth.ext.spring.config.BooleanToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringBooleanToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringToResourceConverter" />
+ <bean class="net.shibboleth.ext.spring.config.FunctionToFunctionConverter" />
+ <bean class="net.shibboleth.ext.spring.config.PredicateToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringToDurationConverter" />
+ </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.profile.spring.relyingparty.metadata.impl.MetadataResolverServiceStrategy" />
+ </constructor-arg>
+ </bean>
+</beans>
\ No newline at end of file
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeansDefaultFF.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeansDefaultFF.xml
new file mode 100644
index 0000000..57d6cff
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataBeansDefaultFF.xml
@@ -0,0 +1,50 @@
+<?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"
+ class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
+ p:placeholderPrefix="%{" p:placeholderSuffix="}" />
+
+ <!-- This bean MUST be called "conversionService" to work properly. -->
+ <bean id="conversionService" class="org.springframework.context.support.ConversionServiceFactoryBean">
+ <property name="converters">
+ <set>
+ <bean class="net.shibboleth.ext.spring.config.StringToIPRangeConverter" />
+ <bean class="net.shibboleth.ext.spring.config.BooleanToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringBooleanToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringToResourceConverter" />
+ <bean class="net.shibboleth.ext.spring.config.FunctionToFunctionConverter" />
+ <bean class="net.shibboleth.ext.spring.config.PredicateToPredicateConverter" />
+ <bean class="net.shibboleth.ext.spring.config.StringToDurationConverter" />
+ </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.profile.spring.relyingparty.metadata.impl.MetadataResolverServiceStrategy" />
+ </constructor-arg>
+ </bean>
+</beans>
\ No newline at end of file
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataFileBad.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataFileBad.xml
new file mode 100644
index 0000000..ce61fbb
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/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/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataFileGood.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/failfast/metadataFileGood.xml
new file mode 100644
index 0000000..ac7918c
--- /dev/null
+++ b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/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