<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
 <!ENTITY rfc1918 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1918.xml">
 <!ENTITY rfc1930 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1930.xml">
 <!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
 <!ENTITY rfc3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
 <!ENTITY rfc4193 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4193.xml">
 <!ENTITY rfc4648 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml">
 <!ENTITY rfc5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
 <!ENTITY rfc6482 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6482.xml">
 <!ENTITY rfc6483 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6483.xml">
 <!ENTITY rfc6487 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6487.xml">
 <!ENTITY rfc6491 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6491.xml">
 <!ENTITY rfc6598 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6598.xml">
 <!ENTITY rfc6810 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6810.xml">
 <!ENTITY rfc6890 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6890.xml">
 <!ENTITY rfc6996 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6996.xml">

 <!ENTITY I-D.ietf-sidr-bgpsec-algs SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidr-bgpsec-algs.xml">
 <!ENTITY I-D.ietf-sidr-bgpsec-overview SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidr-bgpsec-overview.xml">
 <!ENTITY I-D.ietf-sidr-bgpsec-pki-profiles SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidr-bgpsec-pki-profiles.xml">
 <!ENTITY I-D.ietf-sidr-lta-use-cases SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidr-lta-use-cases.xml">
 <!ENTITY I-D.ietf-sidr-rpki-rtr-rfc6810-bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidr-rpki-rtr-rfc6810-bis.xml">
]>

<?rfc compact="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc strict="yes" ?>
<?rfc subcompact="no" ?>
<?rfc symrefs="yes" ?>
<?rfc toc="yes" ?>

<!--
 This document uses ABNF hex-encoded strings (e.g., %x74.61.72.67.65.74). To
 generate them, you can use the below python one-liner (replace 'foo' with the
 string you want to encode):

 '%x' + '.'.join(['%02x' % ord(x) for x in 'foo'])

 And to get the original string back:

 ''.join([chr(int(x, 16)) for x in '%x66.6f.6f'[2:].split('.')])
-->

