<?xml version='1.0' encoding='UTF-8'?>

<!-- draft submitted in xml v3 -->

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

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
category="std" 
docName="draft-ietf-sidrops-rpki-ta-tiebreaker-02"
ipr="trust200902" 
xml:lang="en" 
sortRefs="true" 
submissionType="IETF" 
consensus="true" 
updates="8630"
obsoletes=""
symRefs="true" 
tocInclude="true"
version="3">

  <front>
    <title abbrev="Tiebreaking RPKI Trust Anchors">
      Tiebreaking Resource Public Key Infrastructure (RPKI) Trust Anchors
    </title>

    <author fullname="Job Snijders" initials="J." surname="Snijders">
      <organization abbrev="BSD">BSD Software Development</organization>
      <address>
        <postal>
         <postalLine>Amsterdam</postalLine>
         <postalLine>The Netherlands</postalLine>
        </postal>
        <email>job@bsd.nl</email>
        <uri>https://www.bsd.nl</uri>
      </address>
    </author>

    <author fullname="Theo Buehler" initials="T." surname="Buehler">
      <organization>OpenBSD</organization>
      <address>
        <postal>
          <country>CH</country>
        </postal>
        <email>tb@openbsd.org</email>
      </address>
    </author>

    <author fullname="Ties de Kock" initials="T." surname="de Kock">
      <organization>RIPE NCC</organization>
      <address>
        <postal>
          <city>Amsterdam</city>
          <country>Netherlands</country>
        </postal>
        <email>tdekock@ripe.net</email>
      </address>
    </author>

    <date/>

    <area>Operations and Management Area (OPS)</area>
    <workgroup>SIDROPS</workgroup> 

    <keyword>RPKI</keyword>
    <keyword>Routing Security</keyword>
    <keyword>BGP</keyword>
    <keyword>X.509</keyword>

    <abstract>
    <t>
        A Trust Anchor (TA) in the RPKI is represented by a self-signed X.509 Certification Authority (CA) certificate.
        Over time, Relying Parties (RP) may have acquired multiple different issuances of valid TA certificates from the same TA operator.
        This document proposes a tiebreaking scheme to be used by RPs to select one TA certificate for certification path validation.
        This document updates RFC 8630.
      </t>
    </abstract>
  </front>
  <middle>

    <section anchor="intro">
      <name>Introduction</name>
      <t>
        In the Resource Public Key Infrastructure (RPKI) hierarchical structure, a Trust Anchor (TA) is an authority for which trust is assumed and not derived.
        TA operators periodically reissue TA certificates to update the validity period (<xref target="RFC5280" section="4.1.2.5"/>), the Subject Information Access (SIA) extension (<xref target="RFC5280" section="4.2.2.2"/>, Certificate Policies extension (<xref target="RFC5280" section="4.2.1.4"/>), and the Internet Number Resources (INR) (<xref target="RFC3779"/>).
      </t>
      <t>
        Relying Parties periodically fetch TA certificates from online locations and verify that the key of the self-signed certificate matches the key embedded in its associated Trust Anchor Locator (TAL) <xref target="RFC8630"/>.
        This transfer may happen via an unauthenticated channel, and the certificate is verified by checking that it is signed by the public key in the TAL.
        After retrieving a TA certificate Relying Parties have a choice between using a previously retrieved locally cached copy of the TA certificate and the newly-retrieved instance of the TA certificate, provided that both certificates are valid.
      </t>
      <t>
        Periodic reissuance of TA certificates is a way of ensuring that the RPKI remains healthy at its root by avoiding ossification and retaining agility, consequently RPs re-fetch the certificates to adopt changes in the TA's INR <xref target="RFC3779" sectionFormat="bare"/> and SIA <xref target="RFC5280" sectionFormat="bare"/> extensions.
        In the past, some TA certificates were issued with unreasonably long validity periods, in some cases up to a century.
        Since TA certificates are the root, and thus have no Certificate Revocation List (<xref target="RFC5280" sectionFormat="bare"/>) covering their own scope, TA operators cannot revoke previously issued TA certificates.
        This means that an on-path adversary or caching network element could present Relying Parties with an older instance of the TA certificate than the TA operator intends Relying Parties to use.
      </t>
      <t>
        This document specifies a tiebreaking scheme for Relying Parties, preferring (1) the 'more recently' issued TA certificate, (2) the TA certificate with the shortest validity period among certificates with equal notBefore, and (3) the 'most recently fetched' instance of the TA certificate among certificates with equal notBefore and equal notAfter.
        This establishes a preorder over TA certificates issued by the same TA, permitting the issuance of a certificate that is preferred over any previous certificate.
      </t>

      <section anchor="reqs-lang">
        <name>Requirements Language</name>
        <t>
          The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
        </t>
       </section>

      <section anchor="Related">
        <name>Related Work</name>
        <t>
          It is assumed that the reader is familiar with the terms and concepts described in "<xref target="RFC5280" format="title"/>" <xref target="RFC5280" format="default"/> and "<xref target="RFC6481" format="title"/>" <xref target="RFC6481" format="default"/>.
        </t>
      </section>

    </section>

    <section>
    <name>Updates to RFC 8630</name>
      <t>
        This section updates <xref target="RFC8630"/>.
      </t>
      <ul spacing="normal">
        <li>
          <t>In Section <xref target="RFC8630" section="3" sectionFormat="bare"/>, this paragraph is replaced as follows.</t>
          <t>OLD</t>
          <blockquote>
            <ol>
              <li>
                Retrieve the object referenced by (one of) the TA URI(s) contained in the TAL.
              </li>
              <li>
                Confirm that the retrieved object is a current, self-signed RPKI CA certificate that conforms to the profile as specified in <xref target="RFC6487"/>.
              </li>
              <li>
                Confirm that the public key in the TAL matches the public key in the retrieved object.
              </li>
              <li>
                Perform other checks, as deemed appropriate (locally), to ensure that the RP is willing to accept the entity publishing this self-signed CA certificate to be a TA.
                These tests apply to the validity of attestations made in the context of the RPKI relating to all resources described in the INR extension(s) of this certificate.
              </li>
            </ol>
          </blockquote>
          <t>NEW</t>
          <blockquote>
            <ol>
              <li>
                Retrieve the object referenced by (one of) the TA URI(s) contained in the TAL.
                If this step fails, use the locally cached copy of the TA referenced by the TAL previously retrieved.
              </li>
              <li>
                Confirm that the retrieved object is a current, validly self-signed RPKI CA certificate that conforms to the profile as specified in <xref target="RFC6487"/>.
                If this step fails, use the locally cached copy of the retrieved TA.
              </li>
              <li>
                Confirm that the public key in the TAL matches the public key in the retrieved object.
                If this step fails, use the locally cached copy of the retrieved TA.
              </li>
              <li>
                Check whether the retrieved object has a more recent notBefore than the locally cached copy of the retrieved TA.
                If the notBefore of the retrieved object is less recent, use the locally cached copy of the retrieved TA.
              </li>
              <li>
                If the notBefore dates are equal, check whether the retrieved object has a shorter validity period than the locally cached copy of the retrieved TA.
                If the validity period of the retrieved object is longer, use the locally cached copy of the retrieved TA.
              </li>
              <li>
                If the validity period is equal, and the newly-retrieved certificate differs from the cached copy, use the newly-retrieved certificate.
                In the unlikely event that this step is reached, it seems most likely that TA operators intend for RPs to use the certificate that is currently published.
              </li>
            </ol>
          </blockquote>
        </li>
      </ul>
    </section>

    <section anchor="security">
      <name>Security Considerations</name>
      <t>
        When Relying Parties inadvertently use a different instance of the TA certificate than that which the TA operator intended for RPs to use, the certification path validation process will yield an unexpected outcome.
        Some examples of unexpected outcomes are validation failures, or replay attacks.
        Standardization of a tiebreaking scheme helps both RP and TA operators arrive at deterministic outcomes.
        The proposed tiebreaking scheme prevents RPs from accepting a previous certificate presented by an on-path adversary in the presence of other TA certificate material.
      </t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>
        This document has no IANA actions.
      </t>
    </section>

  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3779.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6481.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6487.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8630.xml"/>
      </references>

      <references>
        <name>Informative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7942.xml"/>

        <reference anchor="rpki-client" target="https://www.rpki-client.org/">
          <front>
            <title>rpki-client 9.1</title>
            <author fullname="Claudio Jeker"/>
            <author fullname="Job Snijders"/>
            <author fullname="Kristaps Dzonsons"/>
            <author fullname="Theo Buehler"/>
            <date month="June" year="2024" />
          </front>
        </reference>

        <reference anchor="rpki-prover" target="https://github.com/lolepezy/rpki-prover/pull/218">
          <front>
            <title>rpki-prover</title>
            <author fullname="Mikhail Puzanov"/>
            <date month="August" year="2024" />
          </front>
        </reference>

      </references>

    </references>

    <section removeInRFC="true">
      <name>Implementation status</name>
      <t>
        This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in <xref target="RFC7942" />.
        The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs.
        Please note that the listing of any individual implementation here does not imply endorsement by the IETF.
        Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors.
        This is not intended as, and must not be construed to be, a catalog of available implementations or their features.
        Readers are advised to note that other implementations may exist.
      </t>
      <t>
        According to <xref target="RFC7942" />, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.
        It is up to the individual working groups to use this information as they see fit".
      </t>

      <ul>
        <li>
          OpenBSD <xref target="rpki-client"/>
        </li>
        <li>
          Mikhail Puzanov's <xref target="rpki-prover"/>
        </li>
      </ul>
    </section>

    <section anchor="acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>
        The authors wish to thank <contact fullname="Tim Bruijnzeels"/>,
        <contact fullname="George Michaelson"/>,
        and
        <contact fullname="Tom Harrison"/>.
      </t>
    </section>

  </back>
</rfc>
