Skip to content

Commit

Permalink
Add eduGAIN handling for ch_switchaai channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jun 27, 2012
1 parent dcf9408 commit 58f5e72
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 15 deletions.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@
<CHANNEL.import channel="at_aconet"/>
<CHANNEL.import channel="au_aaf"/>
<CHANNEL.import channel="ca_caf"/>
<CHANNEL.import channel="ch_switchaai"/>
<CHANNEL.import channel="de_dfnaai"/>
<CHANNEL.import channel="dk_wayf"/>
<CHANNEL.import channel="es_sir"/>
Expand Down Expand Up @@ -894,6 +893,7 @@
<target name="flow.importProduction.all">
<CHANNEL.do verb="importProduction" channel="be_belnet"/>
<CHANNEL.do verb="importProduction" channel="br_cafe"/>
<CHANNEL.do verb="importProduction" channel="ch_switchaai"/>
<CHANNEL.do verb="importProduction" channel="cz_eduid"/>
</target>

Expand All @@ -905,6 +905,7 @@
<target name="flow.importEdugain.all">
<CHANNEL.do verb="importEdugain" channel="be_belnet"/>
<CHANNEL.do verb="importEdugain" channel="br_cafe"/>
<CHANNEL.do verb="importEdugain" channel="ch_switchaai"/>
<CHANNEL.do verb="importEdugain" channel="cz_eduid"/>
<CHANNEL.do verb="importEdugain" channel="hr_eduhr"/>
</target>
Expand Down
88 changes: 80 additions & 8 deletions mdx/ch_switchaai/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,43 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">

<!--
Fetch the SWITCH production aggregate.
Location of various resources.
-->
<bean id="ch_switchaai_productionAggregate_url" class="java.lang.String">
<constructor-arg value="http://switch.ch/aai/federation/SWITCHaai/metadata.switchaai_signed.xml"/>
</bean>
<bean id="ch_switchaai_edugainAggregate_url" class="java.lang.String">
<constructor-arg value="http://metadata.aai.switch.ch/metadata.edugain.xml"/>
</bean>

<!--
Fetch the production aggregate.
-->
<bean id="ch_switchaai_productionAggregate" parent="domResourceStage_parent"
p:id="ch_switchaai_productionAggregate">
<property name="domResource">
<bean class="net.shibboleth.utilities.java.support.httpclient.HttpResource">
<constructor-arg name="client" ref="httpClient"/>
<constructor-arg name="url" value="http://switch.ch/aai/federation/SWITCHaai/metadata.switchaai_signed.xml"/>
<constructor-arg name="url" ref="ch_switchaai_productionAggregate_url"/>
</bean>
</property>
</bean>

<!--
SWITCH federation signing certificate.
Fetch the eduGAIN export aggregate.
-->
<bean id="ch_switchaai_edugainAggregate" parent="domResourceStage_parent"
p:id="ch_switchaai_edugainAggregate">
<property name="domResource">
<bean class="net.shibboleth.utilities.java.support.httpclient.HttpResource">
<constructor-arg name="client" ref="httpClient"/>
<constructor-arg name="url" ref="ch_switchaai_edugainAggregate_url"/>
</bean>
</property>
</bean>

<!--
Federation signing certificate.
-->
<bean id="ch_switchaai_signingCertificate" class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean">
<property name="certificateFile">
Expand All @@ -36,7 +59,18 @@
</bean>

<!--
Check against SWITCH signing signature.
Interfederation signing certificate.
-->
<bean id="ch_switchaai_interfedSigningCertificate" class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean">
<property name="certificateFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/ch_switchaai/interfed.crt"/>
</bean>
</property>
</bean>

<!--
Check against federation signature.
-->
<bean id="ch_switchaai_checkSignature" parent="stage_parent"
class="net.shibboleth.metadata.dom.XMLSignatureValidationStage"
Expand All @@ -45,13 +79,21 @@
</bean>

<!--
Fetch and process the exported entities as a collection.
Check against federation signature.
-->
<bean id="ch_switchaai_exportedEntities" parent="composite_parent"
p:id="ch_switchaai_exportedEntities">
<bean id="ch_switchaai_checkInterfedSignature" parent="stage_parent"
class="net.shibboleth.metadata.dom.XMLSignatureValidationStage"
p:id="ch_switchaai_checkInterfedSignature">
<property name="verificationCertificate" ref="ch_switchaai_interfedSigningCertificate"/>
</bean>

