Skip to content

Commit

Permalink
Post-merge fixups
Browse files Browse the repository at this point in the history
See incommon/inc-meta#79.
  • Loading branch information
iay committed Aug 22, 2017
1 parent ad39a44 commit 858e5ce
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 55 deletions.
3 changes: 3 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,9 @@
<fileset dir="${tools.mda}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${tools.dir}/ukf-mda">
<include name="*.jar"/>
</fileset>
<fileset dir="${tools.dir}/xalan/lib">
<include name="sdss-xalan-md-*.jar"/>
</fileset>
Expand Down
2 changes: 1 addition & 1 deletion mdx/incommon/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Template for a stage used in each output pipeline which performs
final tweaks on the document.
-->
<bean id="incommon_finalise_parent" abstract="true" parent="XSLTransformationStage"
<bean id="incommon_finalise_parent" abstract="true" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:incommon/final_tweak.xsl">
<property name="transformParameters">
<map>
Expand Down
28 changes: 14 additions & 14 deletions mdx/incommon/edugain-policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
release mentioned there
-->
<bean id="edugainPolicy" parent="CompositeStage">
<bean id="edugainPolicy" parent="mda.CompositeStage">
<property name="composedStages">
<list>

Expand All @@ -60,7 +60,7 @@
This rule is executed first as a performance optimisation
so as to reduce the amount of metadata being processed.
-->
<bean id="removeInCommonEntities" parent="EntityRegistrationAuthorityFilterStage">
<bean id="removeInCommonEntities" parent="mda.EntityRegistrationAuthorityFilterStage">
<property name="designatedRegistrationAuthorities">
<list>
<ref bean="us_incommon_registrar"/>
Expand Down Expand Up @@ -120,22 +120,22 @@
All entity attributes on the Entity Attribute Blacklist.
-->
<bean id="entityAttributes" parent="EntityAttributeFilteringStage"
<bean id="entityAttributes" parent="mda.EntityAttributeFilteringStage"
p:whitelisting="false">
<property name="rules">
<list>
<!-- "registered by InCommon" entity category. -->
<bean parent="EntityCategoryMatcher"
<bean parent="mda.EntityCategoryMatcher"
c:category="http://id.incommon.org/category/registered-by-incommon"/>

<!-- InCommon Research and Scholarship category. -->
<bean parent="EntityCategoryMatcher"
<bean parent="mda.EntityCategoryMatcher"
c:category="http://id.incommon.org/category/research-and-scholarship"/>
<bean parent="EntityCategorySupportMatcher"
<bean parent="mda.EntityCategorySupportMatcher"
c:category="http://id.incommon.org/category/research-and-scholarship"/>

<!-- InCommon Bronze assurance certification. -->
<bean parent="MultiPredicateMatcher">
<bean parent="mda.MultiPredicateMatcher">
<property name="nameFormatPredicate">
<bean class="com.google.common.base.Predicates"
factory-method="equalTo"
Expand All @@ -157,7 +157,7 @@
</bean>

<!-- InCommon Silver assurance certification. -->
<bean parent="MultiPredicateMatcher">
<bean parent="mda.MultiPredicateMatcher">
<property name="nameFormatPredicate">
<bean class="com.google.common.base.Predicates"
factory-method="equalTo"
Expand Down Expand Up @@ -187,7 +187,7 @@
All extended XML elements and attributes
defined in namespaces not on the XML Namespace Whitelist.
-->
<bean id="whitelistImportedNamespaces" parent="NamespacesStrippingStage"
<bean id="whitelistImportedNamespaces" parent="mda.NamespacesStrippingStage"
p:whitelisting="true">
<property name="namespaces">
<set>
Expand Down Expand Up @@ -253,14 +253,14 @@
Mark entities with weak keys.
-->
<bean p:id="certificateValidation" parent="X509ValidationStage">
<bean p:id="certificateValidation" parent="mda.X509ValidationStage">
<property name="validators">
<list>
<!-- Error on RSA key length less than 2048 bits. -->
<bean parent="X509RSAKeyLengthValidator"
<bean parent="mda.X509RSAKeyLengthValidator"
p:warningBoundary="0" p:errorBoundary="2048"/>
<!-- Error on small RSA public exponents. -->
<bean parent="X509RSAExponentValidator"/>
<bean parent="mda.X509RSAExponentValidator"/>

