<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-sidrops-aspa-verification-11" ipr="trust200902" submissionType="IETF" consensus="true">
  <front>
    <title abbrev="AS_PATH Verification for Route Leaks ">
      BGP AS_PATH Verification Based on Resource Public Key Infrastructure (RPKI) Autonomous System Provider Authorization (ASPA) Objects
    </title>
    <author fullname="Alexander Azimov" initials="A." surname="Azimov">
      <organization showOnFrontPage="true">Yandex</organization>
      <address>
        <postal>
          <street>Ulitsa Lva Tolstogo 16</street>
          <city>Moscow</city>
          <code>119021</code>
          <country>Russian Federation</country>
        </postal>
        <email>a.e.azimov@gmail.com</email>
      </address>
    </author>
    <author fullname="Eugene Bogomazov" initials="E." surname="Bogomazov">
      <organization showOnFrontPage="true">Qrator Labs</organization>
      <address>
        <postal>
          <street>1-y Magistralnyy tupik 5A</street>
          <city>Moscow</city>
          <code>123290</code>
          <country>Russian Federation</country>
        </postal>
        <email>eb@qrator.net</email>
      </address>
    </author>
    <author fullname="Randy Bush" initials="R." surname="Bush">
      <organization abbrev="IIJ &amp; Arrcus" showOnFrontPage="true">Internet Initiative Japan &amp; Arrcus, Inc.</organization>
      <address>
        <postal>
          <street>5147 Crystal Springs</street>
          <city>Bainbridge Island</city>
          <region>Washington</region>
          <code>98110</code>
          <country>United States of America</country>
        </postal>
        <email>randy@psg.com</email>
      </address>
    </author>
    <author fullname="Keyur Patel" initials="K." surname="Patel">
      <organization showOnFrontPage="true">Arrcus</organization>
      <address>
        <postal>
          <street>2077 Gateway Place</street>
          <street>Suite #400</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95119</code>
          <country>United States of America</country>
        </postal>
        <email>keyur@arrcus.com</email>
      </address>
    </author>
    <author fullname="Job Snijders" initials="J." surname="Snijders">
      <organization showOnFrontPage="true">Fastly</organization>
      <address>
        <postal>
          <street/>
          <code/>
          <city>Amsterdam</city>
          <country>Netherlands</country>
        </postal>
        <email>job@fastly.com</email>
      </address>
    </author>
    <author fullname="Kotikalapudi Sriram" initials="K." surname="Sriram">
      <organization abbrev="USA NIST" showOnFrontPage="true">USA National Institute of Standards and Technology</organization>
      <address>
        <postal>
          <street>100 Bureau Drive</street>
          <city>Gaithersburg</city>
          <region>MD</region>
          <code>20899</code>
          <country>United States of America</country>
        </postal>
        <email>ksriram@nist.gov</email>
      </address>
    </author>
    <date/>
    <keyword>BGP</keyword>
    <keyword>Route leak</keyword>
    <keyword>Hijacks</keyword>
    <abstract>
      <t>
        This document defines the semantics of an Autonomous System Provider Authorization object in the Resource Public Key Infrastructure to verify the Border Gateway Protocol (BGP) AS_PATH attribute of advertised routes.
        This type of AS_PATH verification is primarily intended for detection and mitigation of route leaks.
        It also to some degree provides protection against forged-origin prefix hijacks.
      </t>
    </abstract>
    <note title="Requirements Language">
      <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>
    </note>
  </front>
  <middle>
    <section title="Introduction" anchor="intro">
      <t>

        The Border Gateway Protocol (BGP) originally was designed without mechanisms to validate whether the contents of attributes in BGP UPDATEs conform to wishes of the involved Internet Number resource holders.
        As a consequence BGP hijacks and BGP route leaks <xref target="RFC7908"/> exist.
        Some existing BGP extensions are able to partially solve these problems; for example, RPKI-based route origin validation (RPKI-ROV) <xref target="RFC6483"/> <xref target="RFC6811"/> <xref target="RFC9319"/> can be used to detect and filter accidental mis-originations, and <xref target="RFC9234"/> or <xref target="I-D.ietf-grow-route-leak-detection-mitigation"/> can be used to detect and mitigate accidental route leaks.
      </t>
      <t>
                This specification focuses on solving a number of real-world operational problems: the automatic detection of route leaks and improbable BGP paths (including forged-origin BGP hijacks).
        To achieve this, new AS_PATH verification procedures are described to automatically detect invalid AS_PATHs in announcements that are received from customers, lateral peers (defined in <xref target="RFC7908"/>), transit providers, Route Servers (RSes), and RS-clients.
        These procedures use a shared database of cryptographically signed customer-to-provider relationships using a new Resource Public Key Infrastructure (RPKI) Signed Object: Autonomous System Provider Authorization (ASPA) <xref target="I-D.ietf-sidrops-aspa-profile"/>.
        This incrementally deployable technique provides benefits to early adopters in context of limited deployment.
      </t>
    </section>
    <section title="Anomaly Propagation" anchor="propagation">
      <t>
        Both route leaks and hijacks have similar effects on ISP operations - they redirect traffic which can result in denial of service (DoS), eavesdropping, increased latency, and packet loss.
        But the level of risk depends significantly on the extent of propagation of the anomalies.
        For example, a hijack that is propagated only to customers may cause bottlenecking within a particular ISP's customer cone, but if the anomaly propagates through lateral (i.e., non-transit) peers and transit providers, or reaches global distribution through transit-free networks, then the ill effects will likely be experienced across continents.
      </t>
      <t>
        The ability to constrain propagation of BGP anomalies to transit providers and lateral peers - without requiring support from the source of the anomaly (which is critical if the source has malicious intent) - should significantly improve the security of global inter-domain routing system.
      </t>
    </section>
    <section title="Autonomous System Provider Authorization" anchor="ASPA">
      <t>
        As described in <xref target="RFC6480"/>, the RPKI is based on a hierarchy of resource certificates that are aligned to the Internet Number Resource allocation structure.
        Resource certificates are X.509 certificates that conform to the PKIX profile <xref target="RFC5280"/>, carrying the extensions for IP addresses and AS identifiers <xref target="RFC3779"/>.
        A resource certificate is a binding by an issuer of IP address blocks and Autonomous System (AS) numbers to the subject of a certificate, identified by the unique association of the subject's private key with the public key contained in the resource certificate.
        The RPKI is structured so that each current resource certificate matches a current resource allocation or assignment.
      </t>
      <t>
        ASPA is a digitally signed object that binds, for a selected AFI, a Set of Provider AS numbers to a Customer AS number (in terms of BGP announcements, not business relationship), and are signed by the holder of the Customer AS.
        An ASPA attests that a Customer AS holder (CAS) has authorized a Set of Provider ASes (SPAS) to propagate the Customer's IPv4 or IPv6 announcements onward, i.e., to the Provider's upstream providers, lateral peers, or customers.
        The ASPA object profile is described in <xref target="I-D.ietf-sidrops-aspa-profile"/>.
        In this document, the notation (AS1, AFI, [AS2,...]) is used to represent the ASPA object for AS1 in the selected AFI.
        In this example, AS2 and any other ASes listed in the square brackets represent the transit provider ASes.
      </t>
    </section>
    <section title="Customer-Provider Verification Procedure" anchor="pair-validation">
      <t>
        This section describes a procedure for checking if an ordered pair of AS numbers (ASNs), e.g., (AS1, AS2), has the property that AS2 is an attested provider of AS1 per ASPA.
        This procedure is used in ASPA-based AS_PATH validation as described in <xref target="verif"/>.
        The procedure takes (AS1, AS2, AFI) as input parameters and returns one of three possible results, which are "Valid", "Invalid", and "Unknown".
      </t>
      <t>
        A relying party (RP) must have access to a local cache of the complete set of cryptographically valid ASPAs when performing the customer-provider verification procedure.
      </t>
      <t>
        The following algorithm describes the customer-provider verification procedure for a selected AFI:
        <list style="numbers">
          <t>
            Retrieve all cryptographically valid ASPAs with the selected AFI that have a customer value of AS1.
            The union of SPAS from these ASPAs forms the set of authorized providers.
          </t>
          <t>
            If the set of authorized providers is empty, then the procedure exits with an outcome of "Unknown".
          </t>
          <t>
            If AS2 is included in the set of authorized providers, then the procedure exits with an outcome of "Valid".
          </t>
          <t>
            Otherwise, the procedure exits with an outcome of "Invalid".
          </t>
        </list>
      </t>
      <t>
        Since an AS may have different sets of providers for different AFI, accordingly, it may have different SPAS in the corresponding ASPAs.
        Therefore, the above procedure with the input (AS1, AS2, AFI) may have different outputs for different AFI values.
      </t>
    </section>
    <section title="AS_PATH Verification" anchor="verif">
      <t>
        The procedures described in this document are applicable only to four-octet AS number compatible BGP speakers <xref target="RFC6793"/>.
        If such a BGP speaker receives both AS_PATH and AS4_PATH attributes in an UPDATE, then the procedures are applied on the reconstructed AS path (Section 4.2.3 of <xref target="RFC6793"/>).
        So, the term AS_PATH is used in this document to refer to the usual AS_PATH <xref target="RFC4271"/> as well as the reconstructed AS path (the latter in instances when reconstruction is performed).
      </t>
      <t>
        If an attacker creates a route leak intentionally, they may try to strip their AS from the AS_PATH.
        To partly guard against that, a check is necessary to match the most recently added AS in the AS_PATH to the BGP neighbor's ASN.
        This check is expected to be performed as specified in Section 6.3 of <xref target="RFC4271"/>.
        If the check fails, then the AS_PATH is considered a Malformed AS_PATH and the UPDATE is considered to be in error (Section 6.3 of <xref target="RFC4271"/>).
        It is expected that the case of transparent RS is appropriately taken care of (e.g., by suspending the check).
        Note that the check fails also when the AS_PATH is empty (zero length) and that is appropriate.
        These checks are mentioned here because they are commonly a part of commercial BGP implementations and support the AS path validation procedures in this document.
      </t>
      <section title="Definition of Indices" anchor="index">
        <t>
        The AS_PATH attribute identifies the autonomous systems through which an UPDATE message has passed.
        It may contain two types of components: AS_SEQUENCEs and AS_SETs, as defined in <xref target="RFC4271"/>.
        (Note: The consideration of AS Confederations is discussed in <xref target="confed"/>.)
        </t>
        <t>
        If the AS_PATH contains an AS_SET in any position, then it is marked by the verification algorithm as Invalid.
        If the AS_PATH does not contain an AS_SET but only AS_SEQUENCE(s), then it is represented for simplicity in the verification algorithm as a sequence of unique AS numbers: AS(1), AS(2),..., AS(I-1), AS(I), AS(I+1),..., AS(N), where AS(1) is the rightmost (i.e., origin) AS and AS(N) is the leftmost, i.e., the neighbor of the validating AS.
        N is the AS_PATH length in terms of the number of unique ASNs.
        (Note: see <xref target="non-transp-RS"/> for the consideration of a special case.)
        </t>
        <t>
        An Invalid Pair Index is determined as a minimal I such that the customer-provider validation procedure (<xref target="pair-validation"/>) with parameters (AS(I), AS(I+1), AFI) returns Invalid.
        If there is no such minimal I, then the Invalid Pair Index value is set equal to N.
        </t>
        <t>
        The Reverse Invalid Pair Index is determined as the Invalid Pair Index calculated for the reversed version of the sequence AS(1), AS(2),..., AS(I-1), AS(I), AS(I+1),..., AS(N).
        </t>
        <t>
        An Unknown Pair Index is determined as a minimal I such that the customer-provider validation procedure (<xref target="pair-validation"/>) with parameters (AS(I), AS(I+1), AFI) returns Unknown.
        If there is no such minimal I or the minimal I value is greater than the Invalid Pair Index, then the Unknown Pair Index value is set equal to the Invalid Pair Index.
        </t>
        <t>
        The Reverse Unknown Pair Index is determined as the Unknown Pair Index calculated for the reversed version of the sequence AS(1), AS(2),..., AS(I-1), AS(I), AS(I+1),..., AS(N).
        </t>
        <t>
        The procedures described in <xref target="Upflow"/> and <xref target="Downflow"/> make use of the four Indices defined above.
        </t>
        <section title="RS-Client of a Non-Transparent RS" anchor="non-transp-RS">
          <t>
          A special consideration is given to the case when the validating AS is an RS-client of a non-transparent Route Server (RS).
          In this case, when the indices described <xref target="index"/> are computed, the ASN of the RS is removed from the AS_PATH only for the purpose generating the sequence AS(1), AS(2),... , AS(I-1), AS(I), AS(I+1),..., AS(N) that was defined in <xref target="index"/>.
          Thus, AS(N) would equal the AS number of the AS added just before the RS.
          Also, N would be one less than the AS_PATH length.
          </t>
          <t>
          Note that when an UPDATE is received from an IX RS, it is equivalent to coming from a lateral peer regardless of whether the RS is transparent or not.
          Hence, the Upstream path validation procedure (<xref target="Upflow"/>) can be applied at the receiving RS-client in both cases (i.e., transparent and non-transparent RS) provided that the non-transparent RS AS is removed from the AS_PATH as described above (preceding paragraph).


