idnits 2.17.1 draft-ymbk-rpki-rtr-protocol-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) -- The document has an IETF Trust Provisions (28 Dec 2009) Section 6.c(ii) Publication Limitation clause. If this document is intended for submission to the IESG for publication, this constitutes an error. 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 abstract seems to contain references ([I-D.ietf-sidr-arch]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Serial Number: A 32-bit monotonically increasing, cardinal which wraps from 2^32-1 to 0. It denotes the logical version of a cache. A cache increments the value by one when it successfully updates its data from a parent cache or from primary RPKI data. As a cache is rcynicing, new incoming data, and implicit deletes, are marked with the new serial but MUST not be sent until the fetch is complete. A serial number is not commensurate between caches, nor need it be maintained across resets of the cache server. See [RFC1982] on DNS Serial Number Arithmetic for too much detail on serial number arithmetic. -- The document date (July 1, 2009) is 5411 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 (-13) exists of draft-ietf-sidr-arch-06 == Outdated reference: A later version (-09) exists of draft-ietf-sidr-repos-struct-01 Summary: 2 errors (**), 0 flaws (~~), 4 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 IIJ 4 Intended status: Standards Track R. Austein 5 Expires: January 2, 2010 ISC 6 July 1, 2009 8 The RPKI/Router Protocol 9 draft-ymbk-rpki-rtr-protocol-04 11 Status of this Memo 13 This Internet-Draft is submitted to IETF in full conformance with the 14 provisions of BCP 78 and BCP 79. This document may not be modified, 15 and derivative works of it may not be created, and it may not be 16 published except as an Internet-Draft. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on January 2, 2010. 36 Copyright Notice 38 Copyright (c) 2009 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents in effect on the date of 43 publication of this document (http://trustee.ietf.org/license-info). 44 Please review these documents carefully, as they describe your rights 45 and restrictions with respect to this document. 47 Abstract 49 In order to formally validate the origin ASes of BGP announcements, 50 routers need a simple but reliable mechanism to receive RPKI 51 [I-D.ietf-sidr-arch] or analogous prefix origin data from a trusted 52 cache. This document describes a protocol to deliver validated 53 prefix origin data to routers over ssh. 55 Requirements Language 57 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 58 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 59 document are to be interpreted as described in RFC 2119 [RFC2119]. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Deployment Structure . . . . . . . . . . . . . . . . . . . . . 3 65 3. Operational Overview . . . . . . . . . . . . . . . . . . . . . 3 66 4. Protocol Data Units (PDUs) . . . . . . . . . . . . . . . . . . 4 67 4.1. Serial Notify . . . . . . . . . . . . . . . . . . . . . . 5 68 4.2. Serial Query . . . . . . . . . . . . . . . . . . . . . . . 5 69 4.3. Reset Query . . . . . . . . . . . . . . . . . . . . . . . 6 70 4.4. Cache Response . . . . . . . . . . . . . . . . . . . . . . 6 71 4.5. IPv4 Prefix . . . . . . . . . . . . . . . . . . . . . . . 7 72 4.6. IPv6 Prefix . . . . . . . . . . . . . . . . . . . . . . . 8 73 4.7. End of Data . . . . . . . . . . . . . . . . . . . . . . . 8 74 4.8. Cache Reset . . . . . . . . . . . . . . . . . . . . . . . 9 75 4.9. Error Report . . . . . . . . . . . . . . . . . . . . . . . 9 76 4.10. Fields of a PDU . . . . . . . . . . . . . . . . . . . . . 10 77 5. Protocol Sequences . . . . . . . . . . . . . . . . . . . . . . 11 78 5.1. Start or Restart . . . . . . . . . . . . . . . . . . . . . 11 79 5.2. Typical Exchange . . . . . . . . . . . . . . . . . . . . . 12 80 5.3. No Incremental Update Available . . . . . . . . . . . . . 13 81 5.4. Cache has No Data Available . . . . . . . . . . . . . . . 13 82 6. SSH Transport . . . . . . . . . . . . . . . . . . . . . . . . 14 83 7. Router-Cache Set-Up . . . . . . . . . . . . . . . . . . . . . 14 84 8. Deployment Scenarios . . . . . . . . . . . . . . . . . . . . . 15 85 9. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . 16 86 10. Security Considerations . . . . . . . . . . . . . . . . . . . 16 87 11. Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 88 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 89 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 90 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 91 14.1. Normative References . . . . . . . . . . . . . . . . . . . 18 92 14.2. Informative References . . . . . . . . . . . . . . . . . . 19 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 95 1. Introduction 97 In order to formally validate the origin ASes of BGP announcements, 98 routers need a simple but reliable mechanism to receive RPKI 99 [I-D.ietf-sidr-arch] or analogous formally validated prefix origin 100 data from a trusted cache. This document describes a protocol to 101 deliver validated prefix origin data to routers over ssh. 103 Section 2 describes the deployment structure and Section 3 then 104 presents an operational overview. The binary payloads of the 105 protocol are formally described in Section 4, and the expected PDU 106 sequences are described in Section 5. And the transport protocol is 107 described in Section 6. Section 7 details how routers and caches are 108 configured to connect and authenticate. Section 8 describes likely 109 deployment scenarios. The traditional security and IANA 110 considerations end the document. 112 2. Deployment Structure 114 Deployment of the RPKI to reach routers has a three level structure 115 as follows: 117 Global RPKI: The authoritative data of the RPKI are published in a 118 distributed set of servers, RPKI publication repositories, e.g. 119 the IANA, RIRs, NIRs, and ISPs, see [I-D.ietf-sidr-repos-struct]. 121 Local Caches: A local set of one or more collected and verified non- 122 authoritative caches. A relying party, e.g. router or other 123 client, MUST have a formally authenticated trust relationship 124 with, and a secure transport channel to, any non-authoritative 125 cache(s) it uses. 127 Routers: A router fetches data from a local cache using the protocol 128 described in this document. It is said to be a client of the 129 cache. There are mechanisms for the router to assure itself of 130 the authenticity of the cache and to authenticate itself to the 131 cache. 133 3. Operational Overview 135 A router establishes and keeps open an authenticated connection to a 136 cache with which it has an client/server relationship. It is 137 configured with a semi-ordered list of caches, and establishes a 138 connection to the highest preference cache that accepts one. 140 Periodically, the router sends to the cache the serial number of the 141 highest numbered data record it has received from that cache, i.e. 142 the router's current serial number. When a router establishes a new 143 connection to a cache, or wishes to reset a current relationship, it 144 sends a Reset Query. 146 The Cache responds with all data records which have serial numbers 147 greater than that in the router's query. This may be the null set, 148 in which case the End of Data PDU is still sent. Note that 'greater' 149 must take wrap-around into account, see [RFC1982]. 151 When the router has received all data records from the cache, it sets 152 its current serial number to that of the serial number in the End of 153 Data PDU. 155 When the cache updates its database, it sends a Notify message to 156 every currently connected router. This is a hint that now would be a 157 good time for the router to poll for an update, but is only a hint. 158 The protocol requires the router to poll for updates periodically in 159 any case. 161 Strictly speaking, a router could track a cache simply by asking for 162 a complete data set every time it updates, but this would be very 163 inefficient. The serial number based incremental update mechanism 164 allows an efficient transfer of just the data records which have 165 changed since last update. As with any update protocol based on 166 incremental transfers, the router must be prepared to fall back to a 167 full transfer if for any reason the cache is unable to provide the 168 necessary incremental data. Unlike some incremental transfer 169 protocols, this protocol requires the router to make an explicit 170 request to start the fallback process; this is deliberate, as the 171 cache has no way of knowing whether the router has also established 172 sessions with other caches that may be able to provide better 173 service. 175 4. Protocol Data Units (PDUs) 177 The exchanges between the cache and the router are sequences of 178 exchanges of the following PDUs according to the rules described in 179 Section 5. 181 4.1. Serial Notify 183 The cache notifies the router that the cache has new data. 185 0 8 16 24 31 186 .-------------------------------------------. 187 | Protocol | PDU | | 188 | Version | Type | reserved = zero | 189 | 0 | 0 | | 190 +-------------------------------------------+ 191 | | 192 | Length | 193 | | 194 +-------------------------------------------+ 195 | | 196 | Serial Number | 197 | | 198 `-------------------------------------------' 200 4.2. Serial Query 202 Serial Query: The router sends Serial Query to ask the cache for all 203 payload PDUs which have serial numbers higher than the serial number 204 in the Serial Query. 206 The cache replys to this query with a Cache Response PDU 207 (Section 4.4) if the cache has a record of the changes since the 208 serial number specified by the router. If there have been no changes 209 since the router last queried, the cache responds with an End Of Data 210 PDU. If the cache does not have the data needed to update the 211 router, perhaps because its records do not go back to the Serial 212 Number in the Serial Query, then cache responds with a Cache Reset 213 PDU (Section 4.8). 215 0 8 16 24 31 216 .-------------------------------------------. 217 | Protocol | PDU | | 218 | Version | Type | reserved = zero | 219 | 0 | 1 | | 220 +-------------------------------------------+ 221 | | 222 | Length=12 | 223 | | 224 +-------------------------------------------+ 225 | | 226 | Serial Number | 227 | | 228 `-------------------------------------------' 230 4.3. Reset Query 232 Reset Query: The router tells the cache that it wants to receive the 233 total active, current, non-withdrawn, database. The cache responds 234 with a Cache Response PDU (Section 4.4). 236 0 8 16 24 31 237 .-------------------------------------------. 238 | Protocol | PDU | | 239 | Version | Type | reserved = zero | 240 | 0 | 2 | | 241 +-------------------------------------------+ 242 | | 243 | Length=8 | 244 | | 245 `-------------------------------------------' 247 4.4. Cache Response 249 Cache Response: The cache responds with zero or more payload PDUs. 250 When replying to a Serial Query request (Section 4.2), the cache 251 sends the set of all data records it has with serial numbers greater 252 than that sent by the client router. When replying to a Reset Query, 253 the cache sends the set of all data records it has; in this case the 254 announce/withdraw field in the payload PDUs MUST have the value 1 255 (announce). 257 0 8 16 24 31 258 .-------------------------------------------. 259 | Protocol | PDU | | 260 | Version | Type | reserved = zero | 261 | 0 | 3 | | 262 +-------------------------------------------+ 263 | | 264 | Length=8 | 265 | | 266 `-------------------------------------------' 268 4.5. IPv4 Prefix 270 0 8 16 24 31 271 .-------------------------------------------. 272 | Protocol | PDU | | 273 | Version | Type | Color | 274 | 0 | 4 | | 275 +-------------------------------------------+ 276 | | 277 | Length=20 | 278 | | 279 +-------------------------------------------+ 280 | | Prefix | Max | Data | 281 | Flags | Length | Length | Source | 282 | | 0..32 | 0..32 | RPKI/IRR | 283 +-------------------------------------------+ 284 | | 285 | IPv4 prefix | 286 | | 287 +-------------------------------------------+ 288 | | 289 | Autonomous System Number | 290 | | 291 `-------------------------------------------' 293 Due to the nature of the RPKI and the IRR, there can be multiple 294 identical IPvX PDUs. Hence the router will likely keep an internal 295 ref-count on each IPvX PDU. 297 In the RPKI, nothing prevents a signing certificate from issuing two 298 identical ROAs, and nothing prohibits the existence of two identical 299 route: or route6: objects in the IRR. In this case there would be no 300 semantic difference between the objects, merely a process redundancy. 302 In the RPKI, there is also an actual need for what will appear to the 303 router as identical IPvX PDUs. This occurs when an upstream 304 certificate is being reissued or a site is changing providers, often 305 a 'make and break' situation. The ROA is identical in the router 306 sense, i.e. has the same {prefix, len, max-len, asn}, but has a 307 different validation path in the RPKI. This is important to the 308 RPKI, but not to the router. 310 The lowest order bit of the Flags field is 1 for an announcement and 311 0 for a withdrawal. 313 4.6. IPv6 Prefix 315 0 8 16 24 31 316 .-------------------------------------------. 317 | Protocol | PDU | | 318 | Version | Type | Color | 319 | 0 | 6 | | 320 +-------------------------------------------+ 321 | | 322 | Length=40 | 323 | | 324 +-------------------------------------------+ 325 | | Prefix | Max | Data | 326 | Flags | Length | Length | Source | 327 | | 0..128 | 0..128 | RPKI/IRR | 328 +-------------------------------------------+ 329 | | 330 +--- ---+ 331 | | 332 +--- IPv6 prefix ---+ 333 | | 334 +--- ---+ 335 | | 336 +-------------------------------------------+ 337 | | 338 | Autonomous System Number | 339 | | 340 `-------------------------------------------' 342 4.7. End of Data 344 End of Data: Cache tells router it has no more data for the request. 346 0 8 16 24 31 347 .-------------------------------------------. 348 | Protocol | PDU | | 349 | Version | Type | reserved = zero | 350 | 0 | 7 | | 351 +-------------------------------------------+ 352 | | 353 | Length=12 | 354 | | 355 +-------------------------------------------+ 356 | | 357 | Serial Number | 358 | | 359 `-------------------------------------------' 361 4.8. Cache Reset 363 The cache may respond to a Serial Query informing the router that the 364 cache cannot provide an incremental update starting from the serial 365 number specified by the router. The router must decide whether to 366 issue a Reset Query or switch to a different cache. 368 0 8 16 24 31 369 .-------------------------------------------. 370 | Protocol | PDU | | 371 | Version | Type | reserved = zero | 372 | 0 | 8 | | 373 +-------------------------------------------+ 374 | | 375 | Length=8 | 376 | | 377 `-------------------------------------------' 379 4.9. Error Report 381 This PDU is used by either party to report an error to the other. 383 If the error is not associated with any particular PDU, the Erroneous 384 PDU field should be empty and the Length of Encapsulated PDU field 385 should be zero. 387 The diagnostic text is optional, if not present the Length of Error 388 Text field should be zero. If error text is present, it SHOULD be a 389 string in US-ASCII, for maximum portability; if non-US-ASCII 390 characters are absolutely required, the error text MUST use UTF-8 391 encoding. 393 0 8 16 24 31 394 .-------------------------------------------. 395 | Protocol | PDU | | 396 | Version | Type | Error Number | 397 | 0 | 10 | | 398 +-------------------------------------------+ 399 | | 400 | Length | 401 | | 402 +-------------------------------------------+ 403 | | 404 | Length of Encapsulated PDU | 405 | | 406 +-------------------------------------------+ 407 | | 408 ~ Copy of Erroneous PDU ~ 409 | | 410 +-------------------------------------------+ 411 | | 412 | Length of Error Text | 413 | | 414 +-------------------------------------------+ 415 | | 416 | Arbitrary Text | 417 | of | 418 ~ Error Diagnostic Message ~ 419 | | 420 `-------------------------------------------' 422 4.10. Fields of a PDU 424 PDUs contain the following data elements: 426 Protocol Version: A cardinal, currently 0, denoting the version of 427 this protocol. 429 Serial Number: The serial number of the RPKI Cache when this ROA was 430 received from the cache's up-stream cache server or gathered from 431 the global RPKI. A cache increments its serial number when 432 completing an rcynic from a parent cache. See [RFC1982] on DNS 433 Serial Number Arithmetic for too much detail on serial number 434 arithmetic. 436 Length: A 32 bit cardinal which has as its value the count of the 437 bytes in the entire PDU, including the eight bytes of header which 438 end with the length field. 440 Color: An arbitrary 16 bit field that might be used in some way. 442 Flags: The lowest order bit of the Flags field is 1 for an 443 announcement and 0 for a withdrawal, whether this PDU announces a 444 new right to announce the prefix or withdraws a previously 445 announced right. A withdraw effectively deletes one previously 446 announced IPvX Prefix PDU with the exact same Prefix, Length, Max- 447 Len, ASN, Data Source, and Color. 449 Prefix Length: A cardinal denoting the shortest prefix allowed for 450 the prefix. 452 Max Length: A cardinal denoting the longest prefix allowed by the 453 prefix. This MUST NOT be less than the Prefix Length element. 455 Data Source: A cardinal denoting the source of the data, e.g. for 456 RPKI data, it is 0, for IRR data it is 1. 458 Prefix: The IPv4 or IPv6 prefix of the ROA. 460 Autonomous System Number: ASN allowed to announce this prefix, a 32 461 bit cardinal. 463 5. Protocol Sequences 465 The sequences of PDU transmissions fall into three conversations as 466 follows: 468 5.1. Start or Restart 470 Cache Router 471 ~ ~ 472 | <----- Reset Query -------- | R requests data 473 | | 474 | ----- Cache Response -----> | C confirms request 475 | ------- IPvX Prefix ------> | C sends zero or more 476 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 477 | ------- IPvX Prefix ------> | Payload PDUs 478 | ------ End of Data ------> | C sends End of Data 479 | | and sends new serial 480 ~ ~ 482 When a transport session is first established, the router sends a 483 Reset Query and the cache responds with a data sequence of all data 484 it contains. 486 This Reset Query sequence is also used when the router receives a 487 Cache Reset, chooses a new cache, or fears that it has otherwise lost 488 its way. 490 To limit the length of time a cache must keep the data necessary to 491 generate incremental updates, a router MUST send either a Serial 492 Query or a Reset Query no less frequently than once an hour. This 493 also acts as a keep alive at the application layer. 495 5.2. Typical Exchange 497 Cache Router 498 ~ ~ 499 | -------- Notify ----------> | (optional) 500 | | 501 | <----- Serial Query ------- | R requests data 502 | | 503 | ----- Cache Response -----> | C confirms request 504 | ------- IPvX Prefix ------> | C sends zero or more 505 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 506 | ------- IPvX Prefix ------> | Payload PDUs 507 | ------ End of Data ------> | C sends End of Data 508 | | and sends new serial 509 ~ ~ 511 The cache server SHOULD send a notify PDU with its current serial 512 number when the cache's serial changes, with the expectation that the 513 router MAY then issue a serial query earlier than it otherwise might. 514 This is analogous to DNS NOTIFY in [RFC1996]. The cache SHOULD rate 515 limit Serial Notifies to no more frequently than one per minute. 517 When the transport layer is up and either a timer has gone off in the 518 router, or the cache has sent a Notify, the router queries for new 519 data by sending a Serial Query, and the cache sends all data newer 520 than the serial in the Serial Query. 522 To limit the length of time a cache must keep old withdraws, a router 523 MUST send either a Serial Query or a Reset Query no less frequently 524 than once an hour. 526 5.3. No Incremental Update Available 528 Cache Router 529 ~ ~ 530 | <----- Serial Query ------ | R requests data 531 | ------- Cache Reset ------> | C cannot supply update 532 | | from specified serial 533 | <------ Reset Query ------- | R requests new data 534 | ----- Cache Response -----> | C confirms request 535 | ------- IPvX Prefix ------> | C sends zero or more 536 | ------- IPvX Prefix ------> | IPv4 and IPv6 Prefix 537 | ------- IPvX Prefix ------> | Payload PDUs 538 | ------ End of Data ------> | C sends End of Data 539 | | and sends new serial 540 ~ ~ 542 The cache may respond to a Serial Query with a Cache Reset, informing 543 the router that the cache cannot supply an incremental update from 544 the serial number specified by the router. This might be because the 545 cache has lost state, or because the router has waited too long 546 between polls and the cache has cleaned up old data that it no longer 547 believes it needs, or because the cache has run out of storage space 548 and had to expire some old data early. Regardless of how this state 549 arose, the cache replies with a Cache Reset to tell the router that 550 it cannot honor the request. When a router receives this, the router 551 SHOULD attempt to connect to any more preferred caches in its cache 552 list. If there are no more preferred caches it MUST issue a Reset 553 Query and get an entire new load from the cache 555 5.4. Cache has No Data Available 557 Cache Router 558 ~ ~ 559 | <----- Serial Query ------ | R requests data 560 | ---- Error Report PDU ----> | C cannot supply update 561 ~ ~ 563 Cache Router 564 ~ ~ 565 | <----- Reset Query ------- | R requests data 566 | ---- Error Report PDU ----> | C cannot supply update 567 ~ ~ 569 The cache may respond to either a Serial Query or a Reset Query 570 informing the router that the cache cannot supply any update at all. 571 The most likely cause is that the cache has lost state, perhaps due 572 to a restart, and has not yet recovered. While it is possible that a 573 cache might go into such a state without dropping any of its active 574 sessions, a router is more likely to see this behavior when it 575 initially connects and issues a Reset Query while the cache is still 576 rebuilding its database. 578 When a router receives this kind of error, the router SHOULD attempt 579 to connect to any other caches in its cache list, in preference 580 order. If no other caches are available, the router MUST issue 581 periodic Reset Queries until it gets a new usable load from the cache 583 6. SSH Transport 585 The transport layer session between a router and a cache carries the 586 binary Protocol Data Units (PDUs) in a persistent SSH session. 588 To run over SSH, the client router first establishes an SSH transport 589 connection using the SSH transport protocol, and the client and 590 server exchange keys for message integrity and encryption. The 591 client then invokes the "ssh-userauth" service to authenticate the 592 application, as described in the SSH authentication protocol RFC 4252 593 [RFC4252]. Once the application has been successfully authenticated, 594 the client invokes the "ssh-connection" service, also known as the 595 SSH connection protocol. 597 After the ssh-connection service is established, the client opens a 598 channel of type "session", which results in an SSH session. 600 Once the SSH session has been established, the application invokes 601 the application transport as an SSH subsystem called "rpki-rtr". 602 Subsystem support is a feature of SSH version 2 (SSHv2) and is not 603 included in SSHv1. Running this protocol as an SSH subsystem avoids 604 the need for the application to recognize shell prompts or skip over 605 extraneous information, such as a system message that is sent at 606 shell start-up. 608 It is assumed that the router and cache have exchanged keys out of 609 band by some reasonably secured means. 611 7. Router-Cache Set-Up 613 A cache has the public authentication data for each router it is 614 configured to support. 616 A router may be configured to peer with a selection of caches, and a 617 cache may be configured to support a selection of routers. So each 618 must have the name of each peer and authentication data for each. In 619 addition, in a router, this list has a non-unique preference value 620 for each server in order of preference. The client router attempts 621 to establish a session with each potential serving cache in 622 preference order, and then starts to load data from the highest 623 preference cache to which it can connect and authenticate. The 624 router's list of caches has the following elements: 626 Preference: A cardinal denoting the router's preference to use that 627 cache, the lower the value the more preferred. 629 Name: The IP Address or fully qualified domain name of the cache. 631 Key: The public ssh key of the cache. 633 MyKey: The private ssh key of this client. 635 As caches can not be rigorously synchronous, a client which changes 636 servers can not combine data from different parent caches. 637 Therefore, when a lower preference cache becomes available, if 638 resources allow, it would be prudent for the client to start a new 639 buffer for that cache's data, and only switch to those data when that 640 buffer is fully up to date. 642 8. Deployment Scenarios 644 For illustration, we present three likely deployment scenarios. 646 Small End Site: The small multi-homed end site may wish to outsource 647 the RPKI cache to one or more of their upstream ISPs. They would 648 exchange authentication material with the ISP using some out of 649 band mechanism, and their router(s) would connect to one or more 650 up-streams' caches. The ISPs would likely deploy caches intended 651 for customer use separately from the caches with which their own 652 BGP speakers peer. 654 Large End Site: A larger multi-homed end site might run one or more 655 caches, arranging them in a hierarchy of client caches, each 656 fetching from a serving cache which is closer to the global RPKI. 657 They might configure fall-back peerings to up-stream ISP caches. 659 ISP Backbone: A large ISP would likely have one or more redundant 660 caches in each major PoP, and these caches would fetch from each 661 other in an ISP-dependent topology so as not to place undue load 662 on the global RPKI publication infrastructure. 664 Experience with large DNS cache deployments has shown that complex 665 topologies are ill-advised as it is easy to make errors in the graph, 666 e.g. not maintaining a loop-free condition. 668 Of course, these are illustrations and there are other possible 669 deployment strategies. It is expected that minimizing load on the 670 global RPKI servers will be a major consideration. 672 To keep load on global RPKI services from unnecessary peaks, it is 673 recommended that primary caches which load from the distributed 674 global RPKI not do so all at the same times, e.g. on the hour. 675 Choose a random time, perhaps the ISP's AS number modulo 60 and 676 jitter the inter-fetch timing. 678 9. Error Codes 680 This section contains a preliminary list of error codes. The authors 681 expect additions to this section during development of the initial 682 implementations. Eventually, these error codes will probably need to 683 reside in an IANA registry. 685 0: Reserved. 687 1: Internal Error: The party reporting the error experienced some 688 kind of internal error unrelated to protocol operation (ran out of 689 memory, a coding assertion failued, etcetera). 691 2: No Data Available: The cache believes itself to be in good 692 working order, but is unable to answer either a Serial Query or a 693 Reset Query because it has no useful data available at this time. 694 This is likely to be a temporary error, and most likely indicates 695 that the cache has not yet completed pulling down an initial 696 current data set from the global RPKI system after some kind of 697 event that invalidated whatever data it might have previously held 698 (reboot, network partition, etcetera). 700 10. Security Considerations 702 As this document describes a security protocol, many aspects of 703 security interest are described in the relevant sections. This 704 section points out issues which may not be obvious in other sections. 706 Cache Validation: In order for a collection of caches as described 707 in Section 8 to guarantee a consistent view, they need to be given 708 consistent trust anchors to use in their internal validation 709 process. Distribution of a consistent trust anchor is assumed to 710 be out of band. 712 Cache Peer Identification: As the router initiates an ssh transport 713 session to a cache which it identifies by either IP address or 714 fully qualified domain name, a DNS or address spoofing attack 715 could make the correct cache unreachable. No session would be 716 established, as the authorization keys would not match. 718 Transport Security: The RPKI relies on object, not server or 719 transport, trust. I.e. the IANA root trust anchor is distributed 720 to all caches through some out of band means, and can then be used 721 by each cache to validate certificates and ROAs all the way down 722 the tree. The inter-cache relationships are based on this object 723 security model, hence the inter-cache transport can be lightly 724 protected. 726 But this protocol document assumes that the routers can not do the 727 validation cryptography. Hence the last link, from cache to 728 router, is secured by server authentication and transport level 729 security. This is dangerous, as server authentication and 730 transport have very different threat models than object security. 732 So the strength of the trust relationship and the transport 733 between the router(s) and the cache(s) are critical. You're 734 betting your routing on this. 736 While we can not say the cache must be on the same LAN, if only 737 due to the issue of an enterprise wanting to off-load the cache 738 task to their upstream ISP(s), locality, trust, and control are 739 very critical issues here. The cache(s) really SHOULD be as 740 close, in the sense of controlled and protected (against DDoS, 741 MITM) transport, to the router(s) as possible. It also SHOULD be 742 topologically close so that a minimum of validated routing data 743 are needed to bootstrap a router's access to a cache. 745 11. Glossary 747 The following terms are used with special meaning: 749 Global RPKI: The authoritative data of the RPKI are published in a 750 distributed set of servers at the IANA, RIRs, NIRs, and ISPs, see 751 [I-D.ietf-sidr-repos-struct]. 753 Non-authorative Cache: A coalesced copy of the RPKI which is 754 periodically fetched/refreshed directly or indirectly from the 755 global RPKI using the [rcynic] protocol/tools 757 Cache: The rcynic system is used to gather the distributed data of 758 the RPKI into a validated cache. Trusting this cache further is a 759 matter between the provider of the cache and a relying party. 761 Serial Number: A 32-bit monotonically increasing, cardinal which 762 wraps from 2^32-1 to 0. It denotes the logical version of a 763 cache. A cache increments the value by one when it successfully 764 updates its data from a parent cache or from primary RPKI data. 765 As a cache is rcynicing, new incoming data, and implicit deletes, 766 are marked with the new serial but MUST not be sent until the 767 fetch is complete. A serial number is not commensurate between 768 caches, nor need it be maintained across resets of the cache 769 server. See [RFC1982] on DNS Serial Number Arithmetic for too 770 much detail on serial number arithmetic. 772 12. IANA Considerations 774 This document requests the IANA to create a registry for PDU types. 776 This document requests the IANA to create a registry for Error Codes. 778 In addition, a registry for Version Numbers would be needed if new 779 Version Number is defined in a new RFC. 781 Note to RFC Editor: this section may be replaced on publication as an 782 RFC. 784 13. Acknowledgments 786 The authors wish to thank Steve Bellovin, Rex Fernando, Russ Housley, 787 Pradosh Mohapatra, Sandy Murphy, Megumi Ninomiya, Robert Raszuk, John 788 Scudder, Ruediger Volk, David Ward, and Bert Wijnen. 790 14. References 792 14.1. Normative References 794 [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, 795 August 1996. 797 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 798 Requirement Levels", BCP 14, RFC 2119, March 1997. 800 [RFC4252] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 801 Authentication Protocol", RFC 4252, January 2006. 803 [rcynic] Austein, R., "rcynic protocol", 804 . 806 14.2. Informative References 808 [I-D.ietf-sidr-arch] 809 Lepinski, M. and S. Kent, "An Infrastructure to Support 810 Secure Internet Routing", draft-ietf-sidr-arch-06 (work in 811 progress), March 2009. 813 [I-D.ietf-sidr-repos-struct] 814 Huston, G., Loomans, R., and G. Michaelson, "A Profile for 815 Resource Certificate Repository Structure", 816 draft-ietf-sidr-repos-struct-01 (work in progress), 817 October 2008. 819 [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone 820 Changes (DNS NOTIFY)", RFC 1996, August 1996. 822 Authors' Addresses 824 Randy Bush 825 Internet Initiative Japan, Inc. 826 5147 Crystal Springs 827 Bainbridge Island, Washington 98110 828 US 830 Phone: +1 206 780 0431 x1 831 Email: randy@psg.com 833 Rob Austein 834 Internet Systems Consortium 835 950 Charter Street 836 Redwood City, CA 94063 837 USA 839 Email: sra@isc.org