<!--
Debian weak key blacklists.
Expand Down Expand Up @@ -308,7 +308,7 @@
Mark IdP entities that do not have a SAML2 SingleSignOnService endpoint
that supports the HTTP-Redirect binding.
-->
<bean id="check_idp_non_saml2" parent="XSLValidationStage"
<bean id="check_idp_non_saml2" parent="mda.XSLValidationStage"
p:XSLResource="classpath:incommon/check_idp_no_saml2.xsl"/>

<!--
Expand All @@ -317,7 +317,7 @@
Mark SP entities that do not have at least one SAML2 AssertionConsumerService
endpoint that supports the HTTP-POST binding.
-->
<bean id="check_sp_non_saml2" parent="XSLValidationStage"
<bean id="check_sp_non_saml2" parent="mda.XSLValidationStage"
p:XSLResource="classpath:incommon/check_sp_no_saml2.xsl"/>

<!--
Expand Down
22 changes: 12 additions & 10 deletions mdx/incommon/export.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
<import resource="classpath:incommon/beans.xml"/>
<import resource="classpath:incommon/export-whitelist.xml"/>

<bean id="serializeExported" parent="SerializationStage">
<bean id="serializeExported" parent="mda.SerializationStage">
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<bean parent="File">
<constructor-arg value="${inc.exported.xml}"/>
</bean>
</property>
Expand All @@ -34,7 +35,7 @@
<!--
Construct InCommon eduGAIN export aggregate.
-->
<bean id="export" parent="SimplePipeline">
<bean id="export" parent="mda.SimplePipeline">
<property name="stages">
<list>
<!--
Expand All @@ -43,7 +44,8 @@
In a production environment, this will be the *unsigned* aggregate,
so we perform minimal checking on its contents.
-->
<bean id="production_aggregate" parent="DOMResourceSourceStage">
<bean id="production_aggregate" parent="mda.DOMResourceSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="DOMResource">
<bean parent="FileSystemResource" c:_0="${inc.production.xml}"/>
</property>
Expand All @@ -53,7 +55,7 @@
<ref bean="disassemble"/>

<!-- Remove all but the entities we want to export. -->
<bean id="applyEntityWhitelist" parent="EntityFilterStage"
<bean id="applyEntityWhitelist" parent="mda.EntityFilterStage"
p:whitelistingEntities="true"
p:designatedEntities-ref="incommon_edugain_export_whitelist"/>

Expand All @@ -66,19 +68,19 @@
Note: this is temporary, until the REFEDS R&S category is present in
InCommon production metadata
-->
<bean id="rands_to_refeds" parent="XSLTransformationStage"
<bean id="rands_to_refeds" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:incommon/rands_to_refeds.xsl"/>

<!-- Filter the entity attributes released to eduGAIN. -->
<bean id="entityAttributes" parent="EntityAttributeFilteringStage">
<bean id="entityAttributes" parent="mda.EntityAttributeFilteringStage">
<property name="rules">
<list>
<!-- Permit REFEDS R&S category membership -->
<bean parent="EntityCategoryMatcher"
<bean parent="mda.EntityCategoryMatcher"
c:category="http://refeds.org/category/research-and-scholarship"/>

<!-- Permit REFEDS R&S category support -->
<bean parent="EntityCategorySupportMatcher"
<bean parent="mda.EntityCategorySupportMatcher"
c:category="http://refeds.org/category/research-and-scholarship"/>

</list>
Expand All @@ -99,7 +101,7 @@
</bean>

<!-- Normalise the use of namespace prefixes in the resulting XML document. -->
<bean id="normalise" parent="XSLTransformationStage"
<bean id="normalise" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:incommon/ns_norm_export.xsl"/>