<!-- A special consideration is given to the case of an RS-client of a transparent Route Server (RS) as follows. In this case, when the indices described <xref target="index"/> are computed, the ASN of the RS is added to the AS_PATH in the leftmost position (see design discussion in <xref target="sriram2"/>). Thus, in the sequence AS(1), AS(2),... , AS(I-1), AS(I), AS(I+1),..., AS(N) that was defined in <xref target="index"/>, AS(N) would equal the ASN of the RS. -->

          </t>
        </section>
      </section>
      <section title="Algorithm for Upstream Paths" anchor="Upflow">
        <t>
          The upstream verification algorithm described here is applied when a route is received from a customer or a lateral peer, or by an RS-client at an IX RS.
          Each hop AS(I) to AS(I+1)in the unique ASN sequence AS(1), AS(2),... , AS(N) must be Valid per the customer-provider validation procedure (<xref target="pair-validation"/>) for the AS_PATH to be Valid.
          If at least one of those hops is Invalid, then the AS_PATH would be Invalid.
          If the AS_PATH verification outcome is neither Valid nor Invalid, then it would be evaluated as Unknown.
        </t>
        <!--
        <t>
          If an attacker creates a route leak intentionally, they may try to strip their AS from the AS_PATH. To partly guard against that, a check is performed to match the most recently added AS in the AS_PATH to the BGP neighbor's ASN. To further strengthen route leak detection against malicious activity, a check is performed on the received UPDATE to make sure that the AS_PATH is not empty.
        </t>
