<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.6.5 (Ruby 2.6.8) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5280 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml">
<!ENTITY RFC7515 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>


<rfc ipr="trust200902" docName="draft-santesson-svt-xml-03" category="info" submissionType="independent" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title>XML Signature Validation Token</title>

    <author initials="S." surname="Santesson" fullname="Stefan Santesson">
      <organization abbrev="IDsec Solutions">IDsec Solutions AB</organization>
      <address>
        <postal>
          <street>Forskningsbyn Ideon</street>
          <city>Lund</city>
          <code>223 70</code>
          <country>SE</country>
        </postal>
        <email>sts@aaa-sec.com</email>
      </address>
    </author>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security">Vigil Security, LLC</organization>
      <address>
        <postal>
          <street>516 Dranesville Road</street>
          <city>Herndon, VA</city>
          <code>20170</code>
          <country>US</country>
        </postal>
        <email>housley@vigilsec.com</email>
      </address>
    </author>

    <date year="2022" month="March" day="21"/>

    <area>Security</area>
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document defines a XML profile for the Signature Validation Token defined in <xref target="SVT"/>.</t>



    </abstract>



  </front>

  <middle>


<section anchor="intro"><name>Introduction</name>

<t>The "Signature Validation Token" specification <xref target="SVT"/> defines the basic token to support signature validation in a way that can significantly extend the lifetime of a signature.</t>

<t>This specification defines a profile for implementing SVT with a signed XML document, and defines the following aspects of SVT usage:</t>

<t><list style="symbols">
  <t>How to include reference data related to XML signatures and XML documents in an SVT.</t>
  <t>How to add an SVT token to a XML signature.</t>
</list></t>

<t>XML documents can have any number of signature elements, signing an arbitrary number of fragments of XML documents. The actual signature element may be included in the signed XML document (enveloped), include the signed data (enveloping) or may be separate from the signed content (detached).</t>

<t>To provide a generic solution for any type of XML signature an SVT is added to each XML signature element within the XML signature &lt;ds:Object&gt; element.</t>

</section>
<section anchor="defs"><name>Definitions</name>

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.</t>

<t>The definitions in <xref target="SVT"/> apply also to this document.</t>

<section anchor="notation"><name>Notation</name>

<section anchor="ref-to-xml-elements"><name>References to XML Elements from XML Schemas</name>