<rfc category="std" docName="draft-ietf-sidr-slurm-01" ipr="trust200902">
 <front>
  <title abbrev="SLURM">Simplified Local internet nUmber Resource Management
   with the RPKI</title>

  <author initials="D." surname="Mandelberg" fullname="David Mandelberg">
   <organization>BBN Technologies</organization>
   <address>
    <postal>
     <street>10 Moulton St.</street>
     <city>Cambridge</city>
     <region>MA</region>
     <code>02138</code>
     <country>US</country>
    </postal>

    <email>david@mandelberg.org</email>
   </address>
  </author>

  <date />

  <workgroup>Secure Inter-Domain Routing</workgroup>

  <abstract>
   <t>The Resource Public Key Infrastructure (RPKI) is a global authorization
    infrastructure that allows the holder of Internet Number Resources (INRs) to
    make verifiable statements about those resources. Network operators, e.g.,
    Internet Service Providers (ISPs), can use the RPKI to validate BGP route
    origination assertions. In the future, ISPs also will be able to use the
    RPKI to validate the path of a BGP route. Some ISPs locally use BGP with
    private address space or private AS numbers (see RFC6890). These local BGP
    routes cannot be verified by the global RPKI, and SHOULD be considered
    invalid based on the global RPKI (see RFC6491). The mechanisms described
    below provide ISPs with a way to make local assertions about private
    (reserved) INRs while using the RPKI's assertions about all other INRs.</t>
  </abstract>
 </front>


 <middle>
  <section title="Introduction" anchor="sec_intro">
   <t>The Resource Public Key Infrastructure (RPKI) is a global authorization
    infrastructure that allows the holder of Internet Number Resources (INRs) to
    make verifiable statements about those resources. For example, the holder of
    a block of IP(v4 or v6) addresses can issue a Route Origination Authorization
    (ROA) <xref target="RFC6482" /> to authorize an Autonomous System (AS) to
    originate routes for that block.</t>

   <t>Internet Service Providers (ISPs) can then use the RPKI to validate BGP
    routes. (Validation of the origin of a route is described in <xref
    target="RFC6483" />, and validation of the path of a route is described in
    <xref target="I-D.ietf-sidr-bgpsec-overview" />.) However, some ISPs locally
    use BGP with private address space (<xref target="RFC1918" />, <xref
    target="RFC4193" />, <xref target="RFC6598" />) or private AS numbers (<xref
    target="RFC1930" />, <xref target="RFC6996" />). These local BGP routes
    cannot be verified by the global RPKI, and SHOULD be considered invalid when
    using the RPKI. For example, <xref target="RFC6491" /> recommends the
    creation of ROAs that would invalidate routes for reserved and unallocated
    address space.</t>

   <t>This document specifies two new mechanisms to enable ISPs to make local
    assertions about some INRs while using the RPKI's assertions about all
    other INRs. These mechanisms primarily support the second use case in <xref
    target="I-D.ietf-sidr-lta-use-cases" />, and may additionally support the
    third use case.  The second use case describes use of <xref
    target="RFC1918" /> addresses or use of public address space not allocated
    to the ISP that is using it.  The third use case describes a situation in
    which an ISP publishes a variant of the RPKI hierarchy (for its customers).
    In this variant some prefixes and/or AS numbers are different from what the
    RPKI repository system presents to the general ISP population.  The result
    is that routes for consumers of this variant hierarchy will be re-directed
    (via routing). Note that it also is possible to use SLURM to (locally)
    manipulate assertions about non-private INRs, e.g., allocated address space
    that is not globally routed. Network operators who elect to use SLURM in
    this fashion should use extreme caution. (The fact that SLURM can be used
    in this fashion is not an endorsement of such use by the author.)</t>

   <t>Both mechanisms are specified in terms of abstract sets of assertions. For
    Origin Validation <xref target="RFC6483" />, an assertion is a tuple of {IP
    prefix, prefix length, maximum length, AS number} as used by <xref
    target="RFC6810">rpki-rtr version 0</xref> and <xref
    target="I-D.ietf-sidr-rpki-rtr-rfc6810-bis">version 1</xref>. For <xref
    target="I-D.ietf-sidr-bgpsec-overview">BGPsec</xref>, an assertion is a
    tuple of {AS number, subject key identifier, router public key} as used by
    rpki-rtr version 1. (For the remainder of this document, these assertions
    are called Origin Validation assertions and BGPsec assertions,
    respectively.) Output Filtering, described in <xref target="sec_filtering"
    />, filters out (removes from consideration for routing decisions) any
    assertions in the RPKI about locally reserved INRs.  Locally Adding
    Assertions, described in <xref target="sec_adding" />, adds local
    assertions about locally reserved INRs.  The combination of both mechanisms
    is described in <xref target="sec_combining" />.</t>

   <t>To ensure local consistency, the effect of SLURM MUST be atomic. That
    is, the output of the relying party must be either the same as if SLURM
    were not used, or it must reflect the entire SLURM configuration. For an
    example of why this is required, consider the case of two local routes for
    the same prefix but different origin AS numbers. Both routes are configured
    with Locally Adding Assertions. If neither addition occurs, then both
    routes could be in the unknown state <xref target="RFC6483" />. If both
    additions occur then both routes would be in the valid state. However, if
    one addition occurs and the other does not, then one could be invalid while
    the other is valid.</t>

   <t>In general, the primary output of an RPKI relying party is the data it
    sends to routers over the rpki-rtr protocol. The rpki-rtr protocol enables
    routers to query a relying party for all assertions it knows about (Reset
    Query) or for an update of only the changes in assertions (Serial Query).
    The mechanisms specified in this document are to be applied to the result
    set for a Reset Query, and to both the old and new sets that are compared
    for a Serial Query. Relying party software MAY modify other forms of output
    in comparable ways, but that is outside the scope of this document.</t>

   <section title="Terminology" anchor="sec_terminology">
    <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 <xref target="RFC2119"/>.</t>
   </section>
  </section>

  <section title="Validation Output Filtering" anchor="sec_filtering">
   <t>To prevent the global RPKI from affecting routes with locally reserved
    INRs, a relying party is locally configured with a (possibly empty) list of
    IP prefixes and/or AS numbers that are used locally. (In general, these IP
    prefixes and AS numbers will be taken from reserved INR spaces.) Any Origin
    Validation assertions where the IP prefix is equal to or subsumed by a
    locally reserved IP prefix, are removed from the relying party's output.
    (Note that an Origin Validation assertion is not removed due to its AS
    number matching a locally reserved AS number.) Any BGPsec assertion where
    the AS number is equal to a locally reserved AS number is removed from the
    relying party's output.</t>
  </section>

  <section title="Locally Adding Assertions" anchor="sec_adding">
   <t>Each relying party is locally configured with a (possibly empty) list of
    assertions. This list is added to the relying party's output.</t>
  </section>

  <section title="Configuring SLURM" anchor="sec_configuring">
   <t>Relying party software SHOULD support the following configuration format
    for Validation Output Filtering and Locally Adding Assertions. The format is
    defined using the Augmented Backus-Naur Form (ABNF) notation and core rules
    from <xref target="RFC5234" /> and the rules &lt;IPv4address&gt; and
    &lt;IPv6address&gt; from Appendix A of <xref target="RFC3986" />. See <xref
    target="sec_example_config" /> for an example SLURM file.</t>

   <t>A SLURM configuration file, &lt;SLURMFile&gt;, consists of a head and a
    body. The head identifies the file as a SLURM configuration file, specifies
    the version of SLURM for which the file was written, and optionally contains
    other information described below. The body contains the configuration for
    Validation Output Filtering and Locally Adding Assertions.</t>

