Skip to content

Commit

Permalink
Implement new checking for duplicate IdP display names via a new stag…
Browse files Browse the repository at this point in the history
…e defined in ukf-mda 0.7.2.

This fixes the problem we were having with multi-language IdPs which didn't really have translations, adds ignoring of leading and trailing whitespace in comparisons, and clears bugzilla 803 (take mdui:DisplayName into account) and bugzilla 933 (perform case-insensitive comparisons) as well.
  • Loading branch information
iay committed Aug 24, 2013
1 parent 3fc273c commit 7177d95
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 12 deletions.
1 change: 1 addition & 0 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@
<ref bean="check_ukreg"/>
<ref bean="mdui_dn_en_present"/>
<ref bean="mdui_dn_en_match"/>
<ref bean="check_dup_display"/>

<!-- failure of any check on registered metadata is fatal -->
<ref bean="errorTerminatingFilter"/>
Expand Down
36 changes: 36 additions & 0 deletions mdx/uk/generate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@
p:id="uk_productionPipeline">
<property name="stages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="uk_assemble"/>
<ref bean="stripElabNamespace"/>
<ref bean="fixup_EncryptionMethod"/>
Expand Down Expand Up @@ -395,6 +401,12 @@
p:id="uk_wayfPipeline">
<property name="stages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="uk_assemble"/>
<ref bean="stripElabNamespace"/>
<ref bean="fixup_EncryptionMethod"/>
Expand Down Expand Up @@ -547,6 +559,12 @@
p:id="CDSAllPipeline">
<property name="stages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<!-- make an aggregate first so that we're only traversing one item -->
<ref bean="uk_assemble"/>

Expand Down Expand Up @@ -605,6 +623,12 @@
p:id="uk_fallbackPipeline">
<property name="stages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="uk_assemble"/>
<ref bean="fixup_EncryptionMethod"/>
<ref bean="performOtherFixups"/>
Expand Down Expand Up @@ -663,6 +687,12 @@
p:id="uk_testPipeline">
<property name="composedStages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="uk_assemble"/>
<ref bean="stripElabNamespace"/>
<ref bean="fixup_EncryptionMethod"/>
Expand Down Expand Up @@ -726,6 +756,12 @@
p:id="uk_exportPipeline">
<property name="stages">
<list>
<!--
Enforce IdP display name uniqueness before assembling aggregate
-->
<ref bean="check_dup_display"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="stripUkfedlabelNamespace"/>
<ref bean="stripWayfNamespace"/>
<ref bean="stripKeyNames"/>
Expand Down
53 changes: 41 additions & 12 deletions mdx/validation-beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,6 @@
</property>
</bean>

<!--
check_aggregate
-->
<bean id="check_aggregate" parent="XSLValidationStage"
p:id="check_aggregate">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['rulesdir'] }/check_aggregate.xsl"/>
</bean>
</property>
</bean>

<!--
check_bindings
-->
Expand Down Expand Up @@ -664,6 +652,47 @@
</property>
</bean>

<!--
*******************************************************
*** ***
*** C O L L E C T I O N C O N S I S T E N C Y ***
*** ***
*******************************************************
-->

<!--
These checks are for consistency across a collection of entities
rather than on each entity independently.
-->

<!--
check_aggregate
Checks for duplicate entityID values across a set of entities.
It is assumed that the entities are wrapped in a single EntitiesDescriptor.
-->
<bean id="check_aggregate" parent="XSLValidationStage"
p:id="check_aggregate">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['rulesdir'] }/check_aggregate.xsl"/>
</bean>
</property>
</bean>

<!--
check_dup_display
Checks for duplicate identity provider display names across a set of entities.
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:id="check_dup_display"
class="uk.org.ukfederation.mda.IdPDisplayNameDuplicateDetectingStage"/>

<!--
*********************************************
*** ***
Expand Down
Binary file removed tools/ukf-mda/ukf-mda-0.7.1.jar
Binary file not shown.
Binary file added tools/ukf-mda/ukf-mda-0.7.2.jar
Binary file not shown.

0 comments on commit 7177d95

Please sign in to comment.