Skip to content

Commit

Permalink
Experimental import flow for SWITCH.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Apr 29, 2011
1 parent b68d985 commit 95a390c
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,23 @@
<echo>Completed SWAMID import flow.</echo>
</target>

<!--
*********************************************
*** ***
*** S W I T C H F E D E R A T I O N ***
*** ***
*********************************************
-->

<property name="switch.dir" value="${mdx.dir}/switch"/>

<target name="flow.switch.import">
<echo>Running SWITCH import flow.</echo>
<MDA config="${switch.dir}/switch-import.xml" out="${switch.dir}/imported.xml"/>
<CHECK.imported i="${switch.dir}/imported.xml"/>
<echo>Completed SWITCH import flow.</echo>
</target>

<!--
*************************************************
*** ***
Expand Down
17 changes: 17 additions & 0 deletions mdx/switch/metadata.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE-----
MIICrzCCAhgCAQAwDQYJKoZIhvcNAQEEBQAwgZ8xCzAJBgNVBAYTAkNIMUAwPgYD
VQQKEzdTV0lUQ0ggLSBUZWxlaW5mb3JtYXRpa2RpZW5zdGUgZnVlciBMZWhyZSB1
bmQgRm9yc2NodW5nMQwwCgYDVQQLEwNBQUkxIjAgBgNVBAMTGVNXSVRDSGFhaSBN
ZXRhZGF0YSBTaWduZXIxHDAaBgkqhkiG9w0BCQEWDWFhaUBzd2l0Y2guY2gwHhcN
MDUwODAzMTEyMjUxWhcNMTUwODAxMTEyMjUxWjCBnzELMAkGA1UEBhMCQ0gxQDA+
BgNVBAoTN1NXSVRDSCAtIFRlbGVpbmZvcm1hdGlrZGllbnN0ZSBmdWVyIExlaHJl
IHVuZCBGb3JzY2h1bmcxDDAKBgNVBAsTA0FBSTEiMCAGA1UEAxMZU1dJVENIYWFp
IE1ldGFkYXRhIFNpZ25lcjEcMBoGCSqGSIb3DQEJARYNYWFpQHN3aXRjaC5jaDCB
nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsmyBYNZ8mKYutdyQShzuOgnVxDP1
UBZE+57S2ORZg1qi4JExOJEPnviHuh6HEajljhAMGHxr656paDpfXkmGq/Ybk3xm
Xy2FTnFGpjFpZUV6dY/oJ82rve27C/NVcwZw2nYRl5C5aCCgx/QlWsBTw+997214
1+wBDH7dXlJ+UGkCAwEAATANBgkqhkiG9w0BAQQFAAOBgQCcLuNwTINkfhBlVCIu
TixR1R6mYu/+4KUJWtHlRCOUZhSLFept8HxEvfwnuX9xm+Q6Ju/sOgmI1INuSstU
GWwVy0AbpCphUDDmIh9A85ye8DrVaBHQrj5b/JEjCvkY0zhLJzgDzZ6btT40TuCn
k2GpdAClu5SyCTiy56+zDYqPqg==
-----END CERTIFICATE-----
37 changes: 37 additions & 0 deletions mdx/switch/switch-beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Common beans for SWITCH operations.
-->
<beans xmlns="http://www.springframework.org/schema/beans" 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-3.0.xsd">

<!--
Fetch the SWITCH metadata aggregate. For the moment, use the production aggregate in lieu
of a designated export aggregate.
-->
<bean id="fetchSwitchExportAggregate" class="net.shibboleth.metadata.dom.stage.DomHttpSourceStage">
<property name="id" value="fetchSwitchExportAggregate"/>
<property name="parserPool" ref="parserPool"/>
<property name="sourceUrl" value="http://switch.ch/aai/federation/SWITCHaai/metadata.switchaai_signed.xml"/>
</bean>

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

<bean id="checkSwitchSignature" class="net.shibboleth.metadata.dom.stage.XMLSignatureValidationStage">
<property name="id" value="checkSwitchSignature"/>
<property name="verificationCertificate" ref="switchSigningCertificate"/>
<property name="postProcessFilter">
<bean class="uk.org.ukfederation.mda.ErrorAnnouncingFilteringStrategy"/>
</property>
</bean>

</beans>
34 changes: 34 additions & 0 deletions mdx/switch/switch-import.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Import pipeline for metadata from SWITCH.
-->
<beans xmlns="http://www.springframework.org/schema/beans" 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-3.0.xsd">

<!--
Import commonly used beans.
-->
<import resource="../common-beans.xml"/>

<!--
Import SWITCH-specific beans.
-->
<import resource="switch-beans.xml"/>

<bean id="pipeline" class="net.shibboleth.metadata.pipeline.SimplePipeline">
<property name="id" value="pipeline"/>
<property name="stages">
<list>
<ref bean="fetchSwitchExportAggregate"/>
<ref bean="checkSwitchSignature"/>
<ref bean="cleanImport"/>
<ref bean="disassemble"/>
<ref bean="checkSchemas"/>
<ref bean="assemble"/>
</list>
</property>
</bean>

<bean id="serializer" class="net.shibboleth.metadata.dom.DomMetadataSerializer"/>

</beans>

0 comments on commit 95a390c

Please sign in to comment.