[java-metadata-aggregator] branch main updated: MDA-297 - Add wiki per-entity output example

Ian Young ian at iay.org.uk
Wed Oct 25 15:41:16 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=8e85313dff9744dfecac46ed62487b632c1a6a71

The following commit(s) were added to refs/heads/main by this push:
     new 8e85313  MDA-297 - Add wiki per-entity output example
8e85313 is described below

commit 8e85313dff9744dfecac46ed62487b632c1a6a71
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Oct 25 16:41:10 2023 +0100

    MDA-297 - Add wiki per-entity output example
    
    https://shibboleth.atlassian.net/browse/MDA-297
---
 doc/wiki/README.md      |  4 +++
 doc/wiki/per-entity.xml | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/doc/wiki/README.md b/doc/wiki/README.md
index 819e15b..0ad9343 100644
--- a/doc/wiki/README.md
+++ b/doc/wiki/README.md
@@ -22,6 +22,10 @@ with new releases by having test data available alongside them.
 
     `.../mda.sh sign-using-token.xml main`
 
+- [Per-entity Output](https://shibboleth.atlassian.net/wiki/spaces/MA1/pages/1502216310/Per-entity+Output)
+
+    `.../mda.sh per-entity.xml main`
+
 - [Generate Discovery Feed](https://shibboleth.atlassian.net/wiki/spaces/MA1/pages/1552614062/Generate+Discovery+Feed):
 
     `.../mda.sh discofeed.xml main`
diff --git a/doc/wiki/per-entity.xml b/doc/wiki/per-entity.xml
new file mode 100644
index 0000000..fc72658
--- /dev/null
+++ b/doc/wiki/per-entity.xml
@@ -0,0 +1,87 @@
+<?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">
+
+    <!-- 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.DOMFilesystemSourceStage">
+        <property name="id" value="source"/>
+        <property name="parserPool">
+            <bean class="net.shibboleth.shared.xml.impl.BasicParserPool" init-method="initialize"/>
+        </property>
+        <property name="source">
+            <bean class="java.io.File">
+                <constructor-arg value="path/to/input/aggregate.xml"/>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="disassembleEntitiesDescriptor" parent="mda.EntitiesDescriptorDisassemblerStage">
+        <property name="id" value="disassembleEntitiesDescriptor"/>
+    </bean>
+
+    <bean id="populateItemIds" parent="mda.EntityDescriptorItemIdPopulationStage">
+        <property name="id" value="populateItemIds"/>
+    </bean>
+
+    <bean id="generateContentReferenceId" parent="mda.GenerateIdStage">
+        <property name="id" value="generateContentReferenceId" />
+    </bean>
+
+    <bean id="signMetadata" parent="mda.XMLSignatureSigningStage">
+        <property name="id" value="signMetadata"/>
+        <property name="privateKey">
+            <bean class="net.shibboleth.shared.spring.security.factory.PrivateKeyFactoryBean">
+                <property name="resource">
+                    <bean class="org.springframework.core.io.FileSystemResource">
+                        <constructor-arg>
+                            <bean class="java.io.File">
+                                <constructor-arg value="path/to/secrets/private-key.pem"/>
+                            </bean>
+                        </constructor-arg>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="serialize" parent="mda.MultiOutputSerializationStage">
+        <property name="id" value="serializeIdPs"/>
+        <property name="serializer">
+            <bean id="domSerializer" parent="mda.DOMElementSerializer" />
+        </property>
+        <property name="outputStrategy">
+            <bean parent="mda.FilesInDirectoryMultiOutputStrategy">
+                <property name="nameSuffix" value=".xml"/>
+                <property name="namePrefix" value="_"/>
+                <property name="directory">
+                    <bean class="java.io.File">
+                        <constructor-arg value="path/to/output"/>
+                    </bean>
+                </property>
+                <property name="nameTransformer">
+                    <bean parent="mda.SHA1StringTransformer"/>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <!-- Next we define a pipeline with all the stages in it -->
+    <bean id="main" parent="mda.SimplePipeline" init-method="initialize">
+        <property name="id" value="main"/>
+        <property name="stages">
+            <list>
+                <ref bean="source"/>
+                <ref bean="disassembleEntitiesDescriptor"/>
+                <ref bean="populateItemIds"/>
+                <ref bean="generateContentReferenceId"/>
+                <ref bean="signMetadata"/>
+                <ref bean="serialize"/>
+            </list>
+        </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