Skip to content

Commit

Permalink
Separate out definitions of UKF beans
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed May 1, 2017
1 parent 4fdc93b commit 3120210
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 28 deletions.
16 changes: 5 additions & 11 deletions mdx/common-beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
-->
<import resource="mda-beans.xml"/>

<!--
Pick up UK federation MDA beans.
-->
<import resource="ukf-beans.xml"/>

<!--
***********************************
*** ***
Expand Down Expand Up @@ -140,17 +145,6 @@
<bean id="X509CertificateFactoryBean" abstract="true"
class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean"/>

<!-- *** Parent beans for ukf-mda. *** -->

<bean id="EntityAttributeAddingStage" abstract="true" parent="stage_parent"
class="uk.org.ukfederation.mda.dom.saml.mdattr.EntityAttributeAddingStage"/>

<bean id="SAMLStringElementCheckingStage" abstract="true" parent="stage_parent"
class="uk.org.ukfederation.mda.dom.saml.SAMLStringElementCheckingStage"/>

<bean id="X509ConsistentNameValidator" abstract="true" parent="mda.validator_parent"
class="uk.org.ukfederation.mda.validate.X509ConsistentNameValidator"/>

<!-- *** Default Shibboleth component bean id property from Spring bean id *** -->
<bean class="net.shibboleth.ext.spring.config.IdentifiableBeanPostProcessor" lazy-init="false"/>

Expand Down
17 changes: 7 additions & 10 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</bean>
</property>
<property name="sourceFileFilter">
<bean class="uk.org.ukfederation.mda.RegexFileFilter">
<bean parent="ukf.RegexFileFilter">
<constructor-arg value="uk\d{6}.xml"/>
</bean>
</property>
Expand Down Expand Up @@ -182,8 +182,7 @@
Checks that entities are owned by UK federation members.
-->
<bean id="check_owner" parent="stage_parent"
class="uk.org.ukfederation.mda.dom.saml.EntityOwnerCheckingStage"
<bean id="check_owner" parent="ukf.EntityOwnerCheckingStage"
p:members-ref="uk_members"/>

<!--
Expand Down Expand Up @@ -241,8 +240,7 @@
<!--
Populate UKId values from entities.
-->
<bean id="uk_populateIds" parent="stage_parent"
class="uk.org.ukfederation.mda.EntityDescriptorUKIdPopulationStage"/>
<bean id="uk_populateIds" parent="ukf.EntityDescriptorUKIdPopulationStage"/>


<!--
Expand All @@ -253,7 +251,7 @@
<bean id="uk_assemble" parent="mda.EntitiesDescriptorAssemblerStage">
<property name="descriptorName" ref="uk_federation_uri"/>
<property name="itemOrderingStrategy">
<bean class="uk.org.ukfederation.mda.UKEntityOrderingStrategy"/>
<bean parent="ukf.UKEntityOrderingStrategy"/>
</property>
</bean>

Expand All @@ -278,8 +276,7 @@
<!--
Inject scopes "pushed" to entities from the members.xml file.
-->
<bean id="scopes_inject" parent="stage_parent"
class="uk.org.ukfederation.mda.dom.saml.ScopeInjectionStage"
<bean id="scopes_inject" parent="ukf.ScopeInjectionStage"
p:members-ref="uk_members"/>

<ref bean="populateItemIds"/>
Expand All @@ -303,7 +300,7 @@
<property name="selectedItemPipeline">
<bean id="selectedItemPipeline" parent="mda.SimplePipeline">
<property name="stages">
<bean id="addHideFromDiscovery" parent="EntityAttributeAddingStage"
<bean id="addHideFromDiscovery" parent="ukf.EntityAttributeAddingStage"
p:attributeValue="http://refeds.org/category/hide-from-discovery"
p:addingFirstChild="true"/>
</property>
Expand Down Expand Up @@ -335,7 +332,7 @@
<!-- Error on small RSA public exponents. -->
<bean parent="mda.X509RSAExponentValidator"/>
<!-- Error on inconsistent subjectAltNames. -->
<bean parent="X509ConsistentNameValidator"/>
<bean parent="ukf.X509ConsistentNameValidator"/>

<!--
Debian weak key blacklists.
Expand Down
2 changes: 1 addition & 1 deletion mdx/uk/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
<!-- Error on small RSA public exponents. -->
<bean parent="mda.X509RSAExponentValidator"/>
<!-- Error on inconsistent subjectAltNames. -->
<bean parent="X509ConsistentNameValidator"/>
<bean parent="ukf.X509ConsistentNameValidator"/>