<figure><artwork>
   SLURMFile = head body

   head = firstLine *(commentLine / headLine)

   body = *(commentLine / bodyLine)

   firstLine = %x53.4c.55.52.4d SP "1.0" EOL ; "SLURM 1.0"

   commentLine = *WSP [comment] EOL

   headLine = *WSP headCommand [ 1*WSP [comment] ] EOL

   bodyLine = *WSP bodyCommand [ 1*WSP [comment] ] EOL

   comment = "#" *(VCHAR / WSP)

   EOL = CRLF / LF
</artwork></figure>

   <t>The head may specify a target. If present, the target string identifies
    the environment in which the SLURM file is intended to be used. The meaning
    of the target string, if any, is determined by the user. If a target is
    present, a relying party SHOULD verify that that the target is an acceptable
    value, and reject the SLURM file if the target is not acceptable. For
    example, the relying party could be configured to accept SLURM files only if
    they do not specify a target, have a target value of
    "hostname=rpki.example.com", or have a target value of "as=65536". If more
    than one target line is present, all targets must be acceptable to the
    RP.</t>

<figure><artwork>
   headCommand = target

   target =
      %x74.61.72.67.65.74 1*WSP ; "target"
      1*VCHAR
</artwork></figure>

   <t>The body contains zero or more configuration lines for Validation Output
    Filtering and Locally Adding Assertions. Each &lt;del&gt; command specifies
    an INR to use for Validation Output Filtering.  Each &lt;add&gt; command
    specifies an assertion to use for Locally Adding Assertions.</t>

<figure><artwork>
   bodyCommand = add / del

   add =
      %x61.64.64 1*WSP ; "add"
      addItem

   del =
      %x64.65.6c 1*WSP ; "del"
      delItem

   addItem = addItemPrefixAS / addItemASKey

   ; Add a mapping from a prefix and max length to an AS number.
   addItemPrefixAS =
      %x6f.72.69.67.69.6e.61.74.69.6f.6e 1*WSP ; "origination"
      IPprefixMaxLen 1*WSP
      ASnum

   ; Add a mapping from an AS number to a router public key.
   addItemASKey =
      %x62.67.70.73.65.63 1*WSP ; "bgpsec"
      ASnum 1*WSP
      RouterSKI 1*WSP
      RouterPubKey

   delItem = delItemPrefix / delItemAS

   ; Filter prefix-AS mappings, using the given prefix
   delItemPrefix =
      %x6f.72.69.67.69.6e.61.74.69.6f.6e 1*WSP ; "origination"
      IPprefix

   ; Filter AS-key mappings for the given AS
   delItemAS =
      %x62.67.70.73.65.63 1*WSP ; "bgpsec"
      ASnum

   IPprefix = IPv4prefix / IPv6prefix

   IPprefixMaxLen = IPv4prefixMaxLen / IPv6prefixMaxLen

   IPv4prefix = IPv4address "/" 1*2DIGIT
   IPv6prefix = IPv6address "/" 1*3DIGIT

   ; In the following two rules, if the maximum length component is
   ; missing, it is treated as equal to the prefix length.
   IPv4prefixMaxLen = IPv4prefix ["-" 1*2DIGIT]
   IPv6prefixMaxLen = IPv6prefix ["-" 1*3DIGIT]

   ASnum = 1*DIGIT

   ; This is the Base64 [RFC4648] encoding of a router certificate's
   ; Subject Key Identifer, as described in
   ; [I-D.ietf-sidr-bgpsec-pki-profiles] and [RFC6487]. This is the
   ; value of the ASN.1 OCTET STRING without the ASN.1 tag or length
   ; fields.
   RouterSKI = Base64

   ; This is the Base64 [RFC4648] encoding of a router public key's
   ; subjectPublicKeyInfo value, as described in
   ; [I-D.ietf-sidr-bgpsec-algs]. This is the full ASN.1 DER encoding
   ; of the subjectPublicKeyInfo, including the ASN.1 tag and length
   ; values of the subjectPublicKeyInfo SEQUENCE.
   RouterPubKey = Base64

   Base64 = 1*(ALPHA / DIGIT / "+" / "/") 0*2"="
