[java-identity-provider COMMIT] in /trunk: idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relying...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jun 19 06:38:02 EDT 2014
Author: rdw
Date: Thu Jun 19 06:38:02 2014
New Revision: 6118
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6118&view=rev
Log:
IDP-420 Allow MetadataProviders to have embedded trust engines.
Added:
trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/switch-metadata-trustengine-inline.xml (with props)
Modified:
trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SignatureValidationParserTest.java
trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java?rev=6118&r1=6117&r2=6118&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/AbstractMetadataProviderParser.java Thu Jun 19 06:38:02 2014
@@ -22,6 +22,7 @@
import javax.annotation.Nonnull;
import net.shibboleth.ext.spring.util.SpringSupport;
+import net.shibboleth.idp.profile.spring.relyingparty.security.SecurityNamespaceHandler;
import net.shibboleth.idp.saml.metadata.impl.RelyingPartyMetadataProvider;
import net.shibboleth.utilities.java.support.xml.DOMTypeSupport;
import net.shibboleth.utilities.java.support.xml.ElementSupport;
@@ -171,5 +172,11 @@
if (null != filters && !filters.isEmpty()) {
builder.addPropertyValue("metadataFilter", SpringSupport.parseCustomElements(filters, parserContext));
}
+
+ final List<Element>trustEngines =
+ ElementSupport.getChildElements(element, SecurityNamespaceHandler.TRUST_ENGINE_ELEMENT_NAME);
+ SpringSupport.parseCustomElements(trustEngines, parserContext);
+
+
}
}
Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SignatureValidationParserTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SignatureValidationParserTest.java?rev=6118&r1=6117&r2=6118&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SignatureValidationParserTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SignatureValidationParserTest.java Thu Jun 19 06:38:02 2014
@@ -91,6 +91,16 @@
Assert.assertTrue(result.iterator().hasNext());
Assert.assertEquals(Sets.newHashSet(result).size(), 1);
}
+
+ @Test public void inlineTrustEngine() throws IOException, ResolverException {
+ MetadataResolver resolver =
+ getBean(MetadataResolver.class, true, "filter/switch-metadata-trustengine-inline.xml", "beans.xml");
+
+ final Iterable<EntityDescriptor> result = resolver.resolve(criteriaFor("urn:mace:switch.ch:SWITCHaai:ethz.ch"));
+ Assert.assertTrue(result.iterator().hasNext());
+ Assert.assertEquals(Sets.newHashSet(result).size(), 1);
+ }
+
@Test(expectedExceptions={BeanDefinitionStoreException.class,}) public void none() throws IOException, ResolverException {
getBean(MetadataResolver.class, true, "filter/signingNone.xml", "beans.xml");
Modified: trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd?rev=6118&r1=6117&r2=6118&view=diff
==============================================================================
--- trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd (original)
+++ trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd Thu Jun 19 06:38:02 2014
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:shibmd="urn:mace:shibboleth:2.0:metadata" xmlns:res="urn:mace:shibboleth:2.0:resource" xmlns:saml2md="urn:oasis:names:tc:SAML:2.0:metadata" targetNamespace="urn:mace:shibboleth:2.0:metadata" elementFormDefault="qualified">
[... 27 lines stripped ...]
More information about the commits
mailing list