[Sriram] Moved this to the top of Section 5 (AS_PATH Verification)]
-->
        <t>
          The upstream path verification procedure is specified as follows:
        </t>
        <t>
          <list style="numbers">
            <t>
              If the AS_PATH has an AS_SET, then the procedure halts with the outcome "Invalid".
            </t>
            <!--
            <t>
              If the most recently added AS in the AS_PATH has a value not equal to the receiver's neighbor ASN, then the procedure halts with the outcome "Invalid".
            </t>
[Sriram] Moved this to the top of Section 5 (AS_PATH Verification)]
-->
            <t>
              If the Invalid Pair Index is less than N, then the procedure halts with the outcome "Invalid".
            </t>
            <t>
              If the Unknown Pair Index is less than N, then the procedure halts with the outcome "Unknown".
            </t>
            <t>
              Else, the procedure halts with the outcome "Valid".
            </t>
          </list>
        </t>
      </section>
      <section title="Algorithm for Downstream Paths" anchor="Downflow">
        <t>
          The downstream verification algorithm described here is applied when a route is received from a transit provider.
        </t>
        <t>
          Consider an UPDATE with the unique AS sequence AS(1), AS(2),... , AS(N) as defined in <xref target="index"/>.
          When the UPDATE is received from a provider, it may have both an upstream ramp (on the left) and a downstream ramp (on the right), where the downstream ramp follows the upstream ramp (both ramps are ASPA valid hop-by-hop).
          The upstream ramp starts at AS(1) and each AS hop in it has the property that AS(i+1) is a provider of AS(i) per ASPA.
          The downstream ramp ends at AS(N) and each AS hop in it has the property that AS(i-1) is a provider of AS(i) per ASPA.
          The upstream ramp stops (reaches its apex) when the ASPA validation to check customer-to-provider relationship of the AS-pair corresponding to the next AS hop gives Invalid or Unknown result.
          The apex of the downstream ramp is determined similarly but by doing the checks backwards starting with the hop from AS(N-1) to AS(N).
        </t>
        <t>
          If there is an upstream ramp but no downstream ramp or vice versa, then clearly the UPDATE is valid (i.e., not a route leak).
          However, if both ramps exist, then the UPDATE is Valid if and only if either one or zero AS hops exist between the apexes of the two ramps, i.e., there is no AS between the apexes (see <xref target="sriram1"/> for formal proof).
          If there are one or more ASes between the apexes of the upstream and downstream ramps, then the UPDATE is a route leak (Invalid) or the presence of a leak cannot be known using available ASPAs (Unknown) <xref target="sriram1"/>.
        </t>
        <t>
          The determination of a route leak (Invalid) UPDATE can be done with the use of the Invalid Pair Index and Reverse Invalid Pair Index.
          The rule for Invalid determination is as follows: if the sum of Invalid Pair Index and Reverse Invalid Pair Index is less than N, then route was leaked <xref target="sriram1"/> or the AS_PATH attribute was malformed.

        </t>
        <!--
        <t>
          As was done in the case of upstream paths <xref target="Upflow"/>, the checks regarding empty AS_PATH and match between the most recently added AS and the BGP neighbor AS are performed here also.
        </t>
