[java-metadata-aggregator] branch main updated: MDA-297 - Add and update filter-aggregate example
Ian Young
ian at iay.org.uk
Mon Oct 23 09:50:57 UTC 2023
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=6866d67ff06eb8c302239a6f3228aac93677fa40
The following commit(s) were added to refs/heads/main by this push:
new 6866d67 MDA-297 - Add and update filter-aggregate example
6866d67 is described below
commit 6866d67ff06eb8c302239a6f3228aac93677fa40
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Mon Oct 23 10:50:52 2023 +0100
MDA-297 - Add and update filter-aggregate example
https://shibboleth.atlassian.net/browse/MDA-297
---
doc/wiki/filter-aggregate.xml | 151 +++++++++++++++++++++++++++
doc/wiki/path/to/input/ukfederation-2014.pem | 23 ++++
2 files changed, 174 insertions(+)
diff --git a/doc/wiki/filter-aggregate.xml b/doc/wiki/filter-aggregate.xml
new file mode 100644
index 0000000..b0e2456
--- /dev/null
+++ b/doc/wiki/filter-aggregate.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans default-init-method="initialize"
+ xmlns="http://www.springframework.org/schema/beans" 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-3.0.xsd">
+
+ <bean id="httpClientBuilder" class="net.shibboleth.shared.httpclient.HttpClientBuilder"/>
+ <bean id="httpClient" factory-bean="httpClientBuilder" factory-method="buildClient"/>
+
+ <!-- Import the Standard bean definition resource. -->
+ <!-- See https://shibboleth.atlassian.net/wiki/spaces/MA1/pages/3162439683/Standard+bean+definition+resource -->
+ <import resource="classpath:net/shibboleth/metadata/beans.xml"/>
+
+ <!-- First, we define the stages for our pipeline -->
+
+ <bean id="source" parent="mda.DOMResourceSourceStage">
+ <property name="id" value="source"/>
+ <property name="parserPool">
+ <bean class="net.shibboleth.shared.xml.impl.BasicParserPool" init-method="initialize"/>
+ </property>
+ <property name="DOMResource">
+ <bean class="net.shibboleth.shared.spring.httpclient.resource.HTTPResource">
+ <constructor-arg ref="httpClient"/>
+ <constructor-arg
+ value="http://metadata.ukfederation.org.uk/ukfederation-metadata.xml"/>
+ </bean>
+ </property>
+ </bean>
+
+ <!--
+ Validate the signature on an aggregate. If the signature is not
+ present or cannot be validated, this will add an Error status to
+ the item. This will not by itself result in processing being
+ terminated.
+ -->
+ <bean id="validateSignature" parent="mda.XMLSignatureValidationStage">
+ <property name="id" value="validateSignature"/>
+ <property name="verificationCertificate">
+ <bean class="net.shibboleth.shared.spring.security.factory.X509CertificateFactoryBean">
+ <property name="resource">
+ <bean class="org.springframework.core.io.FileSystemResource">
+ <constructor-arg>
+ <bean class="java.io.File">
+ <constructor-arg value="path/to/input/ukfederation-2014.pem"/>
+ </bean>
+ </constructor-arg>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <!--
+ errorAnnouncer
+
+ A pipeline stage that logs any errors present,
+ but takes no action on them.
+ -->
+ <bean id="errorAnnouncer" parent="mda.StatusMetadataLoggingStage">
+ <property name="id" value="errorAnnouncer"/>
+ <property name="selectionRequirements">
+ <list>
+ <value>#{T(net.shibboleth.metadata.ErrorStatus)}</value>
+ </list>
+ </property>
+ </bean>
+
+ <!--
+ errorTerminator
+
+ This pipeline stage causes CLI termination if any item is marked with an error status.
+ -->
+ <bean id="errorTerminator" parent="mda.ItemMetadataTerminationStage">
+ <property name="id" value="errorTerminator"/>
+ <property name="selectionRequirements">
+ <list>
+ <value>#{T(net.shibboleth.metadata.ErrorStatus)}</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="removeEntities" parent="mda.EntityFilterStage">
+ <property name="id" value="removeEntities"/>
+ <property name="designatedEntities">
+ <list>
+ <value>https://idp.example.com/idp/shibboleth</value>
+ <value>https://issues.example.com/shibboleth</value>
+ <value>https://wiki.example.com/shibboleth</value>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="removeRoles" parent="mda.EntityRoleFilterStage">
+ <property name="id" value="removeRoles"/>
+ <property name="whitelistingRoles" value="true"/>
+ <property name="designatedRoles">
+ <list>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:oasis:names:tc:SAML:2.0:metadata"/>
+ <constructor-arg value="IDPSSODescriptor"/>
+ </bean>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:oasis:names:tc:SAML:2.0:metadata"/>
+ <constructor-arg value="AttributeAuthorityDescriptor"/>
+ </bean>
+ <bean class="javax.xml.namespace.QName">
+ <constructor-arg value="urn:oasis:names:tc:SAML:2.0:metadata"/>
+ <constructor-arg value="SPSSODescriptor"/>
+ </bean>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="removeInvalidContactPerson" parent="mda.ContactPersonFilterStage">
+ <property name="id" value="removeInvalidContactPerson"/>
+ <property name="whitelistingTypes" value="false"/>
+ </bean>
+
+ <bean id="removeOrganization" parent="mda.RemoveOrganizationStage">
+ <property name="id" value="removeOrganization"/>
+ </bean>
+
+ <bean id="serialize" parent="mda.SerializationStage">
+ <property name="id" value="serializeIdPs"/>
+ <property name="outputFile">
+ <bean class="java.io.File">
+ <constructor-arg value="path/to/output/output.xml"/>
+ </bean>
+ </property>
+ <property name="serializer">
+ <bean id="domSerializer" parent="mda.DOMElementSerializer"/>
+ </property>
+ </bean>
+
+ <!-- Next we define a pipeline with all the stages in it -->
+ <bean id="main" parent="mda.SimplePipeline">
+ <property name="id" value="main"/>
+ <property name="stages">
+ <list>
+ <ref bean="source"/>
+ <ref bean="validateSignature"/>
+ <ref bean="errorAnnouncer"/>
+ <ref bean="errorTerminator"/>
+ <ref bean="removeEntities"/>
+ <ref bean="removeRoles"/>
+ <ref bean="removeInvalidContactPerson"/>
+ <ref bean="removeOrganization"/>
+ <ref bean="serialize"/>
+ </list>
+ </property>
+ </bean>
+</beans>
diff --git a/doc/wiki/path/to/input/ukfederation-2014.pem b/doc/wiki/path/to/input/ukfederation-2014.pem
new file mode 100644
index 0000000..bee705c
--- /dev/null
+++ b/doc/wiki/path/to/input/ukfederation-2014.pem
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIIDxzCCAq+gAwIBAgIJAOwuoY8tsvYGMA0GCSqGSIb3DQEBCwUAMHoxCzAJBgNV
+BAYTAkdCMUMwQQYDVQQKDDpVSyBBY2Nlc3MgTWFuYWdlbWVudCBGZWRlcmF0aW9u
+IGZvciBFZHVjYXRpb24gYW5kIFJlc2VhcmNoMSYwJAYDVQQDDB1VSyBGZWRlcmF0
+aW9uIE1ldGFkYXRhIFNpZ25lcjAeFw0xNDA4MjYxMjIwMjhaFw0zNzEyMzExMjIw
+MjhaMHoxCzAJBgNVBAYTAkdCMUMwQQYDVQQKDDpVSyBBY2Nlc3MgTWFuYWdlbWVu
+dCBGZWRlcmF0aW9uIGZvciBFZHVjYXRpb24gYW5kIFJlc2VhcmNoMSYwJAYDVQQD
+DB1VSyBGZWRlcmF0aW9uIE1ldGFkYXRhIFNpZ25lcjCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAOqtfMvCmBuQudC4/jZFPYkHDNHFyp1FA3KJihIUXppF
+vrecrO2wG5CpyqB1mZ+MlKf4jKcTMGBIXC2klD+FyrEdJMBhO6vRmJnNphg3uNZM
+ks0NqIaZmtgc7e8435nMhqLHV95UK2oCLcT4gZrTaXa2vt9kukTOijB0KqDIfEG5
+369EHXPItApAEeMlHebbWndl5n2I16nya/LeaoiU9qJ6sVz4xd1UtUesewrmYVKg
+PA2JYEpovmnr13sTnGssai5Db/FkrE2NJ4Q4drbPYcwincUo/UXzrtuPclr+l3JE
+gjtvDzPrBxxvK0S/gARrbKz5tk4LDLkYsj4PKlwVS+UCAwEAAaNQME4wHQYDVR0O
+BBYEFE9HhBuMxrzBYOj1Kj/3gtzAgtUEMB8GA1UdIwQYMBaAFE9HhBuMxrzBYOj1
+Kj/3gtzAgtUEMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBALJkjT3K
+QL3w3xNfVe27nEOY44K2AZiu4IhqmRSslcyMnhnxrovEhLL3ieKFXQ+QFIkzVdR5
+BcO3NrSIz5V6b+mHtr5IjqLFHzOzzjw/3i8LddGOsApJiav+JrU1CGJXCU4cwYDN
+hAyfuAlrrEEL2lWMU1L1ZTzHsG1yWTfukfuvTftY5BwZ/dgANgIWwLDhvL6CAQZ3
+g5XteFPyChU0Z7b3XAHdVNHDa2VzWSsSUDtSQZ9DyTuqSjZH1q2/qtdMcrbJpdMB
+cndOf1pZRLzb6a+akIYi//1qO48HpB4wouH9gS3ZER+rNBhVWu301UYxoVI7o8mG
+Yq7dENJce7lO9yE=
+-----END CERTIFICATE-----
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list