Skip to content

Commit

Permalink
Add eduGAIN handling for no_feide channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jun 27, 2012
1 parent ef6bbaa commit abc2715
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 17 deletions.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,6 @@
<CHANNEL.import channel="jp_gakunin"/>
<CHANNEL.import channel="lv_laife"/>
<CHANNEL.import channel="nl_surfconext"/>
<CHANNEL.import channel="no_feide"/>
<CHANNEL.import channel="nz_tuakiri"/>
<CHANNEL.import channel="se_swamid"/>
<CHANNEL.import channel="si_arnes"/>
Expand All @@ -895,6 +894,7 @@
<CHANNEL.do verb="importProduction" channel="hu_eduid"/>
<CHANNEL.do verb="importProduction" channel="it_idem"/>
<CHANNEL.do verb="importProduction" channel="nl_surfnet"/>
<CHANNEL.do verb="importProduction" channel="no_feide"/>
</target>

<!--
Expand All @@ -915,6 +915,7 @@
<CHANNEL.do verb="importEdugain" channel="hu_eduid"/>
<CHANNEL.do verb="importEdugain" channel="it_idem"/>
<CHANNEL.do verb="importEdugain" channel="nl_surfnet"/>
<CHANNEL.do verb="importEdugain" channel="no_feide"/>
</target>

<!--
Expand Down
91 changes: 89 additions & 2 deletions mdx/no_feide/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@
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="no_feide_edugainAggregate_url" class="java.lang.String">
<constructor-arg value="http://metadata.feide.no/feide-edugain-metadata.xml"/>
</bean>

<!--
Fetch the IdP metadata.
FEIDE is a hub-and-spoke federation with a single IdP. SP metadata is not published.
-->
<bean id="no_feide_idpMetadata" parent="domResourceStage_parent"
p:id="no_feide_idpMetadata">
Expand All @@ -24,11 +33,59 @@
</property>
</bean>

<!--
Fetch the prodiction aggregate.
There isn't one of these, so make one by wrapping the IdP metadata.
-->
<bean id="no_feide_productionAggregate" parent="pipeline_parent"
p:id="no_feide_productionAggregate">
<property name="stages">
<list>
<ref bean="no_feide_idpMetadata"/>
<ref bean="assemble"/>
</list>
</property>
</bean>

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

<!--
Signing certificate.
-->
<bean id="no_feide_signingCertificate" class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean">
<property name="certificateFile">
<bean class="java.io.File">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/no_feide/metadata.crt"/>
</bean>
</property>
</bean>

<!--
Check signing signature.
-->
<bean id="no_feide_checkSignature" parent="stage_parent"
class="net.shibboleth.metadata.dom.XMLSignatureValidationStage"
p:id="no_feide_checkSignature">
<property name="verificationCertificate" ref="no_feide_signingCertificate"/>
</bean>

<!--
Fetch and process the exported entities as a collection.
-->
<bean id="no_feide_exportedEntities" parent="composite_parent"
p:id="no_feide_exportedEntities">
<bean id="no_feide_productionEntities" parent="composite_parent"
p:id="no_feide_productionEntities">
<property name="composedStages">
<list>
<ref bean="no_feide_idpMetadata"/>
Expand All @@ -37,4 +94,34 @@
</property>
</bean>

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

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

<ref bean="disassemble"/>

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

