Skip to content

Commit

Permalink
Add support for verifying SAML MD signed with the new MDQ signing key
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Nov 24, 2016
1 parent f39c4a0 commit e6bdfcb
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 4 deletions.
46 changes: 42 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@
-->

<!--
Verify a metadata file held on the master distribution site.
Verify a metadata file held on the master distribution site, using the ukfederation-2014.pem key
-->
<macrodef name="VFY.remote">
<attribute name="i"/>
Expand All @@ -1184,6 +1184,28 @@
<delete file="${temp.xml}" quiet="true" verbose="false"/>
</sequential>
</macrodef>

<!--
Verify a metadata file held on the master distribution site, using the ukfederation-mdq.pem key
-->
<macrodef name="VFY.MDQ.remote">
<attribute name="i"/>
<sequential>
<echo>Verifying @{i}...</echo>
<delete file="${temp.xml}" quiet="true" verbose="false"/>
<get src="@{i}" dest="${temp.xml}"/>

<!--
Verify using xmlsectool.
-->
<XMLSECTOOL.VFY.MDQ.uk i="${temp.xml}"/>

<!--
Delete the temporary file.
-->
<delete file="${temp.xml}" quiet="true" verbose="false"/>
</sequential>
</macrodef>

<!--
Verify a metadata file held on the master distribution site.
Expand Down Expand Up @@ -1301,9 +1323,9 @@
-->
<target name="samlmd.mdq.verify.remote">
<echo>Verifying MDQ held at ${mdq.dist.name}</echo>
<VFY.remote i="http://${mdq.dist.name}/entities"/>
<VFY.remote i="http://${mdq.dist.name}/entities/https%3A%2F%2Ftest-idp.ukfederation.org.uk%2Fidp%2Fshibboleth"/>
<VFY.remote i="http://${mdq.dist.name}/entities/https%3A%2F%2Ftest.ukfederation.org.uk%2Fentity"/>
<VFY.MDQ.remote i="http://${mdq.dist.name}/entities"/>
<VFY.MDQ.remote i="http://${mdq.dist.name}/entities/https%3A%2F%2Ftest-idp.ukfederation.org.uk%2Fidp%2Fshibboleth"/>
<VFY.MDQ.remote i="http://${mdq.dist.name}/entities/https%3A%2F%2Ftest.ukfederation.org.uk%2Fentity"/>
</target>


Expand Down Expand Up @@ -1665,6 +1687,22 @@
</XMLSECTOOL>
</sequential>
</macrodef>

<macrodef name="XMLSECTOOL.VFY.MDQ.uk">
<attribute name="i"/><!-- input file -->
<sequential>
<XMLSECTOOL i="@{i}">
<args>
<arg value="--verifySignature"/>
<arg value="--certificate"/>
<arg value="${mdx.dir}/uk/ukfederation-mdq.pem"/>
<!--
<arg value="- -quiet"/>
-->
</args>
</XMLSECTOOL>
</sequential>
</macrodef>

<!--
*******************************
Expand Down
31 changes: 31 additions & 0 deletions mdx/uk/ukfederation-mdq.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFTTCCAzWgAwIBAgIEXGA32DANBgkqhkiG9w0BAQsFADBQMSEwHwYDVQQDExhV
SyBmZWRlcmF0aW9uIE1EUSBTaWduZXIxHjAcBgNVBAoTFUppc2MgU2VydmljZXMg
TGltaXRlZDELMAkGA1UEBhMCR0IwHhcNMTYxMTIzMTgxNjU2WhcNMzcxMjMxMTgx
NjU2WjBQMSEwHwYDVQQDExhVSyBmZWRlcmF0aW9uIE1EUSBTaWduZXIxHjAcBgNV
BAoTFUppc2MgU2VydmljZXMgTGltaXRlZDELMAkGA1UEBhMCR0IwggIiMA0GCSqG
SIb3DQEBAQUAA4ICDwAwggIKAoICAQCI5H5i6x+PJrKQyfI8ALGEisMiHwQLUbzs
h2Sx8ssRkldAohR5CHp5qeMMpBDb1Pv9bBGppe+10oh2URYcPE+gBuajZT1dL8pg
jE7F3UUOJa+MXh9jBeDmoiCmXO8V8T4DWtQAA2ObbYPKynCZ6FaGsGV8N7GYUsMK
SXT3dfkbAzk6J7l4Top4gg4yZd6ELQwarLG5M5h0xnIIaoNSIspxTLTkIMDgJRo8
4VObLUriJwiLPzfHXAJxJdq+0AzHzhlDrg1hTtB82dOMGGyXZd4R6E6Aar8OrKa6
uz8OYWj8oeLzHGmzdw7dr+7WesO+4ofNksPh3lyG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