[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/system/conf/global-system.xml idp-profile-spri...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Jan 3 10:16:03 EST 2015
Author: rdw
Date: Sat Jan 3 10:16:02 2015
New Revision: 7235
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7235&view=rev
Log:
IDP-559 Add Missing bean Schema validation in configuration. Also provide the ability to inject a bean named something other than shibboleth.SchemaBuilder.
Added:
trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/schemaValidationRefs-beans.xml (with props)
trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/schemaValidationRefs.xml (with props)
Modified:
trunk/idp-conf/src/main/resources/system/conf/global-system.xml
trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SchemaValidationParser.java
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/ShemaValidationParserTest.java
trunk/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
Modified: trunk/idp-conf/src/main/resources/system/conf/global-system.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/conf/global-system.xml?rev=7235&r1=7234&r2=7235&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/conf/global-system.xml (original)
+++ trunk/idp-conf/src/main/resources/system/conf/global-system.xml Sat Jan 3 10:16:02 2015
@@ -252,4 +252,10 @@
p:maxCacheEntries="%{idp.httpclient.memorycaching.maxCacheEntries:50}"
p:maxCacheEntrySize="%{idp.httpclient.memorycaching.maxCacheEntrySize:1048576}" />
+ <!-- Bean used by the SchemaValidation metadata filter -->
+
+ <bean id="shibboleth.SchemaBuilder"
+ lazy-init="true"
+ class="org.opensaml.saml.common.xml.SAMLSchemaBuilder"
+ c:ver="SAML_11" />
</beans>
Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SchemaValidationParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SchemaValidationParser.java?rev=7235&r1=7234&r2=7235&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SchemaValidationParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/SchemaValidationParser.java Sat Jan 3 10:16:02 2015
@@ -56,8 +56,11 @@
@Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
List<Element> schemaNameElements = ElementSupport.getChildElements(element, EXTENSION_SCHEMA_NAME);
- // TODO(rdw) move default to bean (if possible).
- builder.addConstructorArgReference("shibboleth.SchemaBuilder");
+ if (element.hasAttributeNS(null, "schemaBuilderRef")) {
+ builder.addConstructorArgReference(element.getAttributeNS(null, "schemaBuilderRef"));
+ } else {
+ builder.addConstructorArgReference("shibboleth.SchemaBuilder");
+ }
if (null != schemaNameElements && !schemaNameElements.isEmpty()) {
log.warn("Use of <ExtensionSchema> elements is deprecated."
Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/ShemaValidationParserTest.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/ShemaValidationParserTest.java?rev=7235&r1=7234&r2=7235&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/ShemaValidationParserTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/filter/ShemaValidationParserTest.java Sat Jan 3 10:16:02 2015
@@ -43,4 +43,9 @@
Assert.assertEquals(resolver.getMetadataFilter().getClass(), SchemaValidationFilter.class);
}
+ @Test public void bean() throws IOException {
+ MetadataResolver resolver = getBean(MetadataResolver.class, "filter/schemaValidationRefs.xml", "filter/schemaValidationRefs-beans.xml");
+
+ Assert.assertEquals(resolver.getMetadataFilter().getClass(), SchemaValidationFilter.class);
+ }
}
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=7235&r1=7234&r2=7235&view=diff
==============================================================================
[... 59 lines stripped ...]
More information about the commits
mailing list