<!--
Select primary export aggregate.
-->
<alias alias="no_feide_exportedAggregate" name="no_feide_edugainAggregate"/>
<alias alias="no_feide_exportedEntities" name="no_feide_edugainEntities"/>
</beans>
26 changes: 26 additions & 0 deletions mdx/no_feide/metadata.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----BEGIN CERTIFICATE-----
MIIEaDCCA1CgAwIBAgIJAIqK28Ft/k4fMA0GCSqGSIb3DQEBBQUAMH8xCzAJBgNV
BAYTAk5PMRIwEAYDVQQIEwlUcm9uZGhlaW0xEjAQBgNVBAcTCVRyb25kaGVpbTEQ
MA4GA1UEChMHVU5JTkVUVDEOMAwGA1UECxMFRmVpZGUxJjAkBgNVBAMTHW1ldGFk
YXRhLXNpZ25pbmcta2V5LmZlaWRlLm5vMB4XDTExMDUwNTA2MTM0MVoXDTIxMDUw
NDA2MTM0MVowfzELMAkGA1UEBhMCTk8xEjAQBgNVBAgTCVRyb25kaGVpbTESMBAG
A1UEBxMJVHJvbmRoZWltMRAwDgYDVQQKEwdVTklORVRUMQ4wDAYDVQQLEwVGZWlk
ZTEmMCQGA1UEAxMdbWV0YWRhdGEtc2lnbmluZy1rZXkuZmVpZGUubm8wggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCcKU4nXnyAnpV1ze7gPstxWOiG9CnC
lT40n6ahOQNzp/RVhSHvr44YU5+hjKUYyEDKIfth94d3Zso/ytDieVcTaMKlvJLC
rormiVIlcg/yQiXyAJSppScich/m1shUuOSiCWuO9wYF6IkIFXTT+kCTi8++s+iW
XG8brorsyiTW5ztU4PUZ+ZyrWowbKl6DMybI5C9djbkgqeRgbJeTen8JGASS0Ezp
YmuyHgmvy69X0cMr5a6fY2/f+bApiP/oPjr4AuoSASka4QQ8Fn0zWQfcIGAX+1iQ
nbkpzaurz5YRfB06PjPrpYpobJ011tDrJqggxLxPB4AqZSSW1pCLI8DvAgMBAAGj
geYwgeMwHQYDVR0OBBYEFAaysDNeH7PDb9Qoq7Jdm3D9gKbcMIGzBgNVHSMEgasw
gaiAFAaysDNeH7PDb9Qoq7Jdm3D9gKbcoYGEpIGBMH8xCzAJBgNVBAYTAk5PMRIw
EAYDVQQIEwlUcm9uZGhlaW0xEjAQBgNVBAcTCVRyb25kaGVpbTEQMA4GA1UEChMH
VU5JTkVUVDEOMAwGA1UECxMFRmVpZGUxJjAkBgNVBAMTHW1ldGFkYXRhLXNpZ25p
bmcta2V5LmZlaWRlLm5vggkAiorbwW3+Th8wDAYDVR0TBAUwAwEB/zANBgkqhkiG
9w0BAQUFAAOCAQEANcTJpNAeWg5R4PBBVvwNjCcpTCaMqpAXgNJMSCLIQrBHAQuT
M/3dMJeUzo303erIpOsX9gJdhvKq/Ii8hF4/+J7aQZMg1E9yLU5P6/zUqS22vpAe
DfVyIe38gTS3u67m3wSVjfp0THqIS7y6m+ID3KpeKFtdo1rSLFQBch/l+NivfIoU
VVEZWWGHtxMSC9PM+x655f29wxVyAe74c+585nM62FUCUXGtli1B81GU2i/g7ADa
Bv6Pp8GAajBToziaxSSsB0hmn6z0dxW1QsDlBKwPGr4e6BdRqnzqpUu5UPPVj4Z3
kUuV9JExHe7FRwcfxWcy3jyPpm2AUJmrHtYDFw==
-----END CERTIFICATE-----
44 changes: 30 additions & 14 deletions mdx/no_feide/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,48 @@
</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="no_feide_exportedEntities"/>
<ref bean="no_feide_productionEntities"/>
<ref bean="standardImportTail"/>
<ref bean="serializeImported"/>
</list>
</property>
</bean>

<!--
importRaw
Fetch the separate IdP and SP aggregates, disassemble them into individual entities
and then build up a single aggregate from all combined.
-->
<bean id="importRaw" parent="pipeline_parent"
p:id="importRaw">

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

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

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

0 comments on commit abc2715

Please sign in to comment.