<t>When referring to elements from the W3C XML Signature namespace
(http://www.w3.org/2000/09/xmldsig#) the following syntax is used:</t>

<t><list style="symbols">
  <t>&lt;ds:Signature&gt;</t>
</list></t>

<t>When referring to elements from the ETSI XAdES XML Signature namespace
(http://uri.etsi.org/01903/v1.3.2#) the following syntax is used:</t>

<t><list style="symbols">
  <t>&lt;xades:CertDigest&gt;</t>
</list></t>

<t>When referring to elements defined in this specification
(http://id.swedenconnect.se/svt/1.0/sig-prop/ns) the following syntax is used:</t>

<t><list style="symbols">
  <t>&lt;svt:Element&gt;</t>
</list></t>

</section>
</section>
</section>
<section anchor="svt-in-xml"><name>SVT in XML Documents</name>

<t>When SVT is provided for XML signatures then one SVT MUST be provided for each XML signature.</t>

<t>An SVT embedded within the XML signature element MUST be placed in a  &lt;svt:SignatureValidationToken&gt; element as defined in <xref target="signaturevalidationtoken-signature-property"/>.</t>

<section anchor="signaturevalidationtoken-signature-property"><name>SignatureValidationToken Signature Property</name>

<t>The &lt;svt:SignatureValidationToken&gt; element MUST be placed in a &lt;ds:SignatureProperty&gt; element in accordance with <xref target="XMLDSIG11"/>. The &lt;ds:SignatureProperty&gt; element MUST be placed inside a &lt;ds:SignatureProperties&gt; element inside a &lt;ds:Object&gt; element inside a &lt;ds:Signature&gt; element.</t>

<t>Note: <xref target="XMLDSIG11"/> requires the Target attribute to be present in &lt;ds:SignatureProperty&gt;, referencing the signature targeted by this signature property. If an SVT is added to a signature that do not have an Id attribute, implementations SHOULD add an Id attribute to the &lt;ds:Signature&gt; element and reference that Id in the Target attribute. This Id attribute and Target attribute value matching is required by the <xref target="XMLDSIG11"/> standard, but it is redundant in the context of SVT validation as the SVT already contains information that uniquely identifies the target signature. Validation applications SHOULD not reject an SVT token because of Id and Target attribute mismatch, and MUST rely on matching against signature using signed information in the SVT itself.</t>

<t>The &lt;svt:SignatureValidationToken&gt; element is defined by the following XML Schema:</t>

<figure><artwork><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    targetNamespace="http://id.swedenconnect.se/svt/1.0/sig-prop/ns"
    xmlns:svt="http://id.swedenconnect.se/svt/1.0/sig-prop/ns">

  <xs:element name="SignatureValidationToken"
      type="svt:SignatureValidationTokenType" />

  <xs:complexType name="SignatureValidationTokenType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

</xs:schema>
]]></artwork></figure>

<t>The SVT token MUST be included as a string representation of the SVT JWT. Note that this is the string representation of the JWT without further encoding. The SVT MUST NOT be represented by the Base64 encoded bytes of the JWT string.</t>

<t>Example:</t>

<figure><artwork><![CDATA[
<ds:Signature Id="MySignatureId">
  ...
  <ds:Object>
    <ds:SignatureProperties>
      <ds:SignatureProperty Target="#MySignatureId">
        <svt:SignatureValidationToken>
              eyJ0eXAiOiJKV1QiLCJhb...2aNZ
        </svt:SignatureValidationToken>
      </ds:SignatureProperty>
    </ds:SignatureProperties>
  </ds:Object>
</ds:Signature>
]]></artwork></figure>

</section>
<section anchor="multiple-svt-tokens"><name>Multiple SVT in a signature</name>

<t>If a new SVT is stored in a signature which already contains a previously issued SVT, implementations can choose to either replace the existing SVT or to store the new SVT in addition to the existing SVT.</t>

<t>If the new SVT is stored in addition to the old SVT, it SHOULD be stored in a new &lt;ds:SignatureProperty&gt; element inside the existing &lt;ds:SignatureProperties&gt; element where the old SVT is located.</t>

<t>For interoperability robustness, signature validation applications MUST be able to handle signatures where the new SVT is located in a new &lt;ds:Object&gt; element.</t>

</section>
</section>
<section anchor="svt-claims"><name>SVT Claims</name>

<section anchor="profile-identifier"><name>Profile Identifer</name>

<t>When this profile is used the SigValidation object MUST contain a "profile" claim with the value "XML".</t>

</section>
<section anchor="signature-reference-data"><name>Signature Reference Data</name>

<t>The SVT Signature object MUST contain a "sig_ref" claim (SigReference object) with the following elements:</t>

<t><list style="symbols">
  <t>"id" -- The Id-attribute of the XML signature, if present.</t>
  <t>"sig_hash" -- The hash over the signature value bytes.</t>
  <t>"sb_hash" -- The hash over the canonicalized &lt;ds:SignedInfo&gt; element (the bytes the XML signature algorithm has signed to generated the signature value).</t>
</list></t>

</section>
<section anchor="signed-data-reference"><name>Signed Data Reference Data</name>

<t>The SVT Signature object MUST contain one instance of the "sig_data" claim (SignedData object) for each &lt;ds:Reference&gt; element in the &lt;ds:SignedInfo&gt; element. The "sig_data" claim MUST contain the following elements:</t>

<t><list style="symbols">
  <t>"ref" -- The value of the URI attribute of the corresponding &lt;ds:Reference&gt; element.</t>
  <t>"hash" -- The hash of all bytes identified corresponding &lt;ds:Reference&gt; element after applying all identified canonicalization and transformation algorithms. These are the same bytes that is hashed by the hash value in the &lt;ds:DigestValue&gt; element inside the &lt;ds:Reference&gt; element.</t>
</list></t>

</section>
<section anchor="signer-certificate-references"><name>Signer Certificate References</name>

<t>The SVT Signature object MUST contain a "signer_cert_ref" claim (CertReference object). The "type" parameter of the "signer_cert_ref" claim MUST be either "chain" or "chain_hash".</t>

<t><list style="symbols">
  <t>The "chain" type MUST be used when signature validation was performed using one or more certificates where some or all of the certificates in the chain are not present in the target signature.</t>
  <t>The "chain_hash" type MUST be used when signature validation was performed using one or more certificates where all of the certificates are present in the target signature.</t>
</list></t>

</section>
</section>
<section anchor="jose-header"><name>JOSE Header</name>

<section anchor="svt-signing-key-reference"><name>SVT Signing Key Reference</name>

<t>The SVT JOSE header must contain one of the following header parameters in accordance with <xref target="RFC7515"/>, for storing a reference to the public key used to verify the signature on the SVT:</t>

<t><list style="symbols">
  <t>"x5c" -- Holds an X.509 certificate <xref target="RFC5280"/> or a chain of certificates. The certificate holding the public key that verifies the signature on the SVT MUST be the first certificate in the chain.</t>
  <t>"kid" -- A key identifier holding the Base64 encoded hash value of the certificate that can verify the signature on the SVT. The hash algorithm MUST be the same hash algorithm used when signing the SVT as specified by the <spanx style="verb">alg</spanx> header parameter.</t>
</list></t>

</section>
</section>
<section anchor="iana"><name>IANA Considerations</name>

<t>This document has no IANA actions.</t>

</section>
<section anchor="seccons"><name>Security Considerations</name>

<t>The security considerations of <xref target="SVT"/> applies also to this document.</t>

</section>


  </middle>

  <back>


    <references title='Normative References'>

&RFC2119;
&RFC5280;
&RFC7515;
&RFC8174;
<reference anchor="XMLDSIG11" >
  <front>
    <title>XML Signature Syntax and Processing Version 1.1</title>
    <author initials="D." surname="Eastlake" fullname="Donald Eastlake">
      <organization></organization>
    </author>
    <author initials="J." surname="Reagle" fullname="Joseph Reagle">
      <organization></organization>
    </author>
    <author initials="D." surname="Solo" fullname="David Solo">
      <organization></organization>
    </author>
    <author initials="F." surname="Hirsch" fullname="Frederick Hirsch">
      <organization></organization>
    </author>
    <author initials="M." surname="Nystrom" fullname="Magnus Nystrom">
      <organization></organization>
    </author>
    <author initials="T." surname="Roessler" fullname="Thomas Roessler">
      <organization></organization>
    </author>
    <author initials="K." surname="Yiu" fullname="Kelvin Yiu">
      <organization></organization>
    </author>
    <date year="2013" month="April" day="11"/>
  </front>
  <seriesInfo name="W3C" value="Proposed Recommendation"/>
</reference>
<reference anchor="SVT" >
  <front>
    <title>Signature Validation Token</title>
    <author initials="S." surname="Santesson" fullname="Stefan Santesson">
      <organization></organization>
    </author>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization></organization>
    </author>
    <date year="2021" month="September"/>
  </front>
  <seriesInfo name="IETF" value="draft-santesson-svt-02"/>
</reference>


    </references>




  </back>

<!-- ##markdown-source:
H4sIAKHUOGIAA7Va+3PbNhL+nX8Fhp7pJDMmJTlJ06h1WtePixw/Ustx03tM
DyIhCTVFqARoWedx//bbXQB8SPIjN3P5oaUI7GIfH75dgI6iKDDSZKLPvpye
sKGc5NyUhWBXPJMpN1Ll7FJdizxIVZLzGcxLCz42kea5EVqrPNI3JrqdZVH3
VQACMGGnu7MDv6KdXpDAi4kqln0m87EKdDmaSa1B6eVyLvBlKuYC/pObIJDz
os9MUWqz0+2+6+4EvBC8z4YiKQtplsG1WC5UkfbZAFYucmGiA7QkCLThefo7
z1QOKnMVzGWf/cOoZJtpVZhCjDU8LWf48K8g4KWZqqIfsChg8E/mGtaI2dD7
Q2+tp0MjxjxfGVLFBEw40CJhQ5WVGCHN9n6mMT4aFeJmbZjGNFgiTJ8dqUJf
5zKf6NEyZ4NUOL0J+NhnJ2We2p8qBQvCnZ1X7G03dK/K3GAsh4f0W8y4zPqg
WP/EOY9gyThRs6Dl2UXMPqhSZ2LZ8Oui1Lr1mny6khOZVeHeZicn+y2n2uMt
n970vmWQjFzoG5llgl0onjac+gDpSlW+za72Gr7tdHtvu23HPg+bjk2thT/d
4MKVd7kqZoDLGwEpZBdH+zu93jv3+Gbnu657fPum98Y9ftd7+xofAd8Hw8Hf
er0+LeJQH7ZhP1zmht8yABT7VKgE0g6ZYleiQNCyXtyzqahABP9stF28D2J2
yLXJ+LVwr23ID1TOs7Q91hI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