</artwork></figure>

   <t>An implementation MAY support the concurrent use of multiple SLURM files.
    In this case, the resulting inputs to Validation Output Filtering and
    Locally Adding Assertions are the respective unions of the inputs from each
    file. The envisioned typical use case for multiple files is when the files
    have distinct scopes.  For example, an organization may belong to two
    separate networks that use different private-use IP prefixes and AS
    numbers. To detect conflict between multiple SLURM files, a relying party
    SHOULD issue a warning in the following cases:</t>

   <t><list style="numbers">
    <t>There may be conflicting changes to Origin Validation assertions if there
     exists an IP address X and distinct SLURM files Y,Z such that X is
     contained by any prefix in any &lt;addItemPrefixAS&gt; or
     &lt;delItemPrefix&gt; in file Y and X is contained by any prefix in any
     &lt;addItemPrefixAS&gt; or &lt;delItemPrefix&gt; in file Z.</t>

    <t>There may be conflicting changes to BGPsec assertions if there exists an
     AS number X and distinct SLURM files Y,Z such that X is used in any
     &lt;addItemASKey&gt; or &lt;delItemAS&gt; in file Y and X is used in any
     &lt;addItemASKey&gt; or &lt;delItemAS&gt; in file Z.</t>
   </list></t>
  </section>

  <section title="Combining Mechanisms" anchor="sec_combining">
   <t>In the envisioned typical use case, a relying party uses both output
    filtering and locally added assertions. In this case, the resulting
    assertions MUST be the same as if output filtering were performed before
    locally adding assertions. I.e., locally added assertions MUST NOT be
    removed by output filtering.</t>
  </section>

  <section title="IANA Considerations" anchor="sec_iana">
   <t>None.</t>
  </section>

  <section title="Security Considerations" anchor="sec_security">
   <t>The mechanisms described in this document provide a network operator with
    additional ways to control its own network while making use of RPKI data.
    These mechanisms are applied only locally; they do not influence how other
    network operators interpret RPKI data. Nonetheless, care should be taken in
    how these mechanisms are employed.</t>
  </section>

  <section title="Acknowledgements" anchor="sec_acknowledgements">
   <t>The author would like to thank Stephen Kent for his guidance and detailed
    reviews of this document. Thanks go to Wesley Wang for the idea behind the
    target command, to Declan Ma for the idea behind use of multiple SLURM
    files, and to Richard Hansen for his careful reviews.</t>
  </section>
 </middle>

 <back>
  <references title="Informative References">
   &rfc1918;
   &rfc1930;
   &rfc4193;
   &rfc6482;
   &rfc6483;
   &rfc6491;
   &rfc6598;
   &rfc6810;
   &rfc6890;
   &rfc6996;

   &I-D.ietf-sidr-bgpsec-overview;
   &I-D.ietf-sidr-lta-use-cases;
   &I-D.ietf-sidr-rpki-rtr-rfc6810-bis;
  </references>

  <references title="Normative References">
   &rfc2119;
   &rfc3986;
   &rfc4648;
   &rfc5234;
   &rfc6487;

   <!--
    TODO: delete the below and use &I-D.ietf-sidr-bgpsec-algs; instead, once it
    doesn't cause an error.
   -->
   <reference anchor='I-D.ietf-sidr-bgpsec-algs'>
    <front>
     <title>BGP Algorithms, Key Formats, &amp; Signature Formats</title>
     <author initials="S." surname="Turner" fullname="Sean Turner" />
     <date month='November' day='10' year='2015' />
    </front>
    <seriesInfo name='Internet-Draft' value='draft-ietf-sidr-bgpsec-algs-14' />
   </reference>
   &I-D.ietf-sidr-bgpsec-pki-profiles;
  </references>

  <section title="Example SLURM File" anchor="sec_example_config">
<figure><artwork>
SLURM 1.0

# This file is only intended to be used on a relying party running
# on rpki.example.com.
target hostname=rpki.example.com # this is a comment

# Reserve IP prefixes for local use.
del origination 10.0.0.0/24
del origination fd0b:dd1d:2dcc::/48

# Reserve AS numbers for local use.
del bgpsec 64512
del bgpsec 64513

# Allow either 64512 or 64513 to originate routes to 10.0.0.0/24.
add origination 10.0.0.0/24 64512
add origination 10.0.0.0/24 64513

# 64512 originates fd0b:dd1d:2dcc::/52 and sub-prefixes up to length
# 56.
add origination fd0b:dd1d:2dcc::/52-56 64512

# However, 64513 originates fd0b:dd1d:2dcc:42::/64.
add origination fd0b:dd1d:2dcc:42::/64 64513

# 64513 also originates fd0b:dd1d:2dcc:100::/52
add origination fd0b:dd1d:2dcc:100::/52 64513

# Authorize router keys to sign BGPsec paths on behalf of the
# specified ASes. Note that the Base64 strings used in this
# example are not valid SKIs or router public keys, due to line
# length restrictions in RFCs.
add bgpsec 64512 Zm9v VGhpcyBpcyBub3QgYSByb3V0ZXIgcHVibGljIGtleQ==
add bgpsec 64512 YmFy b3IgYSBmbG9jayBvZiBkdWNrcw==
add bgpsec 64513 YWJj bWF5YmUgYSBkaWZmZXJlbnQgYXZpYW4gY2Fycmllcj8=
</artwork></figure>
  </section>
 </back>
</rfc>