<!--
Fetch and process the production entities as a collection.
-->
<bean id="ch_switchaai_productionEntities" parent="composite_parent"
p:id="ch_switchaai_productionEntities">
<property name="composedStages">
<list>
<!-- no export aggregate; use the production one instead -->
<ref bean="ch_switchaai_productionAggregate"/>

<!--
Expand All @@ -70,4 +112,34 @@
</property>
</bean>

<!--
Fetch and process the eduGAIN export entities as a collection.
-->
<bean id="ch_switchaai_edugainEntities" parent="composite_parent"
p:id="ch_switchaai_edugainEntities">
<property name="composedStages">
<list>
<ref bean="ch_switchaai_edugainAggregate"/>

<!--
Check for fatal errors at the aggregate level:
missing or expired validUntil attribute
invalid signature
-->
<ref bean="check_validUntil"/>
<ref bean="ch_switchaai_checkInterfedSignature"/>
<ref bean="errorTerminatingFilter"/>

<ref bean="disassemble"/>

<ref bean="standardImportActions"/>
</list>
</property>
</bean>

<!--
Select primary export aggregate.
-->
<alias alias="ch_switchaai_exportedAggregate" name="ch_switchaai_edugainAggregate"/>
<alias alias="ch_switchaai_exportedEntities" name="ch_switchaai_edugainEntities"/>
</beans>
22 changes: 22 additions & 0 deletions mdx/ch_switchaai/interfed.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIEZDCCA0ygAwIBAgISSWITCHaaiIntFedMDSigner0MA0GCSqGSIb3DQEBBQUAMFYxCzAJBgNV
BAYTAkNIMQ8wDQYDVQQKEwZTV0lUQ0gxNjA0BgNVBAMTLVNXSVRDSGFhaSBJbnRlcmZlZGVyYXRp
b24gTWV0YWRhdGEgU2lnbmluZyBDQTAeFw0xMTA3MjYwNzAwMDBaFw0xNDA3MjYwNjU5NTlaMFIx
CzAJBgNVBAYTAkNIMQ8wDQYDVQQKEwZTV0lUQ0gxMjAwBgNVBAMTKVNXSVRDSGFhaSBJbnRlcmZl
ZGVyYXRpb24gTWV0YWRhdGEgU2lnbmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
jvrac+xDD+zxvIup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DFQ8uorfXC
04s74jy9zLnLlm0+2emLcV8UI34jydRiZlrl6XSn5gFD1Z7h6OrJ28dVkKab
-----END CERTIFICATE-----
35 changes: 29 additions & 6 deletions mdx/ch_switchaai/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
</property>
</bean>

<bean id="import" parent="pipeline_parent"
p:id="import">
<bean id="importProduction" parent="pipeline_parent"
p:id="importProduction">
<property name="stages">
<list>
<ref bean="ch_switchaai_exportedEntities"/>
<ref bean="ch_switchaai_productionEntities"/>
<ref bean="standardImportTail"/>
<ref bean="serializeImported"/>
</list>
</property>
</bean>

<bean id="importRaw" parent="pipeline_parent"
p:id="importRaw">
<bean id="importProductionRaw" parent="pipeline_parent"
p:id="importProductionRaw">
<property name="stages">
<list>
<ref bean="ch_switchaai_productionAggregate"/>
Expand All @@ -51,4 +51,27 @@
</property>
</bean>

<bean id="importEdugain" parent="pipeline_parent"
p:id="importEdugain">
<property name="stages">
<list>
<ref bean="ch_switchaai_edugainEntities"/>
<ref bean="standardImportTail"/>
<ref bean="serializeImported"/>
</list>
</property>
</bean>

<bean id="importEdugainRaw" parent="pipeline_parent"
p:id="importEdugainRaw">
<property name="stages">
<list>
<ref bean="ch_switchaai_edugainAggregate"/>
<ref bean="serializeImported"/>
</list>
</property>
</bean>

<alias alias="import" name="importEdugain"/>
<alias alias="importRaw" name="importEdugainRaw"/>
</beans>

0 comments on commit 58f5e72

Please sign in to comment.