[Sriram] Moved this to the top of Section 5 (AS_PATH Verification)]
-->

        <t>
          The downstream path verification procedure is specified as follows:
          <list style="numbers">
            <t>
              If the AS_PATH has an AS_SET, then the procedure halts with the outcome "Invalid".
            </t>
            <!--
            <t>
              If the most recently added AS in the AS_PATH has a value not equal to the receiver's neighbor ASN, then the procedure halts with the outcome "Invalid".
            </t>
[Sriram] Moved this to the top of Section 5 (AS_PATH Verification)]
-->

            <t>
              If the sum of the Invalid Pair Index and the Reverse Invalid Pair Index is less than N, then the procedure halts with the outcome "Invalid".
            </t>
            <t>
              If the sum of the Unknown Pair Index and the Reverse Unknown Pair Index is less than N, then the procedure halts with the outcome "Unknown".
            </t>
            <t>
              Else, the procedure halts with the outcome "Valid".
            </t>
          </list>
        </t>
      </section>
      <section title="ASPA Registration Recommendations" anchor="rec1">
        <t>
        An ASPA is a positive attestation that an AS holder has authorized its providers to redistribute received routes to the provider's providers and lateral peers.
        This does not preclude the provider AS from redistribution to its other customers.
        An AS number resource holder in its role as Customer, MUST register each of its transit provider ASes in its ASPA record.
        Operators SHOULD endeavour to register all providers in a single ASPA object at any time.
<!--
KS comment: The statement below does not make sense. The lateral peer of the customer is a provider to its customers and they can announce the routes further to the customers.

        By creating an ASPA with providers set of [0], the customer indicates that no provider should further announce its routes.
-->
        </t>
        <t>
        Registration of an ASPA (AS, AFI, [0]) and no other ASPAs is meant to be a statement by the registering AS that it has no transit providers.
        An RS AS MUST register an AS 0 ASPA and MUST NOT register any other ASPAs.
        Normally, so-called "Tier-1" ASes do not have transit providers.
        However, if a Tier-1 AS is present at an IX RS as an RS-client, then it MUST register an ASPA showing the RS AS as a provider.
        </t>
        <t>
        An ASPA (AS, AFI, [0]) SHOULD be the only ASPA registered by an AS that intends declare that it is provider-free in the selected AFI.
        If AS 0 coexists with other provider ASes in the same ASPA (or other ASPA records in the same AFI), then the presence of the AS 0 has no effect on the AS_PATH verification procedures.
        The validation procedures simply consider the other (distinct from AS 0) providers as the authorized providers of the AS in consideration.
        </t>
      </section>
      <section title="AS_PATH Verification Recommendation" anchor="rec2">
        <t>
          A compliant AS MUST apply the upstream and downstream AS path validation algorithms (<xref target="Upflow"/> and <xref target="Downflow"/>, respectively) in principle producing outcomes as specified though the implementation details may differ.
        </t>
        <t>
          The procedures described in this document are applicable only for the address families AFI 1 (IPv4) and AFI 2 (IPv6) with SAFI 1 (unicast) in both cases <xref target="IANA-AF"/>.
          The procedures MUST NOT be applied to other address families by default.
        </t>
      </section>
    </section>
    <section title="Mitigation">
      <t>
          If the output of the AS_PATH verification procedure is "Invalid", then the route MUST be rejected.
      </t>
      <!--
        <t>
          If the output of the AS_PATH verification procedure is 'Unverifiable' it means that AS_PATH cannot be fully checked.
            Such routes should be treated with caution and SHOULD be processed the same way as "Invalid" routes.
            This policy goes with full correspondence to <xref target="I-D.ietf-idr-deprecate-as-set-confed-set"/>.
        </t>