<!-- Write the resulting aggregate out to a file. -->
Expand Down
38 changes: 21 additions & 17 deletions mdx/incommon/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
***********************************************************
-->

<bean id="common.output" parent="CompositeStage">
<bean id="common.output" parent="mda.CompositeStage">
<property name="composedStages">
<list>
<!-- Construct a new aggregate from the collection of entities. -->
<bean id="inc.assemble" parent="stage_parent"
class="net.shibboleth.metadata.dom.saml.EntitiesDescriptorAssemblerStage">
<bean id="inc.assemble" parent="mda.EntitiesDescriptorAssemblerStage">
<property name="itemOrderingStrategy">
<bean parent="inc.InCommonEntityOrderingStrategy"
c:_-ref="us_incommon_registrar"/>
Expand All @@ -64,7 +63,7 @@
</bean>

<!-- Normalise the use of namespace prefixes in the resulting XML document. -->
<bean id="normalise" parent="XSLTransformationStage"
<bean id="normalise" parent="mda.XSLTransformationStage"
p:XSLResource="classpath:incommon/ns_norm_import.xsl"/>
</list>
</property>
Expand All @@ -84,9 +83,10 @@
Writes the IdP-only aggregate out to a file.
-->
<bean id="idp.serialize" parent="SerializationStage">
<bean id="idp.serialize" parent="mda.SerializationStage">
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<bean parent="File">
<constructor-arg value="${inc.imported-idp.xml}"/>
</bean>
</property>
Expand All @@ -97,7 +97,7 @@
Entities in the IdP-only aggregate are restricted to identity providers.
-->
<bean id="idp.selector" parent="XPathItemSelectionStrategy">
<bean id="idp.selector" parent="mda.XPathItemSelectionStrategy">
<constructor-arg value="/md:EntityDescriptor[md:IDPSSODescriptor]"/>
<constructor-arg ref="commonNamespaces"/>
</bean>
Expand All @@ -108,7 +108,7 @@
Generates the IdP-only aggregate. The selector has already taken care
of removing non-IdP entities.
-->
<bean id="idp.pipeline" parent="SimplePipeline">
<bean id="idp.pipeline" parent="mda.SimplePipeline">
<property name="stages">
<list>
<!-- Perform common steps in constructing an output aggregate. -->
Expand All @@ -134,9 +134,10 @@
Writes the import aggregate out to a file.
-->
<bean id="serializeImported" parent="SerializationStage">
<bean id="serializeImported" parent="mda.SerializationStage">
<property name="serializer" ref="serializer"/>
<property name="outputFile">
<bean class="java.io.File">
<bean parent="File">
<constructor-arg value="${inc.imported.xml}"/>
</bean>
</property>
Expand All @@ -151,13 +152,14 @@
*************************************
-->

<bean id="incommon_edugain_importPipeline" parent="SimplePipeline">
<bean id="incommon_edugain_importPipeline" parent="mda.SimplePipeline">
<property name="stages">
<list>
<!--
Load the saved eduGAIN aggregate from a file.
-->
<bean id="edugain_aggregate" parent="DOMResourceSourceStage">
<bean id="edugain_aggregate" parent="mda.DOMResourceSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="DOMResource">
<bean parent="FileSystemResource" c:_0="${inc.edugain.xml}"/>
</property>
Expand Down Expand Up @@ -211,7 +213,7 @@
The main "import" pipeline is responsible for generating the
all-entities output aggregate.
-->
<bean id="import" parent="SimplePipeline">
<bean id="import" parent="mda.SimplePipeline">
<property name="stages">
<list>
<!--
Expand All @@ -220,7 +222,8 @@
In a production environment, this will be the *unsigned* aggregate,
so we perform minimal checking on its contents.
-->
<bean id="production_aggregate" parent="DOMResourceSourceStage">
<bean id="production_aggregate" parent="mda.DOMResourceSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="DOMResource">
<bean parent="FileSystemResource" c:_0="${inc.production.xml}"/>
</property>
Expand All @@ -235,7 +238,7 @@
before proceeding to avoid them overwriting the
new imported version.
-->
<bean id="keepInCommonEntities" parent="EntityRegistrationAuthorityFilterStage">
<bean id="keepInCommonEntities" parent="mda.EntityRegistrationAuthorityFilterStage">
<property name="designatedRegistrationAuthorities">
<list>
<ref bean="us_incommon_registrar"/>
Expand All @@ -253,7 +256,8 @@
<ref bean="populateRegistrationAuthorities"/>

