Skip to content

Commit

Permalink
Add eduGAIN handling for fi_haka channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jun 27, 2012
1 parent c7c0b74 commit 74c101e
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 14 deletions.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,6 @@
<CHANNEL.import channel="ca_caf"/>
<CHANNEL.import channel="dk_wayf"/>
<CHANNEL.import channel="eu_clarin"/>
<CHANNEL.import channel="fi_haka"/>
<CHANNEL.import channel="fr_renater"/>
<CHANNEL.import channel="gr_grnet"/>
<CHANNEL.import channel="hu_eduid"/>
Expand Down Expand Up @@ -895,6 +894,7 @@
<CHANNEL.do verb="importProduction" channel="cz_eduid"/>
<CHANNEL.do verb="importProduction" channel="de_dfnaai"/>
<CHANNEL.do verb="importProduction" channel="es_sir"/>
<CHANNEL.do verb="importProduction" channel="fi_haka"/>
</target>

<!--
Expand All @@ -909,6 +909,7 @@
<CHANNEL.do verb="importEdugain" channel="cz_eduid"/>
<CHANNEL.do verb="importEdugain" channel="de_dfnaai"/>
<CHANNEL.do verb="importEdugain" channel="es_sir"/>
<CHANNEL.do verb="importEdugain" channel="fi_haka"/>
<CHANNEL.do verb="importEdugain" channel="hr_eduhr"/>
</target>

Expand Down
86 changes: 79 additions & 7 deletions mdx/fi_haka/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">

<!--
Location of various resources.
-->
<bean id="fi_haka_productionAggregate_url" class="java.lang.String">
<constructor-arg value="https://haka.funet.fi/metadata/haka-metadata.xml"/>
</bean>
<bean id="fi_haka_edugainAggregate_url" class="java.lang.String">
<constructor-arg value="https://haka.funet.fi/metadata/edugain-metadata.xml"/>
</bean>

<!--
Fetch the production aggregate.
-->
Expand All @@ -19,13 +29,26 @@
<property name="domResource">
<bean class="net.shibboleth.utilities.java.support.httpclient.HttpResource">
<constructor-arg name="client" ref="httpClient"/>
<constructor-arg name="url" value="https://haka.funet.fi/metadata/haka-metadata.xml"/>
<constructor-arg name="url" ref="fi_haka_productionAggregate_url"/>
</bean>
</property>
</bean>

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

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

<!--
Check signing signature.
Check federation signature.
-->
<bean id="fi_haka_checkSignature" parent="stage_parent"
class="net.shibboleth.metadata.dom.XMLSignatureValidationStage"
Expand All @@ -45,13 +68,32 @@
</bean>

<!--
Fetch and process the exported entities as a collection.
eduGAIN signing certificate.
-->
<bean id="fi_haka_edugainSigningCertificate" class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean">
<property name="certificateFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/fi_haka/edugain.crt"/>
</bean>
</property>
</bean>

<!--
Check eduGAIN signature.
-->
<bean id="fi_haka_exportedEntities" parent="composite_parent"
p:id="fi_haka_exportedEntities">
<bean id="fi_haka_checkEdugainSignature" parent="stage_parent"
class="net.shibboleth.metadata.dom.XMLSignatureValidationStage"
p:id="fi_haka_checkEdugainSignature">
<property name="verificationCertificate" ref="fi_haka_edugainSigningCertificate"/>
</bean>

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

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

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

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

<ref bean="disassemble"/>

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

<!--
Select primary export aggregate.
-->
<alias alias="fi_haka_exportedAggregate" name="fi_haka_edugainAggregate"/>
<alias alias="fi_haka_exportedEntities" name="fi_haka_edugainEntities"/>
</beans>
24 changes: 24 additions & 0 deletions mdx/fi_haka/edugain.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIIEzzCCA7egAwIBAgIQRhUu6g/c3iw668fWV9fdMTANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQG
EwJOTDEPMA0GA1UEChMGVEVSRU5BMRYwFAYDVQQDEw1URVJFTkEgU1NMIENBMB4XDTExMTIwMTAw
MDAwMFoXDTEzMTEzMDIzNTk1OVowgaExCzAJBgNVBAYTAkZJMRAwDgYDVQQIEwdGaW5sYW5kMQ4w
DAYDVQQHEwVFc3BvbzEvMC0GA1UEChMmQ1NDIC0gVGlldGVlbiB0aWV0b3Rla25paWthbiBrZXNr
dXMgT3kxHDAaBgNVBAsTE0NvbW1vbiBJQ1QgU2VydmljZXMxITAfBgNVBAMTGGhha2EtZWR1Z2Fp
bi1zaWduLmNzYy5maTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALM9FWCANSisI2az
TQ1q/PUaKfcZzSnRU1kegg898FDaerQjl25SLwMTKSATkXPzp5cGsq04vrYIE3wtfEY8CiFewP03
rkyIYns3BawMcposTcmK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3QLASQSHy7rw0/Dr2s7TqJTCfgqsgisBDFJkj2hJA=
-----END CERTIFICATE-----
35 changes: 29 additions & 6 deletions mdx/fi_haka/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="fi_haka_exportedEntities"/>
<ref bean="fi_haka_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="fi_haka_productionAggregate"/>
Expand All @@ -51,4 +51,27 @@
</property>
</bean>

<bean id="importEdugain" parent="pipeline_parent"
p:id="importEdugain">
<property name="stages">
<list>
<ref bean="fi_haka_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="fi_haka_edugainAggregate"/>
<ref bean="serializeImported"/>
</list>
</property>
</bean>

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

0 comments on commit 74c101e

Please sign in to comment.