[java-metadata-aggregator] 02/02: MDA-310 - Add stage to validate absence of text in element contents

Ian Young ian at iay.org.uk
Tue Sep 16 11:12:41 UTC 2025


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch main
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=84ca643fd7190f9bd0a90df3332cae47ab99b28d

commit 84ca643fd7190f9bd0a90df3332cae47ab99b28d
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Tue Sep 16 12:12:36 2025 +0100

    MDA-310 - Add stage to validate absence of text in element contents
    
    Add a generic Stage to validate Elements selected by QName.
    Add a specific Validator<Element> to check for text in element contents
    
    https://shibboleth.atlassian.net/browse/MDA-310
---
 .../metadata/dom/ElementValidationStage.java       |  37 +++++
 .../metadata/validate/BaseValidator.java           |   2 +-
 .../validate/element/BaseElementValidator.java     |  55 +++++++
 .../element/RejectMixedContentTextValidator.java   |  60 ++++++++
 .../metadata/validate/element/package-info.java    |  21 +++
 .../resources/net/shibboleth/metadata/beans.xml    |  10 ++
 .../RejectMixedContentTextValidatorSpringTest.java |  55 +++++++
 .../RejectMixedContentTextValidatorTest.java       |  44 ++++++
 .../RejectMixedContentTextValidator-bad.xml        |  28 ++++
 .../RejectMixedContentTextValidator-baditem.xml    | 163 +++++++++++++++++++++
 .../RejectMixedContentTextValidator-good.xml       |  26 ++++
 .../RejectMixedContentTextValidator-gooditem.xml   | 162 ++++++++++++++++++++
 ...tMixedContentTextValidatorSpringTest-config.xml |  35 +++++
 13 files changed, 697 insertions(+), 1 deletion(-)

diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementValidationStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementValidationStage.java
new file mode 100644
index 0000000..8fab48d
--- /dev/null
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/dom/ElementValidationStage.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed 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.metadata.dom;
+
+import javax.annotation.Nonnull;
+import javax.annotation.concurrent.ThreadSafe;
+
+import org.w3c.dom.Element;
+
+import net.shibboleth.metadata.pipeline.Stage;
+
+/**
+ * A {@link Stage} allowing validation of DOM {@link Element}s as {@link Element}s.
+ *
+ * @since 1.0.0
+ */
+ at ThreadSafe
+public class ElementValidationStage extends AbstractElementValidationStage<Element> {
+
+    @Override
+    protected @Nonnull Element convert(@Nonnull final Element element) {
+        return element;
+    }
+
+}
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/validate/BaseValidator.java b/mda-framework/src/main/java/net/shibboleth/metadata/validate/BaseValidator.java
index db063b3..4c4dc2d 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/validate/BaseValidator.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/validate/BaseValidator.java
@@ -165,7 +165,7 @@ public abstract class BaseValidator extends AbstractIdentifiableInitializableCom
      *
      * @since 0.10.0
      */