<!-- Merge in selected entities from eduGAIN. -->
<bean id="mergeProductionMDXEntities" parent="PipelineMergeStage.deduplicate">
<bean id="mergeProductionMDXEntities" parent="mda.PipelineMergeStage"
p:collectionMergeStrategy-ref="deduplicateMergeStrategy">
<property name="mergedPipelines">
<list>
<ref bean="incommon_edugain_importPipeline"/>
Expand All @@ -262,7 +266,7 @@
</bean>

<!-- Fork new pipelines to generate special aggregates. -->
<bean id="demux" parent="PipelineDemultiplexerStage">
<bean id="demux" parent="mda.PipelineDemultiplexerStage">
<property name="pipelineAndSelectionStrategies">
<list>
<!-- IdP-only aggregate. -->
Expand Down
22 changes: 12 additions & 10 deletions mdx/incommon/mdq-multisign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@
<!--
Generate per-entity metadata.
-->
<bean id="mdq-multisign" parent="SimplePipeline">
<bean id="mdq-multisign" parent="mda.SimplePipeline">
<property name="stages">
<list>
<!--
Start with the unsigned production aggregate.
-->
<bean id="production_aggregate" parent="DOMResourceSourceStage">
<bean id="production_aggregate" parent="mda.DOMResourceSourceStage">
<property name="parserPool" ref="parserPool"/>
<property name="DOMResource">
<bean parent="FileSystemResource" c:_0="${mdq.input}"/>
</property>
Expand All @@ -57,15 +58,15 @@
<ref bean="populateItemIds"/>

<!-- Set ID, cacheDuration and validUntil attributes. -->
<bean parent="GenerateIdStage"/>
<bean parent="SetValidUntilStage" p:validityDuration="P14D"/>
<bean parent="mda.GenerateIdStage"/>
<bean parent="mda.SetValidUntilStage" p:validityDuration="P14D"/>

<!-- Identity transform fixes signing issues. -->
<bean parent="XSLTransformationStage"
<bean parent="mda.XSLTransformationStage"
p:XSLResource="classpath:identity.xsl"/>

<!-- Sign each item. -->
<bean id="perform.signature" parent="XMLSignatureSigningStage">
<bean id="perform.signature" parent="mda.XMLSignatureSigningStage">
<property name="privateKey">
<bean parent="PrivateKeyFactoryBean"
p:resource="${sign.keyResource}"
Expand All @@ -75,14 +76,15 @@
</bean>

<!-- Write individual entity documents to files. -->
<bean id="write.perentity" parent="MultiOutputSerializationStage">
<bean id="write.perentity" parent="mda.MultiOutputSerializationStage">
<property name="serializer" ref="serializer"/>
<property name="outputStrategy">
<bean parent="FilesInDirectoryMultiOutputStrategy" p:nameSuffix=".xml">
<bean parent="mda.FilesInDirectoryMultiOutputStrategy" p:nameSuffix=".xml">
<property name="directory">
<bean class="java.io.File" c:_="${mdq.output}"/>
<bean parent="File" c:_="${mdq.output}"/>
</property>
<property name="nameTransformer">
<bean parent="SHA1StringTransformer"/>
<bean parent="mda.SHA1StringTransformer"/>
</property>
</bean>
</property>
Expand Down
Loading

0 comments on commit 858e5ce

Please sign in to comment.