-->
        <t>
          The above AS_PATH verification procedures (<xref target="Upflow"/> and <xref target="Downflow"/>) are able to check routes received from customers, lateral peers, transit providers, RSes, and RS-clients.
          The ASPA-based path verification mechanism combined with BGP Roles <xref target="RFC9234"/> and ROA-based Origin Validation <xref target="RFC6811"/> can provide a fully automated solution to detect and filter hijacks and route leaks, including malicious ones (e.g., forged-origin hijacks).
      </t>
    </section>
    <section title="Operational Considerations">
      <section title="Mutual Transit (Complex Relations)" anchor="Complex">
        <t>
        There are peering relationships which cannot be described as strictly simple peer-to-peer (i.e., lateral peers) or customer-to-provider.
        An example is when both parties (ASes) treat each other as a customer, i.e., the customer-to-provider relationship applies in each direction.
        That is called a sibling relationship, and in such case, an ASPA (AS1, AFI, [AS2, ...]) must be created by AS1 and another ASPA (AS2, AFI, [AS1, ...]) must be created by AS2.
        </t>
      </section>
      <section title="AS Confederations" anchor="confed">
        <t>
The ASes on the boundary of an AS Confederation MUST register ASPAs using the Confederation's global ASN and the procedures for ASPA-based AS path validation in this document are NOT RECOMMENDED for use on eBGP links internal to the Confederation.
        </t>
      </section>
    </section>
    <section title="Comparison to Other Technologies">
      <section title="BGPsec">
        <t>
        While the described upgrades to BGP are quite useful, they still rely on an unsigned transitive BGP attributes, e.g., AS_PATH, which can be manipulated by on-path attackers.
        BGPsec <xref target="RFC8205"/> was designed to solve the problem of AS_PATH validation using cryptographic signatures contained in BGP UPDATE messages.
        While BGPsec offers protection against unauthorized path modifications, BGPsec by design does not protect against route leaks.
        </t>
        <t>
        BGPsec and ASPA are complementary technologies.
        </t>
      </section>
      <section title="Peerlock">
        <t>
        The Peerlock mechanism <xref target="Peerlock"/> <xref target="Flexsealing"/> has a similar objective as the APSA-based route leak protection mechanism described in this document.
        It is commonly deployed by large Internet carriers to protect each other from route leaks.
        Peerlock depends on a laborious manual process in which operators coordinate the distribution of unstructured Provider Authorizations through out-of-band means in a many-to-many fashion.
        On the other hand, ASPA's use of the RPKI allows for automated, scalable, and ubiquitous deployment, making the protection mechanism available to a wider range of network operators.
        </t>
        <t>
        The ASPA mechanism implemented in router code versus Peerlock's AS_PATH regular expressions also provides a way to detect anomalies propagated from transit providers and IX route servers.
        ASPA is intended to be a complete solution and replacement for existing Peerlock deployments.
        </t>
      </section>
    </section>
    <section anchor="IANA" title="IANA Considerations">
      <t> This document includes no request to IANA.</t>
    </section>
    <section anchor="Security" title="Security Considerations">
      <t>
        The proposed mechanism is compatible only with BGP implementations that can process 32-bit ASNs in the AS_PATH.
        This limitation should not have a real effect on operations since legacy BGP routers are rare and it is highly unlikely that they support integration with the RPKI.
      </t>
      <t>
        ASPA issuers should be aware of the implications of the ASPA-based AS path validation.
        A downstream AS can apply the verification mechanism and possibly invalidate and reject all routes passed to upstream providers other than the provider ASes listed in the ASPA record.
        It is the responsibility of each compliant AS to maintain a correct set of providers in its ASPA record(s).
      </t>
      <t>
        It is highly recommended that a compliant AS should maintain a single ASPA object that covers all its providers.
        Such a practice will help prevent race conditions during ASPA updates that might affect prefix propagation.
        The software that provides hosting for ASPA records SHOULD support enforcement of this practice.
        During a transition process between different certificate authority (CA) registries, the ASPA records SHOULD be kept identical in all registries.
      </t>
      <t>
        While the ASPA-based mechanism is able to generally detect both mistakes and malicious activity affecting routes received from customers, RS-clients, or lateral peers, it might fail to detect some malicious path modifications for routes that are received from upstream providers.
      </t>
      <t>
        Since an upstream provider becomes a trusted point, in theory it might be able to propagate without detection some instances of hijacked prefixes of its customers or routes with malformed or manipulated AS_PATHs.
        While it may happen in theory, it does not seem to be a realistic scenario.
        Normally a customer and its transit provider have a signed agreement and such a policy violation should have legal consequences or customer can just drop the relationship with such a provider and remove the corresponding ASPA record.
      </t>
    </section>
    <section anchor="Acknowledgments" title="Acknowledgments">
      <t>
        The authors wish to thank the authors of <xref target="RFC6483"/> since its text was used as an example while writing <xref target="ASPA"/> in this document.
        Thanks are also due to Jakob Heitz, Ben Maddison, Jeff Haas, and Nick Hilliard  for comments and discussion about the algorithms.
        The authors wish to thank Iljitsch van Beijnum for providing a suggestion about downstream paths.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized.  This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC6811" target="https://www.rfc-editor.org/info/rfc6811" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6811.xml">
        <front>
          <title>BGP Prefix Origin Validation</title>
          <author fullname="P. Mohapatra" initials="P." surname="Mohapatra"/>
          <author fullname="J. Scudder" initials="J." surname="Scudder"/>
          <author fullname="D. Ward" initials="D." surname="Ward"/>
          <author fullname="R. Bush" initials="R." surname="Bush"/>
          <author fullname="R. Austein" initials="R." surname="Austein"/>
          <date month="January" year="2013"/>
          <abstract>
            <t>To help reduce well-known threats against BGP including prefix mis- announcing and monkey-in-the-middle attacks, one of the security requirements is the ability to validate the origination Autonomous System (AS) of BGP routes.  More specifically, one needs to validate that the AS number claiming to originate an address prefix (as derived from the AS_PATH attribute of the BGP route) is in fact authorized by the prefix holder to do so.  This document describes a simple validation mechanism to partially satisfy this requirement. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6811"/>
        <seriesInfo name="DOI" value="10.17487/RFC6811"/>
      </reference>
      <reference anchor="RFC6480" target="https://www.rfc-editor.org/info/rfc6480" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6480.xml">
        <front>
          <title>An Infrastructure to Support Secure Internet Routing</title>
          <author fullname="M. Lepinski" initials="M." surname="Lepinski"/>
          <author fullname="S. Kent" initials="S." surname="Kent"/>
          <date month="February" year="2012"/>
          <abstract>
            <t>This document describes an architecture for an infrastructure to support improved security of Internet routing.  The foundation of this architecture is a Resource Public Key Infrastructure (RPKI) that represents the allocation hierarchy of IP address space and Autonomous System (AS) numbers; and a distributed repository system for storing and disseminating the data objects that comprise the RPKI, as well as other signed objects necessary for improved routing security.  As an initial application of this architecture, the document describes how a legitimate holder of IP address space can explicitly and verifiably authorize one or more ASes to originate routes to that address space.  Such verifiable authorizations could be used, for example, to more securely construct BGP route filters.  This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6480"/>
        <seriesInfo name="DOI" value="10.17487/RFC6480"/>
      </reference>
      <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml">
        <front>
          <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
          <author fullname="D. Cooper" initials="D." surname="Cooper"/>
          <author fullname="S. Santesson" initials="S." surname="Santesson"/>
          <author fullname="S. Farrell" initials="S." surname="Farrell"/>
          <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
          <author fullname="R. Housley" initials="R." surname="Housley"/>
          <author fullname="W. Polk" initials="W." surname="Polk"/>
          <date month="May" year="2008"/>
          <abstract>
            <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5280"/>
        <seriesInfo name="DOI" value="10.17487/RFC5280"/>
      </reference>
      <reference anchor="RFC4271" target="https://www.rfc-editor.org/info/rfc4271" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml">
        <front>
          <title>A Border Gateway Protocol 4 (BGP-4)</title>
          <author fullname="Y. Rekhter" initials="Y." role="editor" surname="Rekhter"/>
          <author fullname="T. Li" initials="T." role="editor" surname="Li"/>
          <author fullname="S. Hares" initials="S." role="editor" surname="Hares"/>
          <date month="January" year="2006"/>
          <abstract>
            <t>This document discusses the Border Gateway Protocol (BGP), which is an inter-Autonomous System routing protocol.</t>
            <t>The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASes) that reachability information traverses. This information is sufficient for constructing a graph of AS connectivity for this reachability from which routing loops may be pruned, and, at the AS level, some policy decisions may be enforced.</t>
            <t>BGP-4 provides a set of mechanisms for supporting Classless Inter-Domain Routing (CIDR). These mechanisms include support for advertising a set of destinations as an IP prefix, and eliminating the concept of network "class" within BGP. BGP-4 also introduces mechanisms that allow aggregation of routes, including aggregation of AS paths.</t>
            <t>This document obsoletes RFC 1771. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4271"/>
        <seriesInfo name="DOI" value="10.17487/RFC4271"/>
      </reference>
      <reference anchor="RFC6793" target="https://www.rfc-editor.org/info/rfc6793" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6793.xml">
        <front>
          <title>BGP Support for Four-Octet Autonomous System (AS) Number Space</title>
          <author fullname="Q. Vohra" initials="Q." surname="Vohra"/>
          <author fullname="E. Chen" initials="E." surname="Chen"/>
          <date month="December" year="2012"/>
          <abstract>
            <t>The Autonomous System number is encoded as a two-octet entity in the base BGP specification.  This document describes extensions to BGP to carry the Autonomous System numbers as four-octet entities.  This document obsoletes RFC 4893 and updates RFC 4271. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6793"/>
        <seriesInfo name="DOI" value="10.17487/RFC6793"/>
      </reference>
      <reference anchor="RFC7908" target="https://www.rfc-editor.org/info/rfc7908" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7908.xml">
        <front>
          <title>Problem Definition and Classification of BGP Route Leaks</title>
          <author fullname="K. Sriram" initials="K." surname="Sriram"/>
          <author fullname="D. Montgomery" initials="D." surname="Montgomery"/>
          <author fullname="D. McPherson" initials="D." surname="McPherson"/>
          <author fullname="E. Osterweil" initials="E." surname="Osterweil"/>
          <author fullname="B. Dickson" initials="B." surname="Dickson"/>
          <date month="June" year="2016"/>
          <abstract>
            <t>A systemic vulnerability of the Border Gateway Protocol routing system, known as "route leaks", has received significant attention in recent years.  Frequent incidents that result in significant disruptions to Internet routing are labeled route leaks, but to date a common definition of the term has been lacking.  This document provides a working definition of route leaks while keeping in mind the real occurrences that have received significant attention.  Further, this document attempts to enumerate (though not exhaustively) different types of route leaks based on observed events on the Internet.  The aim is to provide a taxonomy that covers several forms of route leaks that have been observed and are of concern to the Internet user community as well as the network operator community.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7908"/>
        <seriesInfo name="DOI" value="10.17487/RFC7908"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <references title="Informative References">
      <reference anchor="RFC3779" target="https://www.rfc-editor.org/info/rfc3779" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3779.xml">
        <front>
          <title>X.509 Extensions for IP Addresses and AS Identifiers</title>
          <author fullname="C. Lynn" initials="C." surname="Lynn"/>
          <author fullname="S. Kent" initials="S." surname="Kent"/>
          <author fullname="K. Seo" initials="K." surname="Seo"/>
          <date month="June" year="2004"/>
          <abstract>
            <t>This document defines two X.509 v3 certificate extensions.  The first binds a list of IP address blocks, or prefixes, to the subject of a certificate.  The second binds a list of autonomous system identifiers to the subject of a certificate.  These extensions may be used to convey the authorization of the subject to use the IP addresses and autonomous system identifiers contained in the extensions. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="3779"/>
        <seriesInfo name="DOI" value="10.17487/RFC3779"/>
      </reference>
      <reference anchor="RFC8205" target="https://www.rfc-editor.org/info/rfc8205" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8205.xml">
        <front>
          <title>BGPsec Protocol Specification</title>
          <author fullname="M. Lepinski" initials="M." role="editor" surname="Lepinski"/>
          <author fullname="K. Sriram" initials="K." role="editor" surname="Sriram"/>
          <date month="September" year="2017"/>
          <abstract>
            <t>This document describes BGPsec, an extension to the Border Gateway Protocol (BGP) that provides security for the path of Autonomous Systems (ASes) through which a BGP UPDATE message passes.  BGPsec is implemented via an optional non-transitive BGP path attribute that carries digital signatures produced by each AS that propagates the UPDATE message.  The digital signatures provide confidence that every AS on the path of ASes listed in the UPDATE message has explicitly authorized the advertisement of the route.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8205"/>
        <seriesInfo name="DOI" value="10.17487/RFC8205"/>
      </reference>
      <reference anchor="RFC6483" target="https://www.rfc-editor.org/info/rfc6483" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6483.xml">
        <front>
          <title>Validation of Route Origination Using the Resource Certificate Public Key Infrastructure (PKI) and Route Origin Authorizations (ROAs)</title>
          <author fullname="G. Huston" initials="G." surname="Huston"/>
          <author fullname="G. Michaelson" initials="G." surname="Michaelson"/>
          <date month="February" year="2012"/>
          <abstract>
            <t>This document defines the semantics of a Route Origin Authorization (ROA) in terms of the context of an application of the Resource Public Key Infrastructure to validate the origination of routes advertised in the Border Gateway Protocol.  This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6483"/>
        <seriesInfo name="DOI" value="10.17487/RFC6483"/>
      </reference>
      <reference anchor="RFC9234" target="https://www.rfc-editor.org/info/rfc9234" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9234.xml">
        <front>
          <title>Route Leak Prevention and Detection Using Roles in UPDATE and OPEN Messages</title>
          <author fullname="A. Azimov" initials="A." surname="Azimov"/>
          <author fullname="E. Bogomazov" initials="E." surname="Bogomazov"/>
          <author fullname="R. Bush" initials="R." surname="Bush"/>
          <author fullname="K. Patel" initials="K." surname="Patel"/>
          <author fullname="K. Sriram" initials="K." surname="Sriram"/>
          <date month="May" year="2022"/>
          <abstract>
            <t>Route leaks are the propagation of BGP prefixes that violate assumptions of BGP topology relationships, e.g., announcing a route learned from one transit provider to another transit provider or a lateral (i.e., non-transit) peer or announcing a route learned from one lateral peer to another lateral peer or a transit provider.  These are usually the result of misconfigured or absent BGP route filtering or lack of coordination between autonomous systems (ASes).  Existing approaches to leak prevention rely on marking routes by operator configuration, with no check that the configuration corresponds to that of the External BGP (eBGP) neighbor, or enforcement of the two eBGP speakers agreeing on the peering relationship.  This document enhances the BGP OPEN message to establish an agreement of the peering relationship on each eBGP session between autonomous systems in order to enforce appropriate configuration on both sides.  Propagated routes are then marked according to the agreed relationship, allowing both prevention and detection of route leaks.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9234"/>
        <seriesInfo name="DOI" value="10.17487/RFC9234"/>
      </reference>
      <reference anchor="RFC9319" target="https://www.rfc-editor.org/info/rfc9319" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9319.xml">
        <front>
          <title>The Use of maxLength in the Resource Public Key Infrastructure (RPKI)</title>
          <author fullname="Y. Gilad" initials="Y." surname="Gilad"/>
          <author fullname="S. Goldberg" initials="S." surname="Goldberg"/>
          <author fullname="K. Sriram" initials="K." surname="Sriram"/>
          <author fullname="J. Snijders" initials="J." surname="Snijders"/>
          <author fullname="B. Maddison" initials="B." surname="Maddison"/>
          <date month="October" year="2022"/>
          <abstract>
            <t>This document recommends ways to reduce the forged-origin hijack attack surface by prudently limiting the set of IP prefixes that are included in a Route Origin Authorization (ROA).  One recommendation is to avoid using the maxLength attribute in ROAs except in some specific cases.  The recommendations complement and extend those in RFC 7115.  This document also discusses the creation of ROAs for facilitating the use of Distributed Denial of Service (DDoS) mitigation services.  Considerations related to ROAs and RPKI-based Route Origin Validation (RPKI-ROV) in the context of destination-based Remotely Triggered Discard Route (RTDR) (elsewhere referred to as "Remotely Triggered Black Hole") filtering are also highlighted.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="185"/>
        <seriesInfo name="RFC" value="9319"/>
        <seriesInfo name="DOI" value="10.17487/RFC9319"/>
      </reference>
      <reference anchor="I-D.ietf-grow-route-leak-detection-mitigation" target="https://www.ietf.org/archive/id/draft-ietf-grow-route-leak-detection-mitigation-07.txt" xml:base="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-route-leak-detection-mitigation.xml">
        <front>
          <title>Methods for Detection and Mitigation of BGP Route Leaks</title>
          <author fullname="Kotikalapudi Sriram" surname="Kotikalapudi Sriram">
            <organization>USA National Institute of Standards and Technology</organization>
          </author>
          <author fullname="Alexander Azimov" surname="Alexander Azimov">
            <organization>Yandex</organization>
          </author>
          <date day="26" month="April" year="2022"/>
          <abstract>
            <t>Problem definition for route leaks and enumeration of types of route leaks are provided in RFC 7908. This document describes a new well- known Large Community that provides a way for route-leak prevention, detection, and mitigation. The configuration process for this Community can be automated with the methodology for setting BGP roles that is described in ietf-idr-bgp-open-policy draft.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-grow-route-leak-detection-mitigation-07"/>
      </reference>
      <reference anchor="I-D.ietf-sidrops-aspa-profile" target="https://www.ietf.org/archive/id/draft-ietf-sidrops-aspa-profile-10.txt" xml:base="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-sidrops-aspa-profile.xml">
        <front>
          <title>A Profile for Autonomous System Provider Authorization</title>
          <author fullname="Alexander Azimov" surname="Alexander Azimov">
            <organization>Yandex</organization>
          </author>
          <author fullname="Eugene Uskov" surname="Eugene Uskov">
            <organization>JetLend</organization>
          </author>
          <author fullname="Randy Bush" surname="Randy Bush">
            <organization>Internet Initiative Japan</organization>
          </author>
          <author fullname="Job Snijders" surname="Job Snijders">
            <organization>Fastly</organization>
          </author>
          <author fullname="Russ Housley" surname="Russ Housley">
            <organization>Vigil Security, LLC</organization>
          </author>
          <author fullname="Ben Maddison" surname="Ben Maddison">
            <organization>Workonline</organization>
          </author>
          <date day="12" month="August" year="2022"/>
          <abstract>
            <t>This document defines a standard profile for Autonomous System Provider Authorization in the Resource Public Key Infrastructure. An Autonomous System Provider Authorization is a digitally signed object that provides a means of validating that a Customer Autonomous System holder has authorized members of Provider set to be its upstream providers or provide route server service at internet exchange point. For the Providers it means that they are legal to send prefixes received from the Customer Autonomous System in all directions including providers and peers.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-aspa-profile-10"/>
      </reference>
      <reference anchor="Peerlock" target="https://www.nanog.org/sites/default/files/Snijders_Everyday_Practical_Bgp.pdf">
        <front>
          <title>Peerlock</title>
          <author fullname="Job Snijders" initials="J." surname="Snijders">
            <organization abbrev="NTT">NTT Communications</organization>
          </author>
          <date month="June" year="2016"/>
        </front>
      </reference>
      <reference anchor="Flexsealing" target="https://arxiv.org/pdf/2006.06576.pdf">
        <front>
          <title>Flexsealing BGP Against Route Leaks: Peerlock Active Measurement and Analysis</title>
          <author fullname="Tyler McDaniel" initials="T." surname="McDaniel">
            <organization>University of Tennesse</organization>
          </author>
          <author fullname="Jared M. Smith" initials="J." surname="Smith">
            <organization>University of Tennesse</organization>
          </author>
          <author fullname="Max Schuchard" initials="M." surname="Schuchard">
            <organization>University of Tennesse</organization>
          </author>
          <date month="November" year="2020"/>
        </front>
      </reference>
      <reference anchor="sriram1" target="https://datatracker.ietf.org/meeting/110/materials/slides-110-sidrops-sriram-aspa-alg-accuracy-01">
        <front>
          <title>On the Accuracy of Algorithms for ASPA Based Route Leak Detection</title>
          <author initials="K." surname="Sriram">
            <organization/>
          </author>
          <author initials="J." surname="Heitz">
            <organization/>
          </author>
          <date year=""/>
        </front>
        <seriesInfo name="IETF SIDROPS Meeting," value="Proceedings of the IETF 110, March 2021"/>
      </reference>
      <!--
        <reference anchor="sriram2" target="https://datatracker.ietf.org/meeting/113/materials/slides-113-sidrops-aspa-verification-procedures-01">
            <front>
                <title>ASPA Verification Procedures: Enhancements and RS Considerations</title>
                <author initials="K." surname="Sriram"><organization /></author>
                <date year="" />
            </front>
            <seriesInfo name="IETF SIDROPS Meeting," value="Proceedings of the IETF 113, March 2022" />
        </reference>
-->
      <reference anchor="IANA-AF" target="https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml" quote-title="true">
        <front>
          <title>Address Family Numbers</title>
          <author>
            <organization>IANA</organization>
          </author>
          <date/>
        </front>
        <!-- <seriesInfo name="Reachable from" value="http://www.iana.org/numbers.html"/> -->
            </reference>
    </references>
  </back>
</rfc>