<!--
Debian weak key blacklists.
Expand Down
99 changes: 99 additions & 0 deletions mdx/ukf-beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:c="http://www.springframework.org/schema/c"
xmlns:context="http://www.springframework.org/schema/context"
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/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

<!--
Bean definitions for simplified access to components in the
ukf-mda artifact.
All defined bean names are prefixed with "ukf.".
-->

<!--
Parent for anything based on the Shibboleth component system.
These all require initialization before use.
-->
<bean id="ukf.component_parent" abstract="true"
init-method="initialize" destroy-method="destroy"/>

<!--
Parent for all stages.
-->
<bean id="ukf.stage_parent" abstract="true" parent="ukf.component_parent"/>

<!--
uk.org.ukfederation.mda
-->

<bean id="ukf.EntityDescriptorUKIdPopulationStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.EntityDescriptorUKIdPopulationStage"/>

<bean id="ukf.IdPDisplayNameDuplicateDetectingStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.IdPDisplayNameDuplicateDetectingStage"/>

<bean id="ukf.RegexFileFilter" abstract="true"
class="uk.org.ukfederation.mda.RegexFileFilter"/>

<bean id="ukf.UKEntityOrderingStrategy" abstract="true"
class="uk.org.ukfederation.mda.UKEntityOrderingStrategy"/>

<bean id="ukf.UKEntitySelectionStrategy" abstract="true"
class="uk.org.ukfederation.mda.UKEntitySelectionStrategy"/>

<bean id="ukf.UKItemIdentificationStrategy" abstract="true"
class="uk.org.ukfederation.mda.UKItemIdentificationStrategy"/>

<!--
uk.org.ukfederation.mda.dom
-->

<!--
uk.org.ukfederation.mda.dom.saml
-->

<bean id="ukf.EntityOwnerCheckingStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.dom.saml.EntityOwnerCheckingStage"/>

<bean id="ukf.SAMLStringElementCheckingStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.dom.saml.SAMLStringElementCheckingStage"/>

<bean id="ukf.ScopeInjectionStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.dom.saml.ScopeInjectionStage"/>

<!--
uk.org.ukfederation.mda.dom.saml.mdattr
-->

<bean id="ukf.EntityAttributeAddingStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.dom.saml.mdattr.EntityAttributeAddingStage"/>

<!--
uk.org.ukfederation.mda.statistics
-->

<bean id="ukf.StatisticsVelocityStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.statistics.StatisticsVelocityStage"/>

<!--
uk.org.ukfederation.mda.validate
-->

<bean id="ukf.X509ConsistentNameValidator" abstract="true" parent="ukf.component_parent"
class="uk.org.ukfederation.mda.validate.X509ConsistentNameValidator"/>

<!--
uk.org.ukfederation.mda.validate.mdui
-->

<bean id="ukf.IPHintValidationStage" abstract="true" parent="ukf.stage_parent"
class="uk.org.ukfederation.mda.validate.mdui.IPHintValidationStage"/>

</beans>
10 changes: 4 additions & 6 deletions mdx/validation-beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@
Checks for the mdui:IPHint element.
-->
<bean id="check_mdui_iphint" parent="stage_parent"
class="uk.org.ukfederation.mda.validate.mdui.IPHintValidationStage"
<bean id="check_mdui_iphint" parent="ukf.IPHintValidationStage"
p:checkingNetworks="true"/>

<!--
Expand Down Expand Up @@ -408,9 +407,8 @@
It is assumed that the entities are independently represented as EntityDescriptor
items in the item collection.
-->
<bean id="check_dup_display" parent="stage_parent"
p:identificationStrategy-ref="identificationStrategy"
class="uk.org.ukfederation.mda.IdPDisplayNameDuplicateDetectingStage"/>
<bean id="check_dup_display" parent="ukf.IdPDisplayNameDuplicateDetectingStage"
p:identificationStrategy-ref="identificationStrategy"/>


<!--
Expand Down Expand Up @@ -581,7 +579,7 @@
<!--
check_saml_strings
-->
<bean id="check_saml_strings" parent="SAMLStringElementCheckingStage">
<bean id="check_saml_strings" parent="ukf.SAMLStringElementCheckingStage">
<property name="elementNames">
<set>
<ref bean="md-Company"/>
Expand Down

0 comments on commit 3120210

Please sign in to comment.