-    private @Nonnull String formatValueContext(final @Nullable String valueContext) {
+    protected @Nonnull String formatValueContext(final @Nullable String valueContext) {
         if (valueContext == null) {
             return "";
         } else {
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/BaseElementValidator.java b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/BaseElementValidator.java
new file mode 100644
index 0000000..aef3068
--- /dev/null
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/BaseElementValidator.java
@@ -0,0 +1,55 @@
+/*
+ * 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.metadata.validate.element;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import net.shibboleth.metadata.validate.BaseValidator;
+
+/**
+ * Base class for {@link org.w3c.dom.Element} validators.
+ *
+ * <p>
+ * Implements a value context formatting strategy
+ * under the assumption that the value context will
+ * be the element's name.
+ * </p>
+ *
+ * @since 1.0.0
+ */
+public abstract class BaseElementValidator extends BaseValidator {
+
+    @Override
+    protected @Nonnull String formatValueContext(final @Nullable String valueContext) {
+        if (valueContext == null) {
+            return "";
+        } else {
+            return valueContext + " ";
+        }
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param message default message format for this validator
+     */
+    protected BaseElementValidator(final @Nonnull String message) {
+        super(message);
+    }
+}
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator.java b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator.java
new file mode 100644
index 0000000..74d224c
--- /dev/null
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator.java
@@ -0,0 +1,60 @@
+/*
+ * 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.metadata.validate.element;
+
+import javax.annotation.Nonnull;
+import javax.annotation.concurrent.ThreadSafe;
+
+import org.w3c.dom.Element;
+
+import net.shibboleth.metadata.Item;
+import net.shibboleth.metadata.validate.Validator;
+import net.shibboleth.shared.xml.ElementSupport;
+
+/**
+ * Reject an element if it has non-whitespace text content.
+ *
+ * @since 1.0.0
+ */
+ at ThreadSafe
+public class RejectMixedContentTextValidator extends BaseElementValidator
+    implements Validator<Element> {
+
+    /**
+     * Constructor.
+     */
+    public RejectMixedContentTextValidator() {
+        super("element contains non-whitespace text content '%s'");
+    }
+
+    @Override
+    public @Nonnull Action validate(@Nonnull final Element e, @Nonnull final Item<?> item,
+            @Nonnull final String callerId) {
+
+        // Extract the text content of this element. Trim off leading and trailing white space.
+        final @Nonnull String content = ElementSupport.getElementContentAsString(e).trim();
+
+        // Check that it only contains white space.
+        if (!content.isEmpty()) {
+            addErrorMessage(content, item, callerId, e.getLocalName());
+            return Action.DONE;
+        }
+        return Action.CONTINUE;
+    }
+
+}
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/package-info.java b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/package-info.java
new file mode 100644
index 0000000..4247845
--- /dev/null
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/validate/element/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed 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.
+ */
+
+/**
+ * Classes for validation of {@link org.w3c.dom.Element}s as
+ * {@link org.w3c.dom.Element}s.
+ *
+ * @since 1.0.0
+ */
+package net.shibboleth.metadata.validate.element;
diff --git a/mda-framework/src/main/resources/net/shibboleth/metadata/beans.xml b/mda-framework/src/main/resources/net/shibboleth/metadata/beans.xml
index 8aa44e2..4a218fc 100644
--- a/mda-framework/src/main/resources/net/shibboleth/metadata/beans.xml
+++ b/mda-framework/src/main/resources/net/shibboleth/metadata/beans.xml
@@ -64,6 +64,9 @@
     <bean id="mda.ElementsStrippingStage" abstract="true" parent="mda.stage_parent"
         class="net.shibboleth.metadata.dom.ElementsStrippingStage"/>
 
+    <bean id="mda.ElementValidationStage" abstract="true" parent="mda.stage_parent"
+        class="net.shibboleth.metadata.dom.ElementValidationStage"/>
+
     <bean id="mda.ElementWhitespaceTrimmingStage" abstract="true" parent="mda.stage_parent"
         class="net.shibboleth.metadata.dom.ElementWhitespaceTrimmingStage"/>
 
@@ -315,6 +318,13 @@
     <bean id="mda.RejectAllValidator" abstract="true" parent="mda.validator_parent"
         class="net.shibboleth.metadata.validate.RejectAllValidator"/>
 
+    <!--
+        net.shibboleth.metadata.validate.element
+    -->
+    
+    <bean id="mda.RejectMixedContentTextValidator" abstract="true" parent="mda.component_parent"
+        class="net.shibboleth.metadata.validate.element.RejectMixedContentTextValidator"/>
+
     <!--
         net.shibboleth.metadata.validate.net
     -->
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest.java
new file mode 100644
index 0000000..1d326e8
--- /dev/null
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest.java
@@ -0,0 +1,55 @@
+package net.shibboleth.metadata.validate.element;
+
+import java.util.List;
+
+import javax.annotation.Nonnull;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import net.shibboleth.metadata.ErrorStatus;
+import net.shibboleth.metadata.dom.ElementValidationStage;
+import net.shibboleth.metadata.dom.testing.BaseDOMTest;
+import net.shibboleth.shared.component.ComponentInitializationException;
+
+ at ContextConfiguration("RejectMixedContentTextValidatorSpringTest-config.xml")
+public class RejectMixedContentTextValidatorSpringTest extends AbstractTestNGSpringContextTests {
+
+    @Autowired
+    ElementValidationStage stage;
+
+    private class TestProxy extends BaseDOMTest {
+
+        public TestProxy(final @Nonnull Class<?> clazz)
+                throws ComponentInitializationException {
+            super(clazz);
+            setUp();
+        }
+
+    }
+
+    @Test
+    public void testGood() throws Exception {
+        final @Nonnull var proxy = new TestProxy(RejectMixedContentTextValidator.class);
+        final var item = proxy.readDOMItem("gooditem.xml");
+        final var items = List.of(item);
+        stage.execute(items);
+        Assert.assertEquals(proxy.countErrors(item), 0);
+    }
+
+    @Test
+    public void testBad() throws Exception {
+        final @Nonnull var proxy = new TestProxy(RejectMixedContentTextValidator.class);
+        final var item = proxy.readDOMItem("baditem.xml");
+        final var items = List.of(item);
+        stage.execute(items);
+        Assert.assertEquals(proxy.countErrors(item), 1);
+        final var error = item.getItemMetadata().get(ErrorStatus.class).get(0);
+        final var message = error.getStatusMessage();
+        Assert.assertEquals(message, "KeyInfo element contains non-whitespace text content 'e'");
+    }
+
+}
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorTest.java
new file mode 100644
index 0000000..b4327c3
--- /dev/null
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorTest.java
@@ -0,0 +1,44 @@
+package net.shibboleth.metadata.validate.element;
+
+import javax.annotation.Nonnull;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import net.shibboleth.metadata.ErrorStatus;
+import net.shibboleth.metadata.dom.testing.BaseDOMTest;
+import net.shibboleth.metadata.pipeline.StageProcessingException;
+import net.shibboleth.metadata.validate.Validator.Action;
+import net.shibboleth.shared.component.ComponentInitializationException;
+import net.shibboleth.shared.xml.XMLParserException;
+
+public class RejectMixedContentTextValidatorTest extends BaseDOMTest {
+
+    final @Nonnull RejectMixedContentTextValidator val;
+
+    protected RejectMixedContentTextValidatorTest() throws ComponentInitializationException {
+        super(RejectMixedContentTextValidator.class);
+        val = new RejectMixedContentTextValidator();
+        val.setId("test");
+        val.initialize();
+    }
+
+    @Test
+    public void validateGood() throws XMLParserException, StageProcessingException {
+        final var item = readDOMItem("good.xml");
+        var res = val.validate(item.unwrap(), item, "good");
+        Assert.assertEquals(res, Action.CONTINUE);
+        Assert.assertEquals(countErrors(item), 0);
+    }
+
+    @Test
+    public void validateBad() throws XMLParserException, StageProcessingException {
+        final var item = readDOMItem("bad.xml");
+        var res = val.validate(item.unwrap(), item, "bad");
+        Assert.assertEquals(res, Action.DONE);
+        Assert.assertEquals(countErrors(item), 1);
+        final var error = item.getItemMetadata().get(ErrorStatus.class).get(0);
+        final var message = error.getStatusMessage();
+        Assert.assertEquals(message, "KeyInfo element contains non-whitespace text content 'e'");
+    }
+}
diff --git a/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-bad.xml b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-bad.xml
new file mode 100644
index 0000000..661a348
--- /dev/null
+++ b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-bad.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo
+    xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    e
+    <ds:X509Data>
+        this nested additional text should be ignored
+        <ds:X509Certificate>
+            MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+            MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+            CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+            8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+            A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+            CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+            DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+            FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+            L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+            QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+            lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+            Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+            hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+            Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+            jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+            HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+            YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+            YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+        </ds:X509Certificate>
+    </ds:X509Data>
+</ds:KeyInfo>
diff --git a/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-baditem.xml b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-baditem.xml
new file mode 100644
index 0000000..ffa0d8f
--- /dev/null
+++ b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-baditem.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+    xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport"
+    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+    xmlns:idpdisc="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol"
+    xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init"
+    xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"
+    xmlns:mdrpi="urn:oasis:names:tc:SAML:metadata:rpi"
+    xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui"
+    xmlns:remd="http://refeds.org/metadata"
+    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
+    xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
+    xmlns:ukfedlabel="http://ukfederation.org.uk/2006/11/label"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:metadata saml-schema-metadata-2.0.xsd
+        urn:oasis:names:tc:SAML:metadata:algsupport sstc-saml-metadata-algsupport-v1.0.xsd
+        urn:oasis:names:tc:SAML:metadata:attribute sstc-metadata-attr.xsd
+        urn:oasis:names:tc:SAML:metadata:rpi saml-metadata-rpi-v1.0.xsd
+        urn:oasis:names:tc:SAML:metadata:ui sstc-saml-metadata-ui-v1.0.xsd
+        urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol sstc-saml-idp-discovery.xsd
+        urn:oasis:names:tc:SAML:profiles:SSO:request-init sstc-request-initiation.xsd
+        urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd
+        urn:mace:shibboleth:metadata:1.0 shibboleth-metadata-1.0.xsd
+        http://ukfederation.org.uk/2006/11/label uk-fed-label.xsd
+        http://refeds.org/metadata refeds-metadata.xsd
+        http://www.w3.org/2001/04/xmlenc# xenc-schema.xsd
+        http://www.w3.org/2009/xmlenc11# xenc-schema-11.xsd
+        http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd"
+    ID="uk000006" entityID="https://idp2.iay.org.uk/idp/shibboleth">
+    <!--
+        This is an "Ian A. Young" IdP for Ian A. Young.
+    -->
+    <Extensions>
+        <ukfedlabel:UKFederationMember orgID="ukforg4590"/>
+        <shibmd:Scope regexp="false">iay.org.uk</shibmd:Scope>
+        <ukfedlabel:Software date="2023-06-20" fullVersion="5.0.0" name="Shibboleth" version="5"/>
+        <ukfedlabel:ExportOptIn date="2009-09-11"/>
+        <mdrpi:RegistrationInfo registrationAuthority="http://ukfederation.org.uk"
+            registrationInstant="2007-03-30T16:36:00Z">
+            <mdrpi:RegistrationPolicy xml:lang="en"
+                >http://ukfederation.org.uk/doc/mdrps-20130902</mdrpi:RegistrationPolicy>
+        </mdrpi:RegistrationInfo>
+        <mdattr:EntityAttributes xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
+            <saml:Attribute Name="http://macedir.org/entity-category-support"
+                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
+                <saml:AttributeValue>http://refeds.org/category/research-and-scholarship</saml:AttributeValue>
+            </saml:Attribute>
+        </mdattr:EntityAttributes>
+    </Extensions>
+    <IDPSSODescriptor
+        protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:mace:shibboleth:1.0 urn:oasis:names:tc:SAML:2.0:protocol">
+        <Extensions>
+            <mdui:UIInfo>
+                <mdui:DisplayName xml:lang="en">Ian A. Young</mdui:DisplayName>
+                <mdui:Description xml:lang="en">This is the identity provider for the iay.org.uk domain.</mdui:Description>
+                <mdui:Logo height="80" width="80">https://idp2.iay.org.uk/images/heads_80x80.jpg</mdui:Logo>
+                <mdui:Logo height="43" width="100">https://idp2.iay.org.uk/images/heads_100x43.jpg</mdui:Logo>
+                <mdui:Logo height="104" width="240">https://idp2.iay.org.uk/images/heads_240x104.jpg</mdui:Logo>
+            </mdui:UIInfo>
+            <mdui:DiscoHints>
+                <mdui:IPHint>217.155.173.104/29</mdui:IPHint>
+                <mdui:DomainHint>iay.org.uk</mdui:DomainHint>
+                <mdui:GeolocationHint>geo:55.9328,-3.17905</mdui:GeolocationHint>
+            </mdui:DiscoHints>
+        </Extensions>
+        <KeyDescriptor>
+            <ds:KeyInfo>
+                e
+                <ds:X509Data>
+                    <ds:X509Certificate>
+                        MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+                        MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+                        CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+                        8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+                        A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+                        CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+                        DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+                        FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+                        L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+                        QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+                        lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+                        Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+                        hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+                        Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+                        jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+                        HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+                        YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+                        YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+                    </ds:X509Certificate>
+                </ds:X509Data>
+            </ds:KeyInfo>
+        </KeyDescriptor>
+        <ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML1/SOAP/ArtifactResolution" index="1"/>
+        <ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML2/SOAP/ArtifactResolution" index="2"/>
+        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
+        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+        <SingleSignOnService Binding="urn:mace:shibboleth:1.0:profiles:AuthnRequest"
+            Location="https://idp2.iay.org.uk/idp/profile/Shibboleth/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/POST/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/POST-SimpleSign/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/Redirect/SSO"/>
+    </IDPSSODescriptor>
+    <AttributeAuthorityDescriptor
+        protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol">
+        <KeyDescriptor>
+            <ds:KeyInfo>
+                <ds:X509Data>
+                    <ds:X509Certificate>
+                        MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+                        MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+                        CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+                        8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+                        A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+                        CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+                        DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+                        FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+                        L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+                        QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+                        lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+                        Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+                        hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+                        Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+                        jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+                        HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+                        YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+                        YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+                    </ds:X509Certificate>
+                </ds:X509Data>
+            </ds:KeyInfo>
+        </KeyDescriptor>
+        <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML1/SOAP/AttributeQuery"/>
+        <AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML2/SOAP/AttributeQuery"/>
+        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
+        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+    </AttributeAuthorityDescriptor>
+    <Organization>
+        <OrganizationName xml:lang="en">Ian A. Young</OrganizationName>
+        <OrganizationDisplayName xml:lang="en">Ian A. Young</OrganizationDisplayName>
+        <OrganizationURL xml:lang="en">http://iay.org.uk/</OrganizationURL>
+    </Organization>
+    <ContactPerson contactType="support">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ukfed+fc2ee77e at iay.org.uk</EmailAddress>
+    </ContactPerson>
+    <ContactPerson contactType="technical">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ukfed+fc2ee77e at iay.org.uk</EmailAddress>
+    </ContactPerson>
+    <ContactPerson contactType="administrative">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ian at iay.org.uk</EmailAddress>
+    </ContactPerson>
+</EntityDescriptor>
diff --git a/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-good.xml b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-good.xml
new file mode 100644
index 0000000..826d926
--- /dev/null
+++ b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-good.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ds:KeyInfo
+    xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+    <ds:X509Data>
+        <ds:X509Certificate>
+            MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+            MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+            CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+            8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+            A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+            CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+            DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+            FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+            L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+            QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+            lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+            Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+            hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+            Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+            jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+            HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+            YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+            YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+        </ds:X509Certificate>
+    </ds:X509Data>
+</ds:KeyInfo>
diff --git a/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-gooditem.xml b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-gooditem.xml
new file mode 100644
index 0000000..29972b6
--- /dev/null
+++ b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidator-gooditem.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
+    xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport"
+    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+    xmlns:idpdisc="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol"
+    xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init"
+    xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"
+    xmlns:mdrpi="urn:oasis:names:tc:SAML:metadata:rpi"
+    xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui"
+    xmlns:remd="http://refeds.org/metadata"
+    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
+    xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
+    xmlns:ukfedlabel="http://ukfederation.org.uk/2006/11/label"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:metadata saml-schema-metadata-2.0.xsd
+        urn:oasis:names:tc:SAML:metadata:algsupport sstc-saml-metadata-algsupport-v1.0.xsd
+        urn:oasis:names:tc:SAML:metadata:attribute sstc-metadata-attr.xsd
+        urn:oasis:names:tc:SAML:metadata:rpi saml-metadata-rpi-v1.0.xsd
+        urn:oasis:names:tc:SAML:metadata:ui sstc-saml-metadata-ui-v1.0.xsd
+        urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol sstc-saml-idp-discovery.xsd
+        urn:oasis:names:tc:SAML:profiles:SSO:request-init sstc-request-initiation.xsd
+        urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd
+        urn:mace:shibboleth:metadata:1.0 shibboleth-metadata-1.0.xsd
+        http://ukfederation.org.uk/2006/11/label uk-fed-label.xsd
+        http://refeds.org/metadata refeds-metadata.xsd
+        http://www.w3.org/2001/04/xmlenc# xenc-schema.xsd
+        http://www.w3.org/2009/xmlenc11# xenc-schema-11.xsd
+        http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd"
+    ID="uk000006" entityID="https://idp2.iay.org.uk/idp/shibboleth">
+    <!--
+        This is an "Ian A. Young" IdP for Ian A. Young.
+    -->
+    <Extensions>
+        <ukfedlabel:UKFederationMember orgID="ukforg4590"/>
+        <shibmd:Scope regexp="false">iay.org.uk</shibmd:Scope>
+        <ukfedlabel:Software date="2023-06-20" fullVersion="5.0.0" name="Shibboleth" version="5"/>
+        <ukfedlabel:ExportOptIn date="2009-09-11"/>
+        <mdrpi:RegistrationInfo registrationAuthority="http://ukfederation.org.uk"
+            registrationInstant="2007-03-30T16:36:00Z">
+            <mdrpi:RegistrationPolicy xml:lang="en"
+                >http://ukfederation.org.uk/doc/mdrps-20130902</mdrpi:RegistrationPolicy>
+        </mdrpi:RegistrationInfo>
+        <mdattr:EntityAttributes xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
+            <saml:Attribute Name="http://macedir.org/entity-category-support"
+                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
+                <saml:AttributeValue>http://refeds.org/category/research-and-scholarship</saml:AttributeValue>
+            </saml:Attribute>
+        </mdattr:EntityAttributes>
+    </Extensions>
+    <IDPSSODescriptor
+        protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:mace:shibboleth:1.0 urn:oasis:names:tc:SAML:2.0:protocol">
+        <Extensions>
+            <mdui:UIInfo>
+                <mdui:DisplayName xml:lang="en">Ian A. Young</mdui:DisplayName>
+                <mdui:Description xml:lang="en">This is the identity provider for the iay.org.uk domain.</mdui:Description>
+                <mdui:Logo height="80" width="80">https://idp2.iay.org.uk/images/heads_80x80.jpg</mdui:Logo>
+                <mdui:Logo height="43" width="100">https://idp2.iay.org.uk/images/heads_100x43.jpg</mdui:Logo>
+                <mdui:Logo height="104" width="240">https://idp2.iay.org.uk/images/heads_240x104.jpg</mdui:Logo>
+            </mdui:UIInfo>
+            <mdui:DiscoHints>
+                <mdui:IPHint>217.155.173.104/29</mdui:IPHint>
+                <mdui:DomainHint>iay.org.uk</mdui:DomainHint>
+                <mdui:GeolocationHint>geo:55.9328,-3.17905</mdui:GeolocationHint>
+            </mdui:DiscoHints>
+        </Extensions>
+        <KeyDescriptor>
+            <ds:KeyInfo>
+                <ds:X509Data>
+                    <ds:X509Certificate>
+                        MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+                        MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+                        CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+                        8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+                        A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+                        CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+                        DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+                        FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+                        L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+                        QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+                        lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+                        Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+                        hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+                        Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+                        jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+                        HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+                        YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+                        YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+                    </ds:X509Certificate>
+                </ds:X509Data>
+            </ds:KeyInfo>
+        </KeyDescriptor>
+        <ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML1/SOAP/ArtifactResolution" index="1"/>
+        <ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML2/SOAP/ArtifactResolution" index="2"/>
+        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
+        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+        <SingleSignOnService Binding="urn:mace:shibboleth:1.0:profiles:AuthnRequest"
+            Location="https://idp2.iay.org.uk/idp/profile/Shibboleth/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/POST/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/POST-SimpleSign/SSO"/>
+        <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
+            Location="https://idp2.iay.org.uk/idp/profile/SAML2/Redirect/SSO"/>
+    </IDPSSODescriptor>
+    <AttributeAuthorityDescriptor
+        protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol">
+        <KeyDescriptor>
+            <ds:KeyInfo>
+                <ds:X509Data>
+                    <ds:X509Certificate>
+                        MIIDSTCCAjGgAwIBAgIhAMSPOSGN+3UUTXSKV+2EBOuF3x/pwPX/TD9GfyEkzLp+
+                        MA0GCSqGSIb3DQEBBQUAMFgxGDAWBgNVBAMMD2lkcDIuaWF5Lm9yZy51azETMBEG
+                        CgmSJomT8ixkARkWA2lheTETMBEGCgmSJomT8ixkARkWA29yZzESMBAGCgmSJomT
+                        8ixkARkWAnVrMB4XDTA4MDIyNTEwMzAxNFoXDTI4MDIyNTEwMzAxNFowWDEYMBYG
+                        A1UEAwwPaWRwMi5pYXkub3JnLnVrMRMwEQYKCZImiZPyLGQBGRYDaWF5MRMwEQYK
+                        CZImiZPyLGQBGRYDb3JnMRIwEAYKCZImiZPyLGQBGRYCdWswggEiMA0GCSqGSIb3
+                        DQEBAQUAA4IBDwAwggEKAoIBAQCb6ts48g10XHTnpy+23huzR184aahkrG0AoeUl
+                        FVlomPjoFDk6czq0S3Qyd+ceF7tMRu3XzS7cMmtVH53O9d+wCs8aPQcPXxHQ5gLk
+                        L7Gu6eJ+3N3jXhpt7/DDPhnzFPNW3EVMueHJ/0IzyspTvq2LPbNWXJ86NKJ+gesZ
+                        QftskwXScOjpoJEIP0EA890QYd4WdYtQPqVV+LPKtnYBoGOnuRhSAM1D/EhCbeb0
+                        lCmRGcdGbDFBchiPO4VLGl85sLa0EhjxMIPAOKXcj8bBlO9Ww9kkG06kQp6eLHwm
+                        Jmt7VNKveCGhyF2QH/CvmdUaPv3gcp1UjrlqFN9LBVSaTIL/AgMBAAEwDQYJKoZI
+                        hvcNAQEFBQADggEBAG+jDBAtlKoHaEBB+l6PpW5zuiDjyHG4zZZYqX77mZ9xP/xe
+                        Kn0yJ18ZLjS3b9WztGLYyC4SJHSF2okq1K02bqsCv9YeP+UWpw2uRR8jt96lLWxZ
+                        jTjoko2v8jBtzDk8LZsqw58m4vZ0AGNZjKeGIywKhxnepwREguyj3bjBpZAGgl0M
+                        HQuXoO/BDC9yKyZslE5CpWp5xP4XzY2/LrorrkwOJLnFuk1sox4/gvkDQukUx/jr
+                        YRbrWfOjcNBx3LE/HI6RNLINicK7yUwerDE86nix5Zc3hskVcCykW+r6HbY6bx7P
+                        YmNKYMZhQAgDtXIjFHOy+WbyVTidmJvxM9UeYCY=
+                    </ds:X509Certificate>
+                </ds:X509Data>
+            </ds:KeyInfo>
+        </KeyDescriptor>
+        <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML1/SOAP/AttributeQuery"/>
+        <AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+            Location="https://idp2.iay.org.uk:8443/idp/profile/SAML2/SOAP/AttributeQuery"/>
+        <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat>
+        <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
+    </AttributeAuthorityDescriptor>
+    <Organization>
+        <OrganizationName xml:lang="en">Ian A. Young</OrganizationName>
+        <OrganizationDisplayName xml:lang="en">Ian A. Young</OrganizationDisplayName>
+        <OrganizationURL xml:lang="en">http://iay.org.uk/</OrganizationURL>
+    </Organization>
+    <ContactPerson contactType="support">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ukfed+fc2ee77e at iay.org.uk</EmailAddress>
+    </ContactPerson>
+    <ContactPerson contactType="technical">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ukfed+fc2ee77e at iay.org.uk</EmailAddress>
+    </ContactPerson>
+    <ContactPerson contactType="administrative">
+        <GivenName>Ian</GivenName>
+        <SurName>Young</SurName>
+        <EmailAddress>mailto:ian at iay.org.uk</EmailAddress>
+    </ContactPerson>
+</EntityDescriptor>
diff --git a/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest-config.xml b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest-config.xml
new file mode 100644
index 0000000..936957a
--- /dev/null
+++ b/mda-framework/src/test/resources/net/shibboleth/metadata/validate/element/RejectMixedContentTextValidatorSpringTest-config.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:c="http://www.springframework.org/schema/c"
+    xmlns:p="http://www.springframework.org/schema/p"
+    xmlns:util="http://www.springframework.org/schema/util"
+    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/util http://www.springframework.org/schema/util/spring-util.xsd">
+
+    <import resource="classpath:net/shibboleth/metadata/beans.xml"/>
+
+    <bean parent="mda.IdentifiableBeanPostProcessor" lazy-init="false"/>
+
+    <bean id="String" abstract="true" class="java.lang.String"/>
+    <bean id="QName" abstract="true" class="javax.xml.namespace.QName"/>
+
+    <bean id="ds_namespace"         parent="String" c:_="http://www.w3.org/2000/09/xmldsig#"/>
+
+    <bean id="ds-KeyInfo"                     parent="QName" c:_0-ref="ds_namespace" c:_1="KeyInfo"/>
+
+    <bean id="stage" parent="mda.ElementValidationStage">
+        <property name="validators">
+            <list>
+                <bean parent="mda.RejectMixedContentTextValidator"/>
+            </list>
+        </property>
+        <property name="elementNames">
+            <set>
+                <ref bean="ds-KeyInfo"/>
+            </set>
+        </property>
+    </bean>
+
+</beans>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list