<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="3"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e., [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-qin-savnet-toa-01" ipr="trust200902">
  <front>
    <title abbrev="Traffic Origin Authorization">A Profile for Traffic Origin
    Authorizations (TOAs)</title>

    <author fullname="Lancheng Qin" initials="L." surname="Qin">
      <organization>Zhongguancun Laboratory</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <country>China</country>
        </postal>

        <email>qinlc@mail.zgclab.edu.cn</email>
      </address>
    </author>

    <author fullname="Ben Maddison" initials="B." surname="Maddison">
      <organization>Workonline</organization>

      <address>
        <postal>
          <street/>

          <city>Cape Town</city>

          <region/>

          <code/>

          <country>South Africa</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>benm@workonline.africa</email>

        <uri/>
      </address>
    </author>

    <author fullname="Dan Li" initials="D." surname="Li">
      <organization>Tsinghua University</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>tolidan@tsinghua.edu.cn</email>

        <uri/>
      </address>
    </author>

    <author fullname="Igor Lubashev" initials="I." surname="Lubashev">
      <organization>Akamai</organization>

      <address>
        <postal>
          <street/>

          <city>Cambridge</city>

          <region/>

          <code/>

          <country>United States of America</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>ilubashe@akamai.com</email>

        <uri/>
      </address>
    </author>

    <date day="30" month="January" year="2026"/>

    <!---->

    <keyword/>

    <abstract>
      <t>This document defines a standard profile for Traffic Origin
      Authorizations (TOAs), a Cryptographic Message Syntax (CMS) protected
      content type for use with the Resource Public Key Infrastructure (RPKI).
      A TOA is a digitally signed object that provides a means of verifying
      that an IP address block holder has authorized an Autonomous System (AS)
      to originate traffic using source IP addresses within the address
      block.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in RFC 8174 <xref
      target="RFC8174"/>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Source Address Validation (SAV) aims to detect and discard data
      packets that use a spoofed source IP address. The fundamental concept of
      the current practice is directionality: for data packets using a given
      source IP address, only those coming from a specific direction are
      considered legitimate. BCP84 <xref target="RFC8704"/> introduces a more
      structured direction-based logic, i.e., identifying the incoming
      directions for traffic of a given source AS and determining the source
      prefix space that the AS is authorized to use.</t>

      <t>To support such validation, a mechanism is needed to allow entities
      to verify that an AS has been authorized to originate traffic using one
      or more prefixes as the source IP address. One of the main challenges is
      that the current infrastructure for validating the right to originate
      traffic with a given source address has so far been built almost
      entirely on top of mechanisms designed to validate the right to
      originate routing information for destination-based routing. In most
      cases, where the two use cases overlap, this approach works reasonably
      well. However, when the traffic origin diverges from the route origin,
      ambiguity and misalignment arise between the intended use case and the
      mechanisms being applied.</t>

      <t>The purpose of a Traffic Origin Authorization (TOA) is to explicitly
      authorize an AS to originate traffic using a given prefix as a source
      address, even when that AS is not authorized to originate any BGP routes
      to that prefix. A TOA provides a clear separation between the
      authorization to originate routing information and the authorization to
      originate data traffic.</t>

      <t>This distinction is particularly important in scenarios where traffic
      is unidirectional and there is no need to attract return traffic via
      route announcements, or where the return traffic is intentionally
      directed to another location. Examples include:<list style="symbols">
          <t>Content Delivery Networks (CDNs) using Direct Server Return
          (DSR): Users send requests to an anycast service address that is
          advertised by one AS. The response traffic is generated by a content
          server located in a different AS, but uses the same anycast service
          address as the source IP address. The AS hosting the content server
          does not advertise a route for the anycast prefix because it does
          not attract request traffic from users (see <xref
          target="I-D.ietf-savnet-inter-domain-problem-statement"/>).</t>

          <t>IP multicast: Sources send multicast traffic to receivers via
          multicast mechanisms and do not need to advertise routes to attract
          return traffic from receivers.</t>

          <t>Traffic using non-routed source prefixes: Control or operational
          traffic may use IP addresses that are never advertised in BGP. These
          non-routed prefixes are used solely for protocol operation or
          internal purposes, and the traffic origin does not announce routes
          for these prefixes.</t>
        </list></t>

      <t>The TOA makes use of the template for RPKI digitally signed object
      <xref target="RFC6488"/>, which defines a Cryptographic Message Syntax
      (CMS) wrapper <xref target="RFC5652"/> for a generic validation
      procedure for RPKI signed objects. Therefore, to complete the
      specification of the TOA (see Section 4 of <xref target="RFC6488"/>),
      this document defines:<list style="symbols">
          <t>The OID that identifies the signed object as being a TOA. (This
          OID appears within the eContentType in the encapContentInfo object
          as well as the content-type signed attribute in the signerInfo
          object.)</t>

          <t>The ASN.1 syntax for the TOA eContent. (This is the payload that
          specifies the ASes being authorized to originate traffic as well as
          the prefixes that the ASes may use as the source IP address.) The
          TOA eContent is ASN.1 encoded using the Distinguished Encoding Rules
          (DER) <xref target="X.690"/>.</t>

          <t>Additional steps required to validate TOAs (in addition to the
          validation steps specified in <xref target="RFC6488"/>).</t>
        </list></t>

      <t>The content of a TOA identifies a list of one or more ASes that have
      been authorized by the IP address block holder to originate traffic and
      a list of one or more IP address prefixes within the address block that
      will be used as the source IP address. The IP address block holder can
      register one or more TOAs to authorize which ASes can originate traffic
      using specific prefixes within the block as the source IP address. By
      registering TOAs, IP address block holders can prevent their source IP
      addresses from being forged by unauthorized ASes, while allowing
      legitimate but non-announcing ASes to originate traffic. AS operators
      can leverage TOAs to improve the accuracy and robustness of SAV, thereby
      enhancing protection against source address spoofing attacks.</t>
    </section>

    <section title="The TOA Content Type">
      <t>The content-type for a TOA is defined as id-ct-trafficOriginAuthz and
      has the numerical value of 1.2.840.113549.1.9.16.1.TBD.</t>

      <t>This OID MUST appear within both the eContentType in the
      encapContentInfo object and the content-type signed attribute in the
      signerInfo object (see <xref target="RFC6488"/>).</t>
    </section>

    <section title="The TOA eContent">
      <t>The content of a TOA identifies a list of one or more ASes that have
      been authorized by the address block holder to originate traffic and a
      list of one or more IP address prefixes within the address block that
      will be used as the source IP address. A TOA is formally defined as:</t>

      <figure>
        <artwork><![CDATA[RPKI-TOA-2026
     { iso(1) member-body(2) us(840) rsadsi(113549)
       pkcs(1) pkcs9(9) smime(16) mod(0)
       id-mod-rpkiTOA-2026(TBD) }

DEFINITIONS EXPLICIT TAGS ::=
BEGIN

IMPORTS
  CONTENT-TYPE
  FROM CryptographicMessageSyntax-2010 -- in [RFC6268]
    { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
      pkcs-9(9) smime(16) modules(0) id-mod-cms-2009(58) } ;

ct-trafficOriginAttestation CONTENT-TYPE ::=
  { TYPE TrafficOriginAttestation 
    IDENTIFIED BY id-ct-trafficOriginAuthz }

id-ct-trafficOriginAuthz  OBJECT IDENTIFIER ::=
  { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
    pkcs-9(9) id-smime(16) id-ct(1) trafficOriginAuthz(TBD) }

TrafficOriginAttestation ::= SEQUENCE {
  version [0]   INTEGER DEFAULT 0,
  asSet         ASSet,
  ipAddrBlocks  SEQUENCE (SIZE(1..2)) OF TOAIPAddressFamily }

ASSet ::= SEQUENCE (SIZE(1..10000)) OF ASID
ASID ::= INTEGER (0..4294967295)

TOAIPAddressFamily ::= SEQUENCE {
  addressFamily  ADDRESS-FAMILY.&afi ({AddressFamilySet}),
  addresses      ADDRESS-FAMILY.&Addresses 
                                             ({AddressFamilySet}{@addressFamily}) }

ADDRESS-FAMILY ::= CLASS {
  &afi              OCTET STRING (SIZE(2)) UNIQUE,
  &Addresses
  } WITH SYNTAX { AFI &afi ADDRESSES &Addresses }

AddressFamilySet ADDRESS-FAMILY ::= 
  { addressFamilyIPv4 | addressFamilyIPv6 }

addressFamilyIPv4 ADDRESS-FAMILY ::= 
  { AFI afi-IPv4 ADDRESSES TOAAddressesIPv4 }
addressFamilyIPv6 ADDRESS-FAMILY ::= 
  { AFI afi-IPv6 ADDRESSES TOAAddressesIPv6 }

afi-IPv4 OCTET STRING ::= '0001'H
afi-IPv6 OCTET STRING ::= '0002'H

TOAAddressesIPv4 ::= SEQUENCE (SIZE(1..MAX)) OF TOAIPAddress{ub-IPv4}
TOAAddressesIPv6 ::= SEQUENCE (SIZE(1..MAX)) OF TOAIPAddress{ub-IPv6}

ub-IPv4 INTEGER ::= 32
ub-IPv6 INTEGER ::= 128

TOAIPAddress {INTEGER: ub} ::= BIT STRING (SIZE(0..ub))

END]]></artwork>
      </figure>

      <section title="The version Element">
        <t>The version number of the TrafficOriginAttestation entry MUST be
        0.</t>
      </section>

      <section title="The asSet Element">
        <t>The asSet element contains a set of AS numbers that are authorized
        to originate traffic using source IP addresses within the given IP
        address prefixes.</t>
      </section>

      <section title="The ipAddrBlocks Element">
        <t>The ipAddrBlocks element encodes the set of IP address prefixes
        that the specified set of ASes is authorized to use as source
        addresses when originating traffic.</t>

        <section title="TOAIPAddressFamily">
          <t>Within the TOAIPAddressFamily structure, the addressFamily
          element contains the Address Family Identifier (AFI) of an IP
          address family. Each addressFamily MUST be either 0001 or 0002.
          There MUST be only one instance of TOAIPAddressFamily per unique AFI
          in the TOA.</t>

          <t>The addresses field contains IP prefixes as a sequence of type
          TOAIPAddress.</t>
        </section>

        <section title="TOAIPAddress">
          <t>This element is of type BIT STRING and represents a single IP
          address prefix <xref target="RFC3779"/>.</t>
        </section>
      </section>
    </section>

    <section title="TOA Validation">
      <t>To validate a TOA, the Relying Party (RP) MUST perform all the
      validation checks specified in <xref target="RFC6488"/> as well as the
      following additional specific validation steps:<list style="symbols">
          <t>The IP address delegation extension <xref target="RFC3779"/> is
          present in the end-entity (EE) certificate (contained within the
          TOA), and every IP address prefix in the TOA payload is contained
          within the set of IP addresses specified by the EE certificate's IP
          address delegation extension.</t>

          <t>The EE certificate's IP address delegation extension MUST NOT
          contain "inherit" elements as described in <xref
          target="RFC3779"/>.</t>

          <t>The Autonomous System identifier delegation extension described
          in <xref target="RFC3779"/> is not used in TOAs and MUST NOT be
          present in the EE certificate.</t>

          <t>The TOA content fully conforms with all requirements specified in
          Sections 2 and 3.</t>
        </list></t>

      <t>If any of the above checks fail, the TOA MUST be considered invalid
      and an error SHOULD be logged.</t>
    </section>

    <section title="Security Considerations">
      <t>The security considerations of <xref target="RFC6481"/>, <xref
      target="RFC6485"/>, <xref target="RFC6488"/>, and <xref
      target="RFC9582"/> also apply to the TOA object.</t>
    </section>

    <section title="Operational Recommendations">
      <t>Operators should exercise care when deciding to register a Traffic
      Origin Authorization (TOA). A TOA is primarily useful in scenarios where
      the traffic origin AS and the route origin AS differ. In such cases,
      registering a TOA provides the necessary authorization for traffic
      origination while avoiding ambiguity between routing and traffic
      authorization.</t>

      <t>Conversely, when the same AS is both authorized to originate routes
      (via an existing Route Origin Authorization (ROA) <xref
      target="RFC9582"/>) and to originate traffic from a given prefix,
      creating an duplicated TOA would add unnecessary storage and
      transmission overhead in the RPKI system.</t>

      <t>Therefore, operators are RECOMMENDED to follow these practices:<list
          style="symbols">
          <t>Operators SHOULD NOT register a TOA that is identical to or
          covered by an existing ROA, unless there are valid operational
          reasons.</t>

          <t>TOA registrations SHOULD be periodically reviewed and updated to
          reflect current operational practices.</t>
        </list></t>

      <t>Another operational consideration concerns situations where a prefix
      holder has already signed a ROA for an AS and intends to register a TOA
      that covers multiple ASNs and prefixes. For example, suppose a prefix
      holder has an existing ROA {AS1, Prefix1} and wishes to create a TOA
      {(AS1, AS2, AS3), (Prefix1, Prefix2, Prefix3)}. In this case, the
      portion {AS1, Prefix1} is already covered by the ROA and is therefore
      redundant within the TOA. A straightforward way to avoid redundancy
      would be to split the TOA into smaller objects, such as {(AS1),
      (Prefix2, Prefix3)} and {(AS2, AS3), (Prefix1, Prefix2, Prefix3)}.
      However, doing so may unnecessarily increase operational complexity and
      management overhead. Therefore, it is RECOMMENDED to register a single
      consolidated TOA covering all relevant ASNs and prefixes. The existence
      of an overlapping ROA does not invalidate the TOA but should be
      understood in its respective scope: the ROA authorizes route origin,
      while the TOA authorizes traffic origin. This approach maintains clear
      semantics between routing and traffic authorization while minimizing
      operational burden.</t>

      <t>Following these recommendations minimizes overhead on the RPKI system
      while ensuring that TOAs are deployed effectively to enhance Source
      Address Validation (SAV).</t>
    </section>

    <section title="Enhancing SAV with TOAs">
      <t>Without TOAs, current SAV mechanisms (e.g., BAR-SAV <xref
      target="I-D.ietf-sidrops-bar-sav"/>) typically use BGP data, ROAs, or
      IRR route objects to determine the legitimate source IP address space of
      a given AS. However, due to the asymmetry between prefixes used as the
      source IP address and prefixes advertised into the routing system (as
      mentioned in Section 1), using BGP data, ROAs, and IRR route objects to
      perform SAV will cause improper blocks (i.e., blocking legitimate data
      packets).</t>

      <t>By registering TOAs, IP address block holders can prevent their
      source IP addresses from being forged by unauthorized ASes, while
      allowing legitimate but non-announcing ASes to originate traffic. AS
      operators can leverage TOAs to improve the accuracy and robustness of
      SAV, thereby enhancing protection against source address spoofing
      attacks.</t>

      <t>Note: If different ASes are authorized for overlapping prefixes
      (e.g., there are two TOAs {AS1, 203.0.113.0/24} and {AS2,
      203.0.113.0/28}), both AS1 and AS2 MUST be interpreted as authorized for
      the more specific prefix. If the intent is to restrict AS1 from the more
      specific prefix, the first TOA must be modified to explicitly exclude
      the more specific prefix.</t>
    </section>

    <section title="Summary of Discussions">
      <t>This section is to be removed before publishing as an RFC.</t>

      <t>Recent discussions on the SAVNET mailing list have considered whether
      it would be feasible to create a special ROA for an AS that is not
      authorized to originate a route to a given prefix, as an alternative to
      implementing TOA. Doing so would require extending ROAs or overloading
      their semantics to cover this use case, and may require modifications to
      existing Route Origin Validation (ROV) processing to prevent these
      special ROAs from being used. The TOA authors consulted ASN.1 experts on
      this approach, who strongly advised against it. Other participants also
      recommended against overloading ROA semantics. Accordingly, the current
      consensus among the TOA authors and many SAVNET participants is that
      defining a dedicated TOA object represents a more appropriate and robust
      solution.</t>

      <t>Some discussions have also proposed creating a conventional ROA for
      such scenarios, even though the AS is not authorized to originate routes
      to the given prefix. However, our analysis indicates that registering
      such a ROA introduces additional risks of forged-origin hijacking: an
      attacker could impersonate the AS listed in the ROA and announce a BGP
      route that would be considered RPKI-valid.</t>

      <t>Fundamentally, the choice of how to authorize the traffic origin
      rests with the prefix holder . If the prefix holder wishes ROAs to
      include only ASes authorized to originate routes to its prefix, there is
      a clear need to register a TOA to authorize other ASes to source traffic
      from the prefix. Conversely, if the prefix holder is unconcerned about
      forged-origin hijacking or other potential risks, they may instead
      choose to register a conventional ROA.</t>
    </section>

    <section title="IANA Considerations">
      <section title="SMI Security for S/MIME CMS Content Type (1.2.840.113549.1.9.16.1)">
        <t>IANA is requested to allocate the following in the "SMI Security
        for S/MIME CMS Content Type (1.2.840.113549.1.9.16.1)" registry:</t>

        <texttable>
          <ttcol>Decimal</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Reference</ttcol>

          <c>TBD</c>

          <c>id-ct-trafficOriginAuthz</c>

          <c>draft-qin-savnet-toa</c>
        </texttable>
      </section>

      <section title="RPKI Signed Objects Registry">
        <t>Please add an item for the TOA file extension to the RPKI Signed
        Object registry
        (https://www.iana.org/assignments/rpki/rpki.xhtml#signed-objects) as
        follows:</t>

        <texttable>
          <ttcol>Name</ttcol>

          <ttcol>OID</ttcol>

          <ttcol>Reference</ttcol>

          <c>Traffic Origin Authorization</c>

          <c>1.2.840.113549.1.9.16.1.TBD</c>

          <c>draft-qin-savnet-toa</c>
        </texttable>
      </section>

      <section title="File Extension">
        <t>Please add an item for the TOA file extension to the "RPKI
        Repository Name Scheme" registry created by <xref target="RFC6481"/>
        as follows:</t>

        <texttable>
          <ttcol>Filename Extension</ttcol>

          <ttcol>RPKI Object</ttcol>

          <ttcol>Reference</ttcol>

          <c>.toa</c>

          <c>Traffic Origin Authorization</c>

          <c>draft-qin-savnet-toa</c>
        </texttable>
      </section>

      <section title="SMI Security for S/MIME Module Identifier (1.2.840.113549.1.9.16.0)">
        <t>IANA is requested to allocate the following in the "SMI Security
        for S/MIME Module Identifier (1.2.840.113549.1.9.16.0)" registry:</t>

        <texttable>
          <ttcol>Decimal</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Reference</ttcol>

          <c>TBD</c>

          <c>id--rpkiTOA-2026</c>

          <c>draft-qin-savnet-toa</c>
        </texttable>
      </section>

      <section title="Media Type Registry">
        <t>The IANA is requested to register the media type
        application/rpki-toa in the "Media Type" registry as follows:<figure>
            <artwork><![CDATA[Type name: application
Subtype name: rpki-toa
Required parameters: N/A
Optional parameters: N/A
Encoding considerations: binary
Security considerations: Carries an RPKI TOA. This media type contains no active content. See Section 5 of draft-qin-savnet-toa for further information.
Interoperability considerations: None
Published specification: draft-qin-savnet-toa
Applications that use this media type: RPKI operators
Additional information:
  Content: This media type is a signed object, as defined in [RFC6488], which contains a payload of a list of prefixes and an AS identifier as defined in draft-qin-savnet-toa.
  Magic number(s): None
  File extension(s): .toa
  Macintosh file type code(s): None
Person & email address to contact for further information:
  Lancheng Qin <qinlc@mail.zgclab.edu.cn>
Intended usage: COMMON
Restrictions on usage: None
Change controller: IETF]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank Jeffrey Haas for his valuable
      contributions in enriching the use cases and clarifying the challenges
      described in Section 1. Special thanks also go to Job Snijders, who
      provided expert feedback on the ASN.1 considerations discussed in
      Section 8.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.5652'?>

      <?rfc include='reference.RFC.6488'?>

      <?rfc include='reference.RFC.3779'?>

      <?rfc include='reference.RFC.6485'?>

      <?rfc include='reference.RFC.6481'?>

      <reference anchor="X.690">
        <front>
          <title>"Information Technology - ASN.1 encoding rules: pecification
          of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and
          Distinguished Encoding Rules (DER)"</title>

          <author fullname="ITU-T">
            <organization/>
          </author>

          <date year="2021"/>
        </front>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8704'?>

      <?rfc include='reference.RFC.9582'?>

      <?rfc include='reference.I-D.ietf-savnet-inter-domain-problem-statement'?>

      <?rfc include='reference.I-D.ietf-sidrops-bar-sav'?>
    </references>
  </back>
</rfc>
