idnits 2.17.1 draft-ietf-sidr-rpki-rtr-rfc6810-bis-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC6810, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 6, 2015) is 3124 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-18) exists of draft-ietf-sidr-bgpsec-algs-11 ** Obsolete normative reference: RFC 2385 (Obsoleted by RFC 5925) ** Downref: Normative reference to an Informational RFC: RFC 3269 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Bush 3 Internet-Draft Internet Initiative Japan 4 Obsoletes: 6810 (if approved) R. Austein 5 Intended status: Standards Track Dragon Research Labs 6 Expires: April 8, 2016 October 6, 2015 8 The Resource Public Key Infrastructure (RPKI) to Router Protocol 9 draft-ietf-sidr-rpki-rtr-rfc6810-bis-06 11 Abstract 13 In order to verifiably validate the origin Autonomous Systems and 14 Autonomous System Paths of BGP announcements, routers need a simple 15 but reliable mechanism to receive Resource Public Key Infrastructure 16 (RFC 6480) prefix origin data and router keys from a trusted cache. 17 This document describes a protocol to deliver validated prefix origin 18 data and router keys to routers. 20 This document describes version 1 of the rpki-rtr protocol. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on April 8, 2016. 39 Copyright Notice 41 Copyright (c) 2015 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 57 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 58 1.2. Changes from RFC 6810 . . . . . . . . . . . . . . . . . . 3 59 2. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3. Deployment Structure . . . . . . . . . . . . . . . . . . . . 4 61 4. Operational Overview . . . . . . . . . . . . . . . . . . . . 5 62 5. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . 6 63 5.1. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 6 64 5.2. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 8 65 5.3. Serial Query . . . . . . . . . . . . . . . . . . . . . . 9 66 5.4. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 10 67 5.5. Cache Response . . . . . . . . . . . . . . . . . . . . . 11 68 5.6. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 11 69 5.7. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 13 70 5.8. End of Data . . . . . . . . . . . . . . . . . . . . . . . 13 71 5.9. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 14 72 5.10. Router Key . . . . . . . . . . . . . . . . . . . . . . . 15 73 5.11. Error Report . . . . . . . . . . . . . . . . . . . . . . 16 74 6. Protocol Timing Parameters . . . . . . . . . . . . . . . . . 17 75 7. Protocol Version Negotiation . . . . . . . . . . . . . . . . 18 76 8. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . 20 77 8.1. Start or Restart . . . . . . . . . . . . . . . . . . . . 20 78 8.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . 21 79 8.3. No Incremental Update Available . . . . . . . . . . . . . 21 80 8.4. Cache Has No Data Available . . . . . . . . . . . . . . . 22 81 9. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 22 82 9.1. SSH Transport . . . . . . . . . . . . . . . . . . . . . . 24 83 9.2. TLS Transport . . . . . . . . . . . . . . . . . . . . . . 24 84 9.3. TCP MD5 Transport . . . . . . . . . . . . . . . . . . . . 25 85 9.4. TCP-AO Transport . . . . . . . . . . . . . . . . . . . . 25 86 10. Router-Cache Setup . . . . . . . . . . . . . . . . . . . . . 26 87 11. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . 27 88 12. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 28 89 13. Security Considerations . . . . . . . . . . . . . . . . . . . 29 90 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 91 15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 31 92 16. References . . . . . . . . . . . . . . . . . . . . . . . . . 31 93 16.1. Normative References . . . . . . . . . . . . . . . . . . 31 94 16.2. Informative References . . . . . . . . . . . . . . . . . 32 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 97 1. Introduction 99 In order to verifiably validate the origin Autonomous Systems (ASes) 100 and AS paths of BGP announcements, routers need a simple but reliable 101 mechanism to receive cryptographically validated Resource Public Key 102 Infrastructure (RPKI) [RFC6480] prefix origin data and router keys 103 from a trusted cache. This document describes a protocol to deliver 104 validated prefix origin data and router keys to routers. The design 105 is intentionally constrained to be usable on much of the current 106 generation of ISP router platforms. 108 Section 3 describes the deployment structure, and Section 4 then 109 presents an operational overview. The binary payloads of the 110 protocol are formally described in Section 5, and the expected 111 Protocol Data Unit (PDU) sequences are described in Section 8. The 112 transport protocol options are described in Section 9. Section 10 113 details how routers and caches are configured to connect and 114 authenticate. Section 11 describes likely deployment scenarios. The 115 traditional security and IANA considerations end the document. 117 The protocol is extensible in order to support new PDUs with new 118 semantics, if deployment experience indicates they are needed. PDUs 119 are versioned should deployment experience call for change. 121 For an implementation (not interoperability) report on the use of 122 this protocol with prefix origin data, see [RFC7128]. 124 1.1. Requirements Language 126 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 127 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 128 document are to be interpreted as described in RFC 2119 [RFC2119] 129 only when they appear in all upper case. They may also appear in 130 lower or mixed case as English words, without special meaning. 132 1.2. Changes from RFC 6810 134 The protocol described in this document is largely compatible with 135 [RFC6810]. This section summarizes the significant changes. 137 o New Router Key PDU type (Section 5.10) added. 139 o Explicit timing parameters (Section 5.8, Section 6) added. 141 o Protocol version number incremented from zero to one. 143 o Protocol version number negotiation (Section 7) added. 145 2. Glossary 147 The following terms are used with special meaning. 149 Global RPKI: The authoritative data of the RPKI are published in a 150 distributed set of servers at the IANA, Regional Internet 151 Registries (RIRs), National Internet Registries (NIRs), and ISPs; 152 see [RFC6481]. 154 Cache: A coalesced copy of the published Global RPKI data, 155 periodically fetched or refreshed, directly or indirectly, using 156 the [RFC5781] protocol or some successor protocol. Relying party 157 software is used to gather and validate the distributed data of 158 the RPKI into a cache. Trusting this cache further is a matter 159 between the provider of the cache and a relying party. 161 Serial Number: A 32-bit strictly increasing unsigned integer which 162 wraps from 2^32-1 to 0. It denotes the logical version of a 163 cache. A cache increments the value when it successfully updates 164 its data from a parent cache or from primary RPKI data. While a 165 cache is receiving updates, new incoming data and implicit deletes 166 are associated with the new serial but MUST NOT be sent until the 167 fetch is complete. A Serial Number is not commensurate between 168 different caches or different protocol versions, nor need it be 169 maintained across resets of the cache server. See [RFC1982] on 170 DNS Serial Number Arithmetic for too much detail on the topic. 172 Session ID: When a cache server is started, it generates a Session 173 ID to uniquely identify the instance of the cache and to bind it 174 to the sequence of Serial Numbers that cache instance will 175 generate. This allows the router to restart a failed session 176 knowing that the Serial Number it is using is commensurate with 177 that of the cache. 179 Payload PDU: A protocol message which contains data for use by the 180 router, as opposed to a PDU which just conveys the semantics of 181 this protocol. Prefixes and Router Keys are examples of payload 182 PDUs. 184 3. Deployment Structure 186 Deployment of the RPKI to reach routers has a three-level structure 187 as follows: 189 Global RPKI: The authoritative data of the RPKI are published in a 190 distributed set of servers, RPKI publication repositories, e.g., 191 by the IANA, RIRs, NIRs, and ISPs (see [RFC6481]). 193 Local Caches: A local set of one or more collected and verified 194 caches. A relying party, e.g., router or other client, MUST have 195 a trust relationship with, and a trusted transport channel to, any 196 cache(s) it uses. 198 Routers: A router fetches data from a local cache using the protocol 199 described in this document. It is said to be a client of the 200 cache. There MAY be mechanisms for the router to assure itself of 201 the authenticity of the cache and to authenticate itself to the 202 cache. 204 4. Operational Overview 206 A router establishes and keeps open a connection to one or more 207 caches with which it has client/server relationships. It is 208 configured with a semi-ordered list of caches, and establishes a 209 connection to the most preferred cache, or set of caches, which 210 accept the connections. 212 The router MUST choose the most preferred, by configuration, cache or 213 set of caches so that the operator may control load on their caches 214 and the Global RPKI. 216 Periodically, the router sends to the cache the most recent Serial 217 Number for which it has has received data from that cache, i.e., the 218 router's current Serial Number, in the form of a Serial Query. When 219 a router establishes a new session with a cache, or wishes to reset a 220 current relationship, it sends a Reset Query. 222 The cache responds to the Serial Query with all data changes which 223 took place since the given Serial Number. This may be the null set, 224 in which case the End of Data PDU is still sent. Note that the 225 Serial Number comparison used to determine "since the given Serial 226 Number" MUST take wrap-around into account, see [RFC1982]. 228 When the router has received all data records from the cache, it sets 229 its current Serial Number to that of the Serial Number in the End of 230 Data PDU. 232 When the cache updates its database, it sends a Notify message to 233 every currently connected router. This is a hint that now would be a 234 good time for the router to poll for an update, but is only a hint. 235 The protocol requires the router to poll for updates periodically in 236 any case. 238 Strictly speaking, a router could track a cache simply by asking for 239 a complete data set every time it updates, but this would be very 240 inefficient. The Serial Number based incremental update mechanism 241 allows an efficient transfer of just the data records which have 242 changed since last update. As with any update protocol based on 243 incremental transfers, the router must be prepared to fall back to a 244 full transfer if for any reason the cache is unable to provide the 245 necessary incremental data. Unlike some incremental transfer 246 protocols, this protocol requires the router to make an explicit 247 request to start the fallback process; this is deliberate, as the 248 cache has no way of knowing whether the router has also established 249 sessions with other caches that may be able to provide better 250 service. 252 As a cache server must evaluate certificates and ROAs (Route Origin 253 Attestations; see [RFC6480]), which are time dependent, servers' 254 clocks MUST be correct to a tolerance of approximately an hour. 256 5. Protocol Data Units (PDUs) 258 The exchanges between the cache and the router are sequences of 259 exchanges of the following PDUs according to the rules described in 260 Section 8. 262 Reserved fields (marked "zero" in PDU diagrams) MUST be zero on 263 transmission, and SHOULD be ignored on receipt. 265 5.1. Fields of a PDU 267 PDUs contain the following data elements: 269 Protocol Version: An eight-bit unsigned integer, currently 1, 270 denoting the version of this protocol. 272 PDU Type: An eight-bit unsigned integer, denoting the type of the 273 PDU, e.g., IPv4 Prefix, etc. 275 Serial Number: The Serial Number of the RPKI Cache when this set of 276 PDUs was received from an upstream cache server or gathered from 277 the Global RPKI. A cache increments its Serial Number when 278 completing a rigorously validated update from a parent cache or 279 the Global RPKI. 281 Session ID: A 16-bit unsigned integer. When a cache server is 282 started, it generates a Session ID to identify the instance of the 283 cache and to bind it to the sequence of Serial Numbers that cache 284 instance will generate. This allows the router to restart a 285 failed session knowing that the Serial Number it is using is 286 commensurate with that of the cache. If, at any time after the 287 protocol version has been negotiated (Section 7), either the 288 router or the cache finds the value of the Session ID is not the 289 same as the other's, the party which detects the mismatch MUST 290 immediately terminate the session with an Error Report PDU with 291 code 0 ("Corrupt Data"), and the router MUST flush all data 292 learned from that cache. 294 Note that sessions are specific to a particular protocol version. 295 That is: if a cache server supports multiple versions of this 296 protocol, happens to use the same Session ID value for multiple 297 protocol versions, and further happens to use the same Serial 298 Number values for two or more sessions using the same Session ID 299 but different Protocol Version values, the serial numbers are not 300 commensurate. The full test for whether serial numbers are 301 commensurate requires comparing Protocol Version, Session ID, and 302 Serial Number. To reduce the risk of confusion, cache servers 303 SHOULD NOT use the same Session ID across multiple protocol 304 versions, but even if they do, routers MUST treat sessions with 305 different Protocol Version fields as separate sessions even if 306 they do happen to have the same Session ID. 308 Should a cache erroneously reuse a Session ID so that a router 309 does not realize that the session has changed (old Session ID and 310 new Session ID have same numeric value), the router may become 311 confused as to the content of the cache. The time it takes the 312 router to discover it is confused will depend on whether the 313 Serial Numbers are also reused. If the Serial Numbers in the old 314 and new sessions are different enough, the cache will respond to 315 the router's Serial Query with a Cache Reset, which will solve the 316 problem. If, however, the Serial Numbers are close, the cache may 317 respond with a Cache Response, which may not be enough to bring 318 the router into sync. In such cases, it's likely but not certain 319 that the router will detect some discrepancy between the state 320 that the cache expects and its own state. For example, the Cache 321 Response may tell the router to drop a record which the router 322 does not hold, or may tell the router to add a record which the 323 router already has. In such cases, a router will detect the error 324 and reset the session. The one case in which the router may stay 325 out of sync is when nothing in the Cache Response contradicts any 326 data currently held by the router. 328 Using persistent storage for the Session ID or a clock-based 329 scheme for generating Session IDs should avoid the risk of Session 330 ID collisions. 332 The Session ID might be a pseudo-random value, a strictly 333 increasing value if the cache has reliable storage, etc. 335 Length: A 32-bit unsigned integer which has as its value the count 336 of the bytes in the entire PDU, including the eight bytes of 337 header which end with the length field. 339 Flags: The lowest order bit of the Flags field is 1 for an 340 announcement and 0 for a withdrawal. For a Prefix PDU (IPv4 or 341 IPv6), the flag indicates whether this PDU announces a new right 342 to announce the prefix or withdraws a previously announced right; 343 a withdraw effectively deletes one previously announced Prefix PDU 344 with the exact same Prefix, Length, Max-Len, and Autonomous System 345 Number (ASN). Similarly, for a Router Key PDU, the flag indicates 346 whether this PDU announces a new Router Key or deletes one 347 previously announced Router Key PDU with the exact same AS Number, 348 subjectKeyIdentifier, and subjectPublicKeyInfo. 350 The remaining bits in the flags field are reserved for future use. 351 In protocol version 1, they MUST be 0 on transmission and SHOULD 352 be ignored on receipt. 354 Prefix Length: An 8-bit unsigned integer denoting the shortest 355 prefix allowed for the prefix. 357 Max Length: An 8-bit unsigned integer denoting the longest prefix 358 allowed by the prefix. This MUST NOT be less than the Prefix 359 Length element. 361 Prefix: The IPv4 or IPv6 prefix of the ROA. 363 Autonomous System Number: A 32-bit unsigned integer representing an 364 ASN allowed to announce a prefix or associated with a router key. 366 Subject Key Identifier: 20-octet Subject Key Identifier (SKI) value 367 of a router key, as described in [RFC6487]. 369 Subject Public Key Info: a router key's subjectPublicKeyInfo value, 370 as described in [I-D.ietf-sidr-bgpsec-algs]. This is the full 371 ASN.1 DER encoding of the subjectPublicKeyInfo, including the 372 ASN.1 tag and length values of the subjectPublicKeyInfo SEQUENCE. 374 Zero: Fields shown as zero MUST be zero on transmission. The value 375 of such a field SHOULD be ignored on receipt. 377 5.2. Serial Notify 379 The cache notifies the router that the cache has new data. 381 The Session ID reassures the router that the Serial Numbers are 382 commensurate, i.e., the cache session has not been changed. 384 Upon receipt of a Serial Notify PDU, the router MAY issue an 385 immediate Serial Query (Section 5.3) or Reset Query (Section 5.4) 386 without waiting for the Refresh Interval timer (see Section 6) to 387 expire. 389 Serial Notify is the only message that the cache can send that is not 390 in response to a message from the router. 392 If the router receives a Serial Notify PDU during the initial start- 393 up period where the router and cache are still negotiating to agree 394 on a protocol version, the router SHOULD simply ignore the Serial 395 Notify PDU, even if the Serial Notify PDU is for an unexpected 396 protocol version. See Section 7 for details. 398 0 8 16 24 31 399 .-------------------------------------------. 400 | Protocol | PDU | | 401 | Version | Type | Session ID | 402 | 1 | 0 | | 403 +-------------------------------------------+ 404 | | 405 | Length=12 | 406 | | 407 +-------------------------------------------+ 408 | | 409 | Serial Number | 410 | | 411 `-------------------------------------------' 413 5.3. Serial Query 415 The router sends Serial Query to ask the cache for all announcements 416 and withdrawals which have occurred since the Serial Number specified 417 in the Serial Query. 419 The cache replies to this query with a Cache Response PDU 420 (Section 5.5) if the cache has a, possibly null, record of the 421 changes since the Serial Number specified by the router, followed by 422 zero or more payload PDUs and an End Of Data PDU (Section 5.8). 424 When replying to a Serial Query, the cache MUST return the minimum 425 set of changes needed to bring the router into sync with the cache. 426 That is, if a particular prefix or router key underwent multiple 427 changes between the Serial Number specified by the router and the 428 cache's current Serial Number, the cache MUST merge those changes to 429 present the simplest possible view of those changes to the router. 430 In general, this means that, for any particular prefix or router key, 431 the data stream will include at most one withdrawal followed by at 432 most one announcement, and if all of the changes cancel out, the data 433 stream will not mention the prefix or router key at all. 435 The rationale for this approach is that the entire purpose of the 436 rpki-rtr protocol is to offload work from the router to the cache, 437 and it should therefore be the cache's job to simplify the change 438 set, thus reducing work for the router. 440 If the cache does not have the data needed to update the router, 441 perhaps because its records do not go back to the Serial Number in 442 the Serial Query, then it responds with a Cache Reset PDU 443 (Section 5.9). 445 The Session ID tells the cache what instance the router expects to 446 ensure that the Serial Numbers are commensurate, i.e., the cache 447 session has not been changed. 449 0 8 16 24 31 450 .-------------------------------------------. 451 | Protocol | PDU | | 452 | Version | Type | Session ID | 453 | 1 | 1 | | 454 +-------------------------------------------+ 455 | | 456 | Length=12 | 457 | | 458 +-------------------------------------------+ 459 | | 460 | Serial Number | 461 | | 462 `-------------------------------------------' 464 5.4. Reset Query 466 The router tells the cache that it wants to receive the total active, 467 current, non-withdrawn database. The cache responds with a Cache 468 Response PDU (Section 5.5), followed by zero or more payload PDUs and 469 an End of Data PDU (Section 5.8). 471 0 8 16 24 31 472 .-------------------------------------------. 473 | Protocol | PDU | | 474 | Version | Type | zero | 475 | 1 | 2 | | 476 +-------------------------------------------+ 477 | | 478 | Length=8 | 479 | | 480 `-------------------------------------------' 482 5.5. Cache Response 484 The cache responds to queries with zero or more payload PDUs. When 485 replying to a Serial Query (Section 5.3), the cache sends the set of 486 announcements and withdrawals that have occurred since the Serial 487 Number sent by the client router. When replying to a Reset Query 488 (Section 5.4), the cache sends the set of all data records it has; in 489 this case, the withdraw/announce field in the payload PDUs MUST have 490 the value 1 (announce). 492 In response to a Reset Query, the new value of the Session ID tells 493 the router the instance of the cache session for future confirmation. 494 In response to a Serial Query, the Session ID being the same 495 reassures the router that the Serial Numbers are commensurate, i.e., 496 the cache session has not changed. 498 0 8 16 24 31 499 .-------------------------------------------. 500 | Protocol | PDU | | 501 | Version | Type | Session ID | 502 | 1 | 3 | | 503 +-------------------------------------------+ 504 | | 505 | Length=8 | 506 | | 507 `-------------------------------------------' 509 5.6. IPv4 Prefix 510 0 8 16 24 31 511 .-------------------------------------------. 512 | Protocol | PDU | | 513 | Version | Type | zero | 514 | 1 | 4 | | 515 +-------------------------------------------+ 516 | | 517 | Length=20 | 518 | | 519 +-------------------------------------------+ 520 | | Prefix | Max | | 521 | Flags | Length | Length | zero | 522 | | 0..32 | 0..32 | | 523 +-------------------------------------------+ 524 | | 525 | IPv4 Prefix | 526 | | 527 +-------------------------------------------+ 528 | | 529 | Autonomous System Number | 530 | | 531 `-------------------------------------------' 533 The lowest order bit of the Flags field is 1 for an announcement and 534 0 for a withdrawal. 536 In the RPKI, nothing prevents a signing certificate from issuing two 537 identical ROAs. In this case, there would be no semantic difference 538 between the objects, merely a process redundancy. 540 In the RPKI, there is also an actual need for what might appear to a 541 router as identical IPvX PDUs. This can occur when an upstream 542 certificate is being reissued or there is an address ownership 543 transfer up the validation chain. The ROA would be identical in the 544 router sense, i.e., have the same {Prefix, Len, Max-Len, ASN}, but a 545 different validation path in the RPKI. This is important to the 546 RPKI, but not to the router. 548 The cache server MUST ensure that it has told the router client to 549 have one and only one IPvX PDU for a unique {Prefix, Len, Max-Len, 550 ASN} at any one point in time. Should the router client receive an 551 IPvX PDU with a {Prefix, Len, Max-Len, ASN} identical to one it 552 already has active, it SHOULD raise a Duplicate Announcement Received 553 error. 555 5.7. IPv6 Prefix 557 0 8 16 24 31 558 .-------------------------------------------. 559 | Protocol | PDU | | 560 | Version | Type | zero | 561 | 1 | 6 | | 562 +-------------------------------------------+ 563 | | 564 | Length=32 | 565 | | 566 +-------------------------------------------+ 567 | | Prefix | Max | | 568 | Flags | Length | Length | zero | 569 | | 0..128 | 0..128 | | 570 +-------------------------------------------+ 571 | | 572 +--- ---+ 573 | | 574 +--- IPv6 Prefix ---+ 575 | | 576 +--- ---+ 577 | | 578 +-------------------------------------------+ 579 | | 580 | Autonomous System Number | 581 | | 582 `-------------------------------------------' 584 Analogous to the IPv4 Prefix PDU, it has 96 more bits and no magic. 586 5.8. End of Data 588 The cache tells the router it has no more data for the request. 590 The Session ID and Protocol Version MUST be the same as that of the 591 corresponding Cache Response which began the, possibly null, sequence 592 of payload PDUs. 594 0 8 16 24 31 595 .-------------------------------------------. 596 | Protocol | PDU | | 597 | Version | Type | Session ID | 598 | 1 | 7 | | 599 +-------------------------------------------+ 600 | | 601 | Length=24 | 602 | | 603 +-------------------------------------------+ 604 | | 605 | Serial Number | 606 | | 607 +-------------------------------------------+ 608 | | 609 | Refresh Interval | 610 | | 611 +-------------------------------------------+ 612 | | 613 | Retry Interval | 614 | | 615 +-------------------------------------------+ 616 | | 617 | Expire Interval | 618 | | 619 `-------------------------------------------' 621 The Refresh Interval, Retry Interval, and Expire Interval are all 622 32-bit elapsed times measured in seconds, and express the timing 623 parameters that the cache expects the router to use to decide when 624 next to send the cache another Serial Query or Reset Query PDU. See 625 Section 6 for an explanation of the use and the range of allowed 626 values for these parameters. 628 5.9. Cache Reset 630 The cache may respond to a Serial Query informing the router that the 631 cache cannot provide an incremental update starting from the Serial 632 Number specified by the router. The router must decide whether to 633 issue a Reset Query or switch to a different cache. 635 0 8 16 24 31 636 .-------------------------------------------. 637 | Protocol | PDU | | 638 | Version | Type | zero | 639 | 1 | 8 | | 640 +-------------------------------------------+ 641 | | 642 | Length=8 | 643 | | 644 `-------------------------------------------' 646 5.10. Router Key 648 0 8 16 24 31 649 .-------------------------------------------. 650 | Protocol | PDU | | | 651 | Version | Type | Flags | zero | 652 | 1 | 9 | | | 653 +-------------------------------------------+ 654 | | 655 | Length | 656 | | 657 +-------------------------------------------+ 658 | | 659 +--- ---+ 660 | Subject Key Identifier | 661 +--- ---+ 662 | | 663 +--- ---+ 664 | (20 octets) | 665 +--- ---+ 666 | | 667 +-------------------------------------------+ 668 | | 669 | AS Number | 670 | | 671 +-------------------------------------------+ 672 | | 673 | Subject Public Key Info | 674 | | 675 `-------------------------------------------' 677 The lowest order bit of the Flags field is 1 for an announcement and 678 0 for a withdrawal. 680 The cache server MUST ensure that it has told the router client to 681 have one and only one Router Key PDU for a unique {SKI, ASN, Subject 682 Public Key} at any one point in time. Should the router client 683 receive a Router Key PDU with a {SKI, ASN, Subject Public Key} 684 identical to one it already has active, it SHOULD raise a Duplicate 685 Announcement Received error. 687 Note that a particular ASN may appear in multiple Router Key PDUs 688 with different Subject Public Key values, while a particular Subject 689 Public Key value may appear in multiple Router Key PDUs with 690 different ASNs. In the interest of keeping the announcement and 691 withdrawal semantics as simple as possible for the router, this 692 protocol makes no attempt to compress either of these cases. 694 Also note that it is possible, albeit very unlikely, for multiple 695 distinct Subject Public Key values to hash to the same SKI. For this 696 reason, implementations MUST compare Subject Public Key values as 697 well as SKIs when detecting duplicate PDUs. 699 5.11. Error Report 701 This PDU is used by either party to report an error to the other. 703 Error reports are only sent as responses to other PDUs. 705 The Error Code is described in Section 12. 707 If the error is generic (e.g., "Internal Error") and not associated 708 with the PDU to which it is responding, the Erroneous PDU field MUST 709 be empty and the Length of Encapsulated PDU field MUST be zero. 711 An Error Report PDU MUST NOT be sent for an Error Report PDU. If an 712 erroneous Error Report PDU is received, the session SHOULD be 713 dropped. 715 If the error is associated with a PDU of excessive length, i.e., too 716 long to be any legal PDU other than another Error Report, or a 717 possibly corrupt length, the Erroneous PDU field MAY be truncated. 719 The diagnostic text is optional; if not present, the Length of Error 720 Text field MUST be zero. If error text is present, it MUST be a 721 string in UTF-8 encoding (see [RFC3269]). 723 0 8 16 24 31 724 .-------------------------------------------. 725 | Protocol | PDU | | 726 | Version | Type | Error Code | 727 | 1 | 10 | | 728 +-------------------------------------------+ 729 | | 730 | Length | 731 | | 732 +-------------------------------------------+ 733 | | 734 | Length of Encapsulated PDU | 735 | | 736 +-------------------------------------------+ 737 | | 738 ~ Copy of Erroneous PDU ~ 739 | | 740 +-------------------------------------------+ 741 | | 742 | Length of Error Text | 743 | | 744 +-------------------------------------------+ 745 | | 746 | Arbitrary Text | 747 | of | 748 ~ Error Diagnostic Message ~ 749 | | 750 `-------------------------------------------' 752 6. Protocol Timing Parameters 754 Since the data the cache distributes via the rpki-rtr protocol are 755 retrieved from the Global RPKI system at intervals which are only 756 known to the cache, only the cache can really know how frequently it 757 makes sense for the router to poll the cache, or how long the data 758 are likely to remain valid (or, at least, unchanged). For this 759 reason, as well as to allow the cache some control over the load 760 placed on it by its client routers, the End Of Data PDU includes 761 three values that allow the cache to communicate timing parameters to 762 the router. 764 Refresh Interval: This parameter tells the router how long to wait 765 before next attempting to poll the cache, using a Serial Query or 766 Reset Query PDU. The router SHOULD NOT poll the cache sooner than 767 indicated by this parameter. Note that receipt of a Serial Notify 768 PDU overrides this interval and allows the router to issue an 769 immediate query without waiting for the Refresh Interval to 770 expire. Countdown for this timer starts upon receipt of the 771 containing End Of Data PDU. 773 Minimum allowed value: 1 second. 775 Maximum allowed value: 86400 seconds (one day). 777 Recommended default: 3600 seconds (one hour). 779 Retry Interval: This parameter tells the router how long to wait 780 before retrying a failed Serial Query or Reset Query. The router 781 SHOULD NOT retry sooner than indicated by this parameter. Note 782 that a protocol version mismatch overrides this interval: if the 783 router needs to downgrade to a lower protocol version number, it 784 MAY send the first Serial Query or Reset Query immediately. 785 Countdown for this timer starts upon failure of the query, and 786 restarts after each subsequent failure until a query succeeds. 788 Minimum allowed value: 1 second. 790 Maximum allowed value: 7200 seconds (two hours). 792 Recommended default: 600 seconds (ten minutes). 794 Expire Interval: This parameter tells the router how long it can 795 continue to use the current version of the data while unable to 796 perform a successful query. The router MUST NOT retain the data 797 past the time indicated by this parameter. Countdown for this 798 timer starts upon receipt of the containing End Of Data PDU. 800 Minimum allowed value: 600 seconds (ten minutes). 802 Maximum allowed value: 172800 seconds (two days). 804 Recommended default: 7200 seconds (two hours). 806 If the router has never issued a successful query against a 807 particular cache, it SHOULD retry periodically using the default 808 Retry Interval, above. 810 7. Protocol Version Negotiation 812 A router MUST start each transport connection by issuing either a 813 Reset Query or a Serial Query. This query will tell the cache which 814 version of this protocol the router implements. 816 If a cache which supports version 1 receives a query from a router 817 which specifies version 0, the cache MUST downgrade to protocol 818 version 0 [RFC6810] or send a version 1 Error Report PDU with Error 819 Code 4 ("Unsupported Protocol Version") and terminate the connection. 821 If a router which supports version 1 sends a query to a cache which 822 only supports version 0, one of two things will happen. 824 1. The cache may terminate the connection, perhaps with a version 0 825 Error Report PDU. In this case the router MAY retry the 826 connection using protocol version 0. 828 2. The cache may reply with a version 0 response. In this case the 829 router MUST either downgrade to version 0 or terminate the 830 connection. 832 In any of the downgraded combinations above, the new features of 833 version 1 will not be available. 835 If either party receives a PDU containing an unrecognized Protocol 836 Version (neither 0 nor 1) during this negotiation, it MUST either 837 downgrade to a known version or terminate the connection, with an 838 Error Report PDU unless the received PDU is itself an Error Report 839 PDU. 841 The router MUST ignore any Serial Notify PDUs it might receive from 842 the cache during this initial start-up period, regardless of the 843 Protocol Version field in the Serial Notify PDU. Since Session ID 844 and Serial Number values are specific to a particular protocol 845 version, the values in the notification are not useful to the router. 846 Even if these values were meaningful, the only effect that processing 847 the notification would have would be to trigger exactly the same 848 Reset Query or Serial Query that the router has already sent as part 849 of the not-yet-complete version negotiation process, so there is 850 nothing to be gained by processing notifications until version 851 negotiation completes. 853 Caches SHOULD NOT send Serial Notify PDUs before version negotiation 854 completes. Note, however, that routers MUST handle such 855 notifications (by ignoring them) for backwards compatibility with 856 caches serving protocol version 0. 858 Once the cache and router have agreed upon a Protocol Version via the 859 negotiation process above, that version is stable for the life of the 860 session. See Section 5.1 for a discussion of the interaction between 861 Protocol Version and Session ID. 863 If either party receives a PDU for a different Protocol Version once 864 the above negotiation completes, that party MUST drop the session; 865 unless the PDU containing the unexpected Protocol Version was itself 866 an Error Report PDU, the party dropping the session SHOULD send an 867 Error Report with an error code of 8 ("Unexpected Protocol Version"). 869 8. Protocol Sequences 871 The sequences of PDU transmissions fall into three conversations as 872 follows: 874 8.1. Start or Restart 876 Cache Router 877 ~ ~ 878 | <----- Reset Query -------- | R requests data (or Serial Query) 879 | | 880 | ----- Cache Response -----> | C confirms request 881 | ------- Payload PDU ------> | C sends zero or more 882 | ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix, 883 | ------- Payload PDU ------> | or Router Key PDUs 884 | ------- End of Data ------> | C sends End of Data 885 | | and sends new serial 886 ~ ~ 888 When a transport connection is first established, the router MAY send 889 a Reset Query and the cache responds with a data sequence of all data 890 it contains. 892 Alternatively, if the router has significant unexpired data from a 893 broken session with the same cache, it MAY start with a Serial Query 894 containing the Session ID from the previous session to ensure the 895 Serial Numbers are commensurate. 897 This Reset Query sequence is also used when the router receives a 898 Cache Reset, chooses a new cache, or fears that it has otherwise lost 899 its way. 901 The router MUST send either a Reset Query or a Serial Query when 902 starting a transport connection, in order to confirm that router and 903 cache are speaking compatible versions of the protocol. See 904 Section 7 for details on version negotiation. 906 To limit the length of time a cache must keep the data necessary to 907 generate incremental updates, a router MUST send either a Serial 908 Query or a Reset Query periodically. This also acts as a keep-alive 909 at the application layer. See Section 6 for details on the required 910 polling frequency. 912 8.2. Typical Exchange 914 Cache Router 915 ~ ~ 916 | -------- Notify ----------> | (optional) 917 | | 918 | <----- Serial Query ------- | R requests data 919 | | 920 | ----- Cache Response -----> | C confirms request 921 | ------- Payload PDU ------> | C sends zero or more 922 | ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix, 923 | ------- Payload PDU ------> | or Router Key PDUs 924 | ------- End of Data ------> | C sends End of Data 925 | | and sends new serial 926 ~ ~ 928 The cache server SHOULD send a notify PDU with its current Serial 929 Number when the cache's serial changes, with the expectation that the 930 router MAY then issue a Serial Query earlier than it otherwise might. 931 This is analogous to DNS NOTIFY in [RFC1996]. The cache MUST rate 932 limit Serial Notifies to no more frequently than one per minute. 934 When the transport layer is up and either a timer has gone off in the 935 router, or the cache has sent a Notify, the router queries for new 936 data by sending a Serial Query, and the cache sends all data newer 937 than the serial in the Serial Query. 939 To limit the length of time a cache must keep old withdraws, a router 940 MUST send either a Serial Query or a Reset Query periodically. See 941 Section 6 for details on the required polling frequency. 943 8.3. No Incremental Update Available 945 Cache Router 946 ~ ~ 947 | <----- Serial Query ------ | R requests data 948 | ------- Cache Reset ------> | C cannot supply update 949 | | from specified serial 950 | <------ Reset Query ------- | R requests new data 951 | ----- Cache Response -----> | C confirms request 952 | ------- Payload PDU ------> | C sends zero or more 953 | ------- Payload PDU ------> | IPv4 Prefix, IPv6 Prefix, 954 | ------- Payload PDU ------> | or Router Key PDUs 955 | ------- End of Data ------> | C sends End of Data 956 | | and sends new serial 957 ~ ~ 959 The cache may respond to a Serial Query with a Cache Reset, informing 960 the router that the cache cannot supply an incremental update from 961 the Serial Number specified by the router. This might be because the 962 cache has lost state, or because the router has waited too long 963 between polls and the cache has cleaned up old data that it no longer 964 believes it needs, or because the cache has run out of storage space 965 and had to expire some old data early. Regardless of how this state 966 arose, the cache replies with a Cache Reset to tell the router that 967 it cannot honor the request. When a router receives this, the router 968 SHOULD attempt to connect to any more preferred caches in its cache 969 list. If there are no more preferred caches, it MUST issue a Reset 970 Query and get an entire new load from the cache. 972 8.4. Cache Has No Data Available 974 Cache Router 975 ~ ~ 976 | <----- Serial Query ------ | R requests data 977 | ---- Error Report PDU ----> | C No Data Available 978 ~ ~ 980 Cache Router 981 ~ ~ 982 | <----- Reset Query ------- | R requests data 983 | ---- Error Report PDU ----> | C No Data Available 984 ~ ~ 986 The cache may respond to either a Serial Query or a Reset Query 987 informing the router that the cache cannot supply any update at all. 988 The most likely cause is that the cache has lost state, perhaps due 989 to a restart, and has not yet recovered. While it is possible that a 990 cache might go into such a state without dropping any of its active 991 sessions, a router is more likely to see this behavior when it 992 initially connects and issues a Reset Query while the cache is still 993 rebuilding its database. 995 When a router receives this kind of error, the router SHOULD attempt 996 to connect to any other caches in its cache list, in preference 997 order. If no other caches are available, the router MUST issue 998 periodic Reset Queries until it gets a new usable load from the 999 cache. 1001 9. Transport 1003 The transport-layer session between a router and a cache carries the 1004 binary PDUs in a persistent session. 1006 To prevent cache spoofing and DoS attacks by illegitimate routers, it 1007 is highly desirable that the router and the cache be authenticated to 1008 each other. Integrity protection for payloads is also desirable to 1009 protect against monkey-in-the-middle (MITM) attacks. Unfortunately, 1010 there is no protocol to do so on all currently used platforms. 1011 Therefore, as of the writing of this document, there is no mandatory- 1012 to-implement transport which provides authentication and integrity 1013 protection. 1015 To reduce exposure to dropped but non-terminated sessions, both 1016 caches and routers SHOULD enable keep-alives when available in the 1017 chosen transport protocol. 1019 It is expected that, when the TCP Authentication Option (TCP-AO) 1020 [RFC5925] is available on all platforms deployed by operators, it 1021 will become the mandatory-to-implement transport. 1023 Caches and routers MUST implement unprotected transport over TCP 1024 using a port, rpki-rtr (323); see Section 14. Operators SHOULD use 1025 procedural means, e.g., access control lists (ACLs), to reduce the 1026 exposure to authentication issues. 1028 Caches and routers SHOULD use TCP-AO, SSHv2, TCP MD5, or IPsec 1029 transport. 1031 If unprotected TCP is the transport, the cache and routers MUST be on 1032 the same trusted and controlled network. 1034 If available to the operator, caches and routers MUST use one of the 1035 following more protected protocols. 1037 Caches and routers SHOULD use TCP-AO transport [RFC5925] over the 1038 rpki-rtr port. 1040 Caches and routers MAY use SSHv2 transport [RFC4252] using the normal 1041 SSH port. For an example, see Section 9.1. 1043 Caches and routers MAY use TCP MD5 transport [RFC2385] using the 1044 rpki-rtr port. Note that TCP MD5 has been obsoleted by TCP-AO 1045 [RFC5925]. 1047 Caches and routers MAY use TCP over IPsec transport [RFC4301] using 1048 the rpki-rtr port. 1050 Caches and routers MAY use TLS transport [RFC5246] using a port, 1051 rpki-rtr-tls (324); see Section 14. 1053 9.1. SSH Transport 1055 To run over SSH, the client router first establishes an SSH transport 1056 connection using the SSHv2 transport protocol, and the client and 1057 server exchange keys for message integrity and encryption. The 1058 client then invokes the "ssh-userauth" service to authenticate the 1059 application, as described in the SSH authentication protocol 1060 [RFC4252]. Once the application has been successfully authenticated, 1061 the client invokes the "ssh-connection" service, also known as the 1062 SSH connection protocol. 1064 After the ssh-connection service is established, the client opens a 1065 channel of type "session", which results in an SSH session. 1067 Once the SSH session has been established, the application invokes 1068 the application transport as an SSH subsystem called "rpki-rtr". 1069 Subsystem support is a feature of SSH version 2 (SSHv2) and is not 1070 included in SSHv1. Running this protocol as an SSH subsystem avoids 1071 the need for the application to recognize shell prompts or skip over 1072 extraneous information, such as a system message that is sent at 1073 shell start-up. 1075 It is assumed that the router and cache have exchanged keys out of 1076 band by some reasonably secured means. 1078 Cache servers supporting SSH transport MUST accept RSA and Digital 1079 Signature Algorithm (DSA) authentication and SHOULD accept Elliptic 1080 Curve Digital Signature Algorithm (ECDSA) authentication. User 1081 authentication MUST be supported; host authentication MAY be 1082 supported. Implementations MAY support password authentication. 1083 Client routers SHOULD verify the public key of the cache to avoid 1084 monkey-in-the-middle attacks. 1086 9.2. TLS Transport 1088 Client routers using TLS transport MUST present client-side 1089 certificates to authenticate themselves to the cache in order to 1090 allow the cache to manage the load by rejecting connections from 1091 unauthorized routers. In principle, any type of certificate and 1092 certificate authority (CA) may be used; however, in general, cache 1093 operators will wish to create their own small-scale CA and issue 1094 certificates to each authorized router. This simplifies credential 1095 rollover; any unrevoked, unexpired certificate from the proper CA may 1096 be used. 1098 Certificates used to authenticate client routers in this protocol 1099 MUST include a subjectAltName extension [RFC5280] containing one or 1100 more iPAddress identities; when authenticating the router's 1101 certificate, the cache MUST check the IP address of the TLS 1102 connection against these iPAddress identities and SHOULD reject the 1103 connection if none of the iPAddress identities match the connection. 1105 Routers MUST also verify the cache's TLS server certificate, using 1106 subjectAltName dNSName identities as described in [RFC6125], to avoid 1107 monkey-in-the-middle attacks. The rules and guidelines defined in 1108 [RFC6125] apply here, with the following considerations: 1110 Support for DNS-ID identifier type (that is, the dNSName identity 1111 in the subjectAltName extension) is REQUIRED in rpki-rtr server 1112 and client implementations which use TLS. Certification 1113 authorities which issue rpki-rtr server certificates MUST support 1114 the DNS-ID identifier type, and the DNS-ID identifier type MUST be 1115 present in rpki-rtr server certificates. 1117 DNS names in rpki-rtr server certificates SHOULD NOT contain the 1118 wildcard character "*". 1120 rpki-rtr implementations which use TLS MUST NOT use CN-ID 1121 identifiers; a CN field may be present in the server certificate's 1122 subject name, but MUST NOT be used for authentication within the 1123 rules described in [RFC6125]. 1125 The client router MUST set its "reference identifier" to the DNS 1126 name of the rpki-rtr cache. 1128 9.3. TCP MD5 Transport 1130 If TCP MD5 is used, implementations MUST support key lengths of at 1131 least 80 printable ASCII bytes, per Section 4.5 of [RFC2385]. 1132 Implementations MUST also support hexadecimal sequences of at least 1133 32 characters, i.e., 128 bits. 1135 Key rollover with TCP MD5 is problematic. Cache servers SHOULD 1136 support [RFC4808]. 1138 9.4. TCP-AO Transport 1140 Implementations MUST support key lengths of at least 80 printable 1141 ASCII bytes. Implementations MUST also support hexadecimal sequences 1142 of at least 32 characters, i.e., 128 bits. Message Authentication 1143 Code (MAC) lengths of at least 96 bits MUST be supported, per 1144 Section 5.1 of [RFC5925]. 1146 The cryptographic algorithms and associated parameters described in 1147 [RFC5926] MUST be supported. 1149 10. Router-Cache Setup 1151 A cache has the public authentication data for each router it is 1152 configured to support. 1154 A router may be configured to peer with a selection of caches, and a 1155 cache may be configured to support a selection of routers. Each must 1156 have the name of, and authentication data for, each peer. In 1157 addition, in a router, this list has a non-unique preference value 1158 for each server. This preference merely denotes proximity, not 1159 trust, preferred belief, etc. The client router attempts to 1160 establish a session with each potential serving cache in preference 1161 order, and then starts to load data from the most preferred cache to 1162 which it can connect and authenticate. The router's list of caches 1163 has the following elements: 1165 Preference: An unsigned integer denoting the router's preference to 1166 connect to that cache; the lower the value, the more preferred. 1168 Name: The IP address or fully qualified domain name of the cache. 1170 Key: Any needed public key of the cache. 1172 MyKey: Any needed private key or certificate of this client. 1174 Due to the distributed nature of the RPKI, caches simply cannot be 1175 rigorously synchronous. A client may hold data from multiple caches 1176 but MUST keep the data marked as to source, as later updates MUST 1177 affect the correct data. 1179 Just as there may be more than one covering ROA from a single cache, 1180 there may be multiple covering ROAs from multiple caches. The 1181 results are as described in [RFC6811]. 1183 If data from multiple caches are held, implementations MUST NOT 1184 distinguish between data sources when performing validation. 1186 When a more preferred cache becomes available, if resources allow, it 1187 would be prudent for the client to start fetching from that cache. 1189 The client SHOULD attempt to maintain at least one set of data, 1190 regardless of whether it has chosen a different cache or established 1191 a new connection to the previous cache. 1193 A client MAY drop the data from a particular cache when it is fully 1194 in sync with one or more other caches. 1196 See Section 6 for details on what to do when the client is not able 1197 to refresh from a particular cache. 1199 If a client loses connectivity to a cache it is using, or otherwise 1200 decides to switch to a new cache, it SHOULD retain the data from the 1201 previous cache until it has a full set of data from one or more other 1202 caches. Note that this may already be true at the point of 1203 connection loss if the client has connections to more than one cache. 1205 11. Deployment Scenarios 1207 For illustration, we present three likely deployment scenarios. 1209 Small End Site: The small multihomed end site may wish to outsource 1210 the RPKI cache to one or more of their upstream ISPs. They would 1211 exchange authentication material with the ISP using some out-of- 1212 band mechanism, and their router(s) would connect to the cache(s) 1213 of one or more upstream ISPs. The ISPs would likely deploy caches 1214 intended for customer use separately from the caches with which 1215 their own BGP speakers peer. 1217 Large End Site: A larger multihomed end site might run one or more 1218 caches, arranging them in a hierarchy of client caches, each 1219 fetching from a serving cache which is closer to the Global RPKI. 1220 They might configure fall-back peerings to upstream ISP caches. 1222 ISP Backbone: A large ISP would likely have one or more redundant 1223 caches in each major point of presence (PoP), and these caches 1224 would fetch from each other in an ISP-dependent topology so as not 1225 to place undue load on the Global RPKI. 1227 Experience with large DNS cache deployments has shown that complex 1228 topologies are ill-advised as it is easy to make errors in the graph, 1229 e.g., not maintain a loop-free condition. 1231 Of course, these are illustrations and there are other possible 1232 deployment strategies. It is expected that minimizing load on the 1233 Global RPKI servers will be a major consideration. 1235 To keep load on Global RPKI services from unnecessary peaks, it is 1236 recommended that primary caches which load from the distributed 1237 Global RPKI not do so all at the same times, e.g., on the hour. 1238 Choose a random time, perhaps the ISP's AS number modulo 60 and 1239 jitter the inter-fetch timing. 1241 12. Error Codes 1243 This section contains a preliminary list of error codes. The authors 1244 expect additions to the list during development of the initial 1245 implementations. There is an IANA registry where valid error codes 1246 are listed; see Section 14. Errors which are considered fatal SHOULD 1247 cause the session to be dropped. 1249 0: Corrupt Data (fatal): The receiver believes the received PDU to 1250 be corrupt in a manner not specified by another error code. 1252 1: Internal Error (fatal): The party reporting the error experienced 1253 some kind of internal error unrelated to protocol operation (ran 1254 out of memory, a coding assertion failed, et cetera). 1256 2: No Data Available: The cache believes itself to be in good 1257 working order, but is unable to answer either a Serial Query or a 1258 Reset Query because it has no useful data available at this time. 1259 This is likely to be a temporary error, and most likely indicates 1260 that the cache has not yet completed pulling down an initial 1261 current data set from the Global RPKI system after some kind of 1262 event that invalidated whatever data it might have previously held 1263 (reboot, network partition, et cetera). 1265 3: Invalid Request (fatal): The cache server believes the client's 1266 request to be invalid. 1268 4: Unsupported Protocol Version (fatal): The Protocol Version is not 1269 known by the receiver of the PDU. 1271 5: Unsupported PDU Type (fatal): The PDU Type is not known by the 1272 receiver of the PDU. 1274 6: Withdrawal of Unknown Record (fatal): The received PDU has Flag=0 1275 but a matching record ({Prefix, Len, Max-Len, ASN} tuple for an 1276 IPvX PDU, {SKI, ASN, Subject Public Key} tuple for a Router Key 1277 PDU) does not exist in the receiver's database. 1279 7: Duplicate Announcement Received (fatal): The received PDU has 1280 Flag=1 but a matching record ({Prefix, Len, Max-Len, ASN} tuple 1281 for an IPvX PDU, {SKI, ASN, Subject Public Key} tuple for a Router 1282 Key PDU) is already active in the router. 1284 8: Unexpected Protocol Version (fatal): The received PDU has a 1285 Protocol Version field that differs from the protocol version 1286 negotiated in Section 7. 1288 13. Security Considerations 1290 As this document describes a security protocol, many aspects of 1291 security interest are described in the relevant sections. This 1292 section points out issues which may not be obvious in other sections. 1294 Cache Validation: In order for a collection of caches as described 1295 in Section 11 to guarantee a consistent view, they need to be 1296 given consistent trust anchors to use in their internal validation 1297 process. Distribution of a consistent trust anchor is assumed to 1298 be out of band. 1300 Cache Peer Identification: The router initiates a transport 1301 connection to a cache, which it identifies by either IP address or 1302 fully qualified domain name. Be aware that a DNS or address 1303 spoofing attack could make the correct cache unreachable. No 1304 session would be established, as the authorization keys would not 1305 match. 1307 Transport Security: The RPKI relies on object, not server or 1308 transport, trust. That is, the IANA root trust anchor is 1309 distributed to all caches through some out-of-band means, and can 1310 then be used by each cache to validate certificates and ROAs all 1311 the way down the tree. The inter-cache relationships are based on 1312 this object security model; hence, the inter-cache transport can 1313 be lightly protected. 1315 However, this protocol document assumes that the routers cannot do 1316 the validation cryptography. Hence, the last link, from cache to 1317 router, is secured by server authentication and transport-level 1318 security. This is dangerous, as server authentication and 1319 transport have very different threat models than object security. 1321 So the strength of the trust relationship and the transport 1322 between the router(s) and the cache(s) are critical. You're 1323 betting your routing on this. 1325 While we cannot say the cache must be on the same LAN, if only due 1326 to the issue of an enterprise wanting to off-load the cache task 1327 to their upstream ISP(s), locality, trust, and control are very 1328 critical issues here. The cache(s) really SHOULD be as close, in 1329 the sense of controlled and protected (against DDoS, MITM) 1330 transport, to the router(s) as possible. It also SHOULD be 1331 topologically close so that a minimum of validated routing data 1332 are needed to bootstrap a router's access to a cache. 1334 The identity of the cache server SHOULD be verified and 1335 authenticated by the router client, and vice versa, before any 1336 data are exchanged. 1338 Transports which cannot provide the necessary authentication and 1339 integrity (see Section 9) must rely on network design and 1340 operational controls to provide protection against spoofing/ 1341 corruption attacks. As pointed out in Section 9, TCP-AO is the 1342 long-term plan. Protocols which provide integrity and 1343 authenticity SHOULD be used, and if they cannot, i.e., TCP is used 1344 as the transport, the router and cache MUST be on the same 1345 trusted, controlled network. 1347 14. IANA Considerations 1349 This section only discusses updates required in the existing IANA 1350 protocol registries to accommodate version 1 of this protocol. See 1351 [RFC6810] for IANA Considerations from the original (version 0) 1352 protocol. 1354 All existing entries in the IANA "rpki-rtr-pdu" registry remain valid 1355 for protocol version 0. All of the PDU types allowed in protocol 1356 version 0 are also allowed in protocol version 1, with the addition 1357 of the new Router Key PDU. To reduce the likelihood of confusion, 1358 the PDU number used by the Router Key PDU in protocol version 1 is 1359 hereby registered as reserved (and unused) in protocol version 0. 1361 The policy for adding to the registry is RFC Required per [RFC5226], 1362 either Standards Track or Experimental. 1364 Assuming that the registry allows range notation in the Protocol 1365 Version field, the updated "rpki-rtr-pdu" registry will be: 1367 Protocol PDU 1368 Version Type Description 1369 -------- ---- --------------- 1370 0-1 0 Serial Notify 1371 0-1 1 Serial Query 1372 0-1 2 Reset Query 1373 0-1 3 Cache Response 1374 0-1 4 IPv4 Prefix 1375 0-1 6 IPv6 Prefix 1376 0-1 7 End of Data 1377 0-1 8 Cache Reset 1378 0 9 Reserved 1379 1 9 Router Key 1380 0-1 10 Error Report 1381 0-1 255 Reserved 1383 All existing entries in the IANA "rpki-rtr-error" registry remain 1384 valid for all protocol versions. Protocol version 1 adds one new 1385 error code: 1387 Error 1388 Code Description 1389 ----- ---------------- 1390 8 Unexpected Protocol Version 1392 15. Acknowledgments 1394 The authors wish to thank Nils Bars, Steve Bellovin, Tim Bruijnzeels, 1395 Rex Fernando, Richard Hansen, Paul Hoffman, Fabian Holler, Russ 1396 Housley, Pradosh Mohapatra, Keyur Patel, David Mandelberg, Sandy 1397 Murphy, Robert Raszuk, Andreas Reuter, Thomas C. Schmidt, John 1398 Scudder, Ruediger Volk, Matthias Waehlisch, and David Ward. 1399 Particular thanks go to Hannes Gredler for showing us the dangers of 1400 unnecessary fields. 1402 No doubt this list is incomplete. We apologize to any contributor 1403 whose name we missed. 1405 16. References 1407 16.1. Normative References 1409 [I-D.ietf-sidr-bgpsec-algs] 1410 Turner, S., "BGPsec Algorithms, Key Formats, & Signature 1411 Formats", draft-ietf-sidr-bgpsec-algs-11 (work in 1412 progress), August 2015. 1414 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 1415 August 1996. 1417 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1418 Requirement Levels", RFC 2119, BCP 14, March 1997. 1420 [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 1421 Signature Option", RFC 2385, August 1998. 1423 [RFC3269] Kermode, R. and L. Vicisano, "Author Guidelines for 1424 Reliable Multicast Transport (RMT) Building Blocks and 1425 Protocol Instantiation documents", RFC 3269, April 2002. 1427 [RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 1428 Authentication Protocol", RFC 4252, January 2006. 1430 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 1431 Internet Protocol", RFC 4301, December 2005. 1433 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1434 IANA Considerations Section in RFCs", RFC 5226, BCP 26, 1435 May 2008. 1437 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1438 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1440 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1441 Housley, R., and W. Polk, "Internet X.509 Public Key 1442 Infrastructure Certificate and Certificate Revocation List 1443 (CRL) Profile", RFC 5280, May 2008. 1445 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 1446 Authentication Option", RFC 5925, June 2010. 1448 [RFC5926] Lebovitz, G. and E. Rescorla, "Cryptographic Algorithms 1449 for the TCP Authentication Option (TCP-AO)", RFC 5926, 1450 June 2010. 1452 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 1453 Verification of Domain-Based Application Service Identity 1454 within Internet Public Key Infrastructure Using X.509 1455 (PKIX) Certificates in the Context of Transport Layer 1456 Security (TLS)", RFC 6125, March 2011. 1458 [RFC6487] Huston, G., Michaelson, G., and R. Loomans, "A Profile for 1459 X.509 PKIX Resource Certificates", RFC 6487, February 1460 2012. 1462 [RFC6810] Bush, R. and R. Austein, "The Resource Public Key 1463 Infrastructure (RPKI) to Router Protocol", RFC 6810, 1464 January 2013. 1466 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 1467 Austein, "BGP Prefix Origin Validation", RFC 6811, January 1468 2013. 1470 16.2. Informative References 1472 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 1473 Changes (DNS NOTIFY)", RFC 1996, August 1996. 1475 [RFC4808] Bellovin, S., "Key Change Strategies for TCP-MD5", RFC 1476 4808, March 2007. 1478 [RFC5781] Weiler, S., Ward, D., and R. Housley, "The rsync URI 1479 Scheme", RFC 5781, February 2010. 1481 [RFC6480] Lepinski, M. and S. Kent, "An Infrastructure to Support 1482 Secure Internet Routing", RFC 6480, February 2012. 1484 [RFC6481] Huston, G., Loomans, R., and G. Michaelson, "A Profile for 1485 Resource Certificate Repository Structure", RFC 6481, 1486 February 2012. 1488 [RFC7128] Bush, R., Austein, R., Patel, K., Gredler, H., and M. 1489 Waehlisch, "Resource Public Key Infrastructure (RPKI) 1490 Router Implementation Report", RFC 7128, February 2014. 1492 Authors' Addresses 1494 Randy Bush 1495 Internet Initiative Japan 1496 5147 Crystal Springs 1497 Bainbridge Island, Washington 98110 1498 US 1500 Email: randy@psg.com 1502 Rob Austein 1503 Dragon Research Labs 1505 Email: sra@hactrn.net