Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Permit blacklisting of InCommon-registered entities
Browse files Browse the repository at this point in the history
See incommon/inc-meta#90.
  • Loading branch information
iay committed Oct 31, 2018
1 parent 45b936f commit 726d180
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,13 @@
-->
<property name="mda.inc.edugain.xml" value="${mda.incdir}/edugain.xml"/>

<!--
Default local file location from which to acquire the InCommon
entity blacklist.
-->
<property name="mda.inc.entity.blacklist"
value="classpath:incommon/incommon-blacklist.xml"/>

<!--
inc.fetch.production
Expand Down
18 changes: 18 additions & 0 deletions mdx/incommon/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
-->
<import resource="classpath:us_incommon/beans.xml"/>

<!--
Acquire the InCommon entity blacklist. This defaults to a
file contained within the repository, but can be overridden by
the mda.inc.entity.blacklist property (which shows up here
as inc.entity.blacklist).
-->
<import resource="${inc.entity.blacklist}"/>

<!--
finalise_parent
Expand All @@ -32,4 +40,14 @@
</property>
</bean>

<!--
remove_blacklisted_incommon_entities
Discard entities included in the InCommon entity blacklist.
-->
<bean id="remove_blacklisted_incommon_entities"
parent="mda.EntityFilterStage"
p:whitelistingEntities="false"
p:designatedEntities-ref="incommon_entity_blacklist"/>

</beans>
8 changes: 8 additions & 0 deletions mdx/incommon/import.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@
</property>
</bean>

<!--
Discard entities in the InCommon entity blacklist.
Because this is done _after_ the eduGAIN merge, the
named entities will be removed whatever their source.
-->
<ref bean="remove_blacklisted_incommon_entities"/>

<!-- Fork new pipelines to generate special aggregates. -->
<bean id="demux" parent="mda.PipelineDemultiplexerStage">
<property name="pipelineAndSelectionStrategies">
Expand Down
37 changes: 37 additions & 0 deletions mdx/incommon/incommon-blacklist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
default-lazy-init="true"
xmlns:c="http://www.springframework.org/schema/c"
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/util http://www.springframework.org/schema/util/spring-util.xsd">

<!--
*************************************************************
*** ***
*** I N C O M M O N E N T I T Y B L A C K L I S T ***
*** ***
*************************************************************
-->

<!--
The entities named in this set will be discarded from the
collection sourced from the InCommon Federation Manager.
The location of this file is defaulted to the version within
the repository, but may be overridden by setting the
mda.inc.entity.blacklist property.
-->
<util:set id="incommon_entity_blacklist">

<!-- Nothing in this example file. -->
<!--
<value>https://example.edu/entity</value>
-->

</util:set>

</beans>
3 changes: 3 additions & 0 deletions mdx/incommon/mdq-multisign-cloudhsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<!-- Populate ItemId with the entityID. -->
<ref bean="populateItemIds"/>

<!-- Discard entities in the InCommon entity blacklist. -->
<ref bean="remove_blacklisted_incommon_entities"/>

<!-- Set ID, cacheDuration and validUntil attributes. -->
<bean parent="mda.GenerateIdStage"/>
<bean parent="mda.SetValidUntilStage" p:validityDuration="P14D"/>
Expand Down
3 changes: 3 additions & 0 deletions mdx/incommon/mdq-multisign-localkey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<!-- Populate ItemId with the entityID. -->
<ref bean="populateItemIds"/>

<!-- Discard entities in the InCommon entity blacklist. -->
<ref bean="remove_blacklisted_incommon_entities"/>

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

0 comments on commit 726d180

Please sign in to comment.