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