idnits 2.17.1 draft-pmohapat-sidr-pfx-validate-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) 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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 2, 2010) is 5138 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-09 ** Downref: Normative reference to an Informational draft: draft-ietf-sidr-arch (ref. 'I-D.ietf-sidr-arch') == Outdated reference: A later version (-12) exists of draft-ietf-sidr-roa-format-06 == Outdated reference: A later version (-06) exists of draft-ymbk-rpki-rtr-protocol-04 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 P. Mohapatra, Ed. 3 Internet-Draft Cisco Systems 4 Intended status: Standards Track J. Scudder, Ed. 5 Expires: October 4, 2010 D. Ward, Ed. 6 Juniper Networks 7 R. Bush, Ed. 8 Internet Initiative Japan, Inc. 9 R. Austein, Ed. 10 Internet Systems Consortium 11 April 2, 2010 13 BGP Prefix Origin Validation 14 draft-pmohapat-sidr-pfx-validate-05 16 Abstract 18 A BGP route associates an address prefix with a set of autonomous 19 systems (AS) that identify the interdomain path the prefix has 20 traversed in the form of BGP announcements. This set is represented 21 as the AS_PATH attribute in BGP and starts with the AS that 22 originated the prefix. To help reduce well-known threats against BGP 23 including prefix mis-announcing and monkey-in-the-middle attacks, one 24 of the security requirements is the ability to validate the 25 origination AS of BGP routes. More specifically, one needs to 26 validate that the AS number claiming to originate an address prefix 27 (as derived from the AS_PATH attribute of the BGP route) is in fact 28 authorized by the prefix holder to do so. This document describes a 29 simple validation mechanism to partially satisfy this requirement. 31 Status of this Memo 33 This Internet-Draft is submitted to IETF in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF), its areas, and its working groups. Note that 38 other groups may also distribute working documents as Internet- 39 Drafts. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 The list of current Internet-Drafts can be accessed at 47 http://www.ietf.org/ietf/1id-abstracts.txt. 49 The list of Internet-Draft Shadow Directories can be accessed at 50 http://www.ietf.org/shadow.html. 52 This Internet-Draft will expire on October 4, 2010. 54 Copyright Notice 56 Copyright (c) 2010 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (http://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the BSD License. 69 This document may contain material from IETF Documents or IETF 70 Contributions published or made publicly available before November 71 10, 2008. The person(s) controlling the copyright in some of this 72 material may not have granted the IETF Trust the right to allow 73 modifications of such material outside the IETF Standards Process. 74 Without obtaining an adequate license from the person(s) controlling 75 the copyright in such materials, this document may not be modified 76 outside the IETF Standards Process, and derivative works of it may 77 not be created outside the IETF Standards Process, except to format 78 it for publication as an RFC or to translate it into languages other 79 than English. 81 Table of Contents 83 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 84 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 85 2. Prefix-to-AS Mapping Database . . . . . . . . . . . . . . . . 5 86 3. Policy Control . . . . . . . . . . . . . . . . . . . . . . . . 7 87 4. Route Aggregation . . . . . . . . . . . . . . . . . . . . . . 7 88 4.1. AS_SET . . . . . . . . . . . . . . . . . . . . . . . . . . 8 89 5. Interaction with Local Cache . . . . . . . . . . . . . . . . . 8 90 6. Deployment Considerations . . . . . . . . . . . . . . . . . . 8 91 7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 9 92 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9 93 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 94 10. Security Considerations . . . . . . . . . . . . . . . . . . . 10 95 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 96 11.1. Normative References . . . . . . . . . . . . . . . . . . . 10 97 11.2. Informative References . . . . . . . . . . . . . . . . . . 11 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11 100 1. Introduction 102 A BGP route associates an address prefix with a set of autonomous 103 systems (AS) that identify the interdomain path the prefix has 104 traversed in the form of BGP announcements. This set is represented 105 as the AS_PATH attribute in BGP [RFC4271] and starts with the AS that 106 originated the prefix. To help reduce well-known threats against BGP 107 including prefix mis-announcing and monkey-in-the-middle attacks, one 108 of the security requirements is the ability to validate the 109 origination AS of BGP routes. More specifically, one needs to 110 validate that the AS number claiming to originate an address prefix 111 (as derived from the AS_PATH attribute of the BGP route) is in fact 112 authorized by the prefix holder to do so. This document describes a 113 simple validation mechanism to partially satisfy this requirement. 115 The Resource Public Key Infrastructure (RPKI) describes an approach 116 to build a formally verifyable database of IP addresses and AS 117 numbers as resources. The overall architecture of RPKI as defined in 118 [I-D.ietf-sidr-arch] consists of three main components: 120 o A public key infrastructure (PKI) with the necessary certificate 121 objects, 123 o Digitally signed routing objects, 125 o A distributed repository system to hold the objects that would 126 also support periodic retrieval. 128 The RPKI system is based on resource certificates that define 129 extensions to X.509 to represent IP addresses and AS identifiers 130 [RFC3779], thus the name RPKI. Route Origin Authorizations (ROA) 131 [I-D.ietf-sidr-roa-format] are separate digitally signed objects that 132 define associations between ASes and IP address blocks. Finally the 133 repository system is operated in a distributed fashion through the 134 IANA, RIR hierarchy, and ISPs. 136 In order to benefit from the RPKI system, it is envisioned that 137 relying parties either at AS or organization level obtain a local 138 copy of the signed object collection, verify the signatures, and 139 process them. The cache must also be refreshed periodically. The 140 exact access mechanism used to retrieve the local cache is beyond the 141 scope of this document. 143 Individual BGP speakers can utilize the processed data contained in 144 the local cache to validate BGP announcements. The protocol details 145 to retrieve the processed data from the local cache to the BGP 146 speakers is beyond the scope of this document (refer to 147 [I-D.ymbk-rpki-rtr-protocol] for such a mechanism). This document 148 proposes a means by which a BGP speaker can make use of the processed 149 data in order to assign a "validity state" to each prefix in a 150 received BGP UPDATE message. 152 Note that the complete path attestation against the AS_PATH attribute 153 of a route is outside the scope of this document. 155 Although RPKI provides the context for this draft, it is equally 156 possible to use any other database which is able to map prefixes to 157 their authorized origin ASes. Each distinct database will have its 158 own particular operational and security characteristics; such 159 characteristics are beyond the scope of this document. 161 1.1. Requirements Language 163 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 164 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 165 document are to be interpreted as described in RFC 2119 [RFC2119]. 167 2. Prefix-to-AS Mapping Database 169 In loading the validated objects from the local cache to the BGP 170 speaker, the BGP speaker will store this data in the form of a 171 database that maintains the relationship between prefixes and the 172 corresponding set of authorized origin ASes. The primary key for 173 this database is a prefix set represented as (IP prefix)/[min. 174 length, max. length]. The value stored against each prefix set is 175 the set of AS numbers that is assigned or sub-allocated the 176 corresponding IP address block. An AS may originate more than one 177 prefix set. Thus, multiple prefix sets in the database may contain 178 the same origin AS(es). 180 Whenever UPDATEs are received from peers, a BGP speaker is expected 181 to perform a lookup in this database for each of the prefixes in the 182 UPDATE message. To aid with better description, we define terms 183 "UPDATE prefix" and "UPDATE origin AS number" to denote the values 184 derived from the received UPDATE message, and "database prefix set" 185 and "database origin AS number set" to mean the values derived from 186 the database lookup. Note that in the presence of overlapping 187 prefixes, the database lookup against the "UPDATE prefix" may yield 188 multiple matches. 190 The following are the different types of results expected from such a 191 lookup operation: 193 o If the "UPDATE prefix" finds no matching or covering prefixes in 194 the database (i.e. the "UPDATE prefix" is not a sub-block of any 195 of the database prefixes), the lookup result is returned as "not 196 found". Due to incremental deployment model of the RPKI 197 repository, it is expected that a complete registry of all IP 198 address blocks and their AS associations is not available at a 199 given point of time. 201 o If there are "database prefix sets" that cover the "UPDATE 202 prefix", and one of them has the "UPDATE origin AS number" in the 203 "database origin AS number sets", then the lookup result is 204 returned as "valid". 206 o If there are "database prefix sets" which cover the "UPDATE 207 prefix", but none of them has the "UPDATE origin AS number" in the 208 "database origin AS number set", then the lookup result is 209 returned as "invalid". 211 Depending on the lookup result, we define a property for each route, 212 called the "validity state". It can assume the values "valid", "not 213 found", or "invalid". 215 Note that all the routes, regardless of their "validity state" will 216 be stored in the local BGP speaker's Adj-RIB-In. 218 Following is a sample pseudo code for prefix validation function: 220 //Input are the variables derived from a BGP UPDATE message 221 //that need to be validated.origin_as is the first AS in the 222 //AS_PATH attribute. 223 // 224 //If the UPDATE message carries [AS4_]AGGREGATOR attribute, 225 //origin_as is derived from the AS field of that attribute. 226 // 227 //origin_as is NONE if the AS_PATH begins with a non-trivial 228 //AS_SET and has no [AS4_]AGGREGATOR attribute. 229 input = {bgp_prefix, masklen, origin_as}; 231 //Initialize result to "not found" state 232 result = BGP_PFXV_STATE_NOT_FOUND; 234 //pfx_validate_table organizes all the ROA entries retrieved 235 //from RPKI cache based on the IP address and the minLength 236 //field. There can be multiple such entries that match the 237 //input. Iterate through all of them. 238 entry = next_lookup_result(pfx_validate_table, 239 input.bgp_prefix, input.masklen); 241 while (entry != NULL) { 242 prefix_exists = TRUE; 244 //Each entry stores multiple records sorted by the ROA 245 //maxLength field. i.e. there can be multiple ROA records 246 //with the same IPaddress and minLength fields, but different 247 //maxLength field. Iterate through all records of the entry 248 //to check if there is one range that matches the input. 249 record = next_in_entry_record_list(entry); 250 while (record != NULL) { 251 if (input.masklen <= record->max_length) { 252 if (input.origin_as == record->origin_as) { 253 result = BGP_PFXV_STATE_VALID; 254 return (result); 255 } 256 } 257 } 258 } 260 //If pfx_validate_table contains one or more prefixes that 261 //match the input, but none of them resulted in a "valid" 262 //outcome since the origin_as did not match, return the 263 //result state as "invalid". Else the initialized state of 264 //"not found" applies to this validation operation. 265 if (prefix_exists == TRUE) { 266 result = BGP_PFXV_STATE_INVALID; 267 } 269 return (result); 271 3. Policy Control 273 An implementation MUST provide the ability to match and set the 274 validation state of routes as part of its route policy filtering 275 function. Use of validation state in route policy is elaborated in 276 Section 6. 278 4. Route Aggregation 280 When an UPDATE message carries AGGREGATOR attribute, the "UPDATE 281 origin AS number" is set to the value encoded in the AGGREGATOR 282 instead of being derived from the AS_PATH attribute. 284 4.1. AS_SET 286 When an UPDATE message's AS_PATH begins with an AS_SET and the 287 message does not carry an AGGREGATOR (or AS4_AGGREGATOR) attribute, 288 the origin AS cannot be determined. If the origin AS cannot be 289 determined, then by definition it cannot match any AS in the 290 validation database, and so the validation state will be either 291 "invalid" or at best, "not found", according to the rules given in 292 Section 2. 294 5. Interaction with Local Cache 296 Each BGP speaker supporting prefix validation as described in this 297 document is expected to communicate with one or multiple local caches 298 that store a database of RPKI signed objects. The protocol 299 mechanisms used to fetch the data and store them locally at the BGP 300 speaker is beyond the scope of this document (please refer 301 [I-D.ymbk-rpki-rtr-protocol]). Irrespective of the protocol, the 302 prefix validation algorithm as outlined in this document is expected 303 to function correctly in the event of failures and other timing 304 conditions that may result in an empty and/or partial prefix-to-AS 305 mapping database. Indeed, if the (in-PoP) cache is not available and 306 the mapping database is empty on the BGP speaker, all the lookups 307 will result in "not found" state and the prefixes will be advertised 308 to rest of the network (unless restricted by policy configuration). 309 Similarly, if BGP UPDATEs arrive at the speaker while the fetch 310 operation from the cache is in progress, some prefix lookups will 311 also result in "not found" state. The implementation is expected to 312 handle these timing conditions and MUST re-validate affected prefixes 313 once the fetch operation is complete. The same applies during any 314 subsequent incremental updates of the validation database. 316 In the event that connectivity to the cache is lost, the router 317 should make a reasonable effort to fetch a new validation database 318 (either from the same, or a different cache), and SHOULD wait until 319 the new validation database has been fetched before purging the 320 previous one. A configurable timer MUST be provided to bound the 321 length of time the router will wait before purging the previous 322 validation database. 324 6. Deployment Considerations 326 Once a route is received from an EBGP peer it is categorized 327 according the procedure given in Section 2. Subsequently, routing 328 policy as discussed in Section 3 can be used to take action based on 329 the validation state. 331 Policies which could be implemented include filtering routes based on 332 validation state (for example, rejecting all "invalid" routes) or 333 adjusting a route's degree of preference in the selection algorithm 334 based on its validation state. The latter could be accomplished by 335 adjusting the value of such attributes as LOCAL_PREF. 337 In some cases (particularly when the selection algorithm is 338 influenced by the adjustment of a route property that is not 339 propagated into IBGP) it could be necessary for routing correctness 340 to propagate the validation state to the IBGP peer. This can be 341 accomplished on the sending side by setting a community or extended 342 community based on the validation state, and on the receiving side by 343 matching the (extended) community and setting the validation state. 345 7. Contributors 347 Rex Fernando rex@cisco.com 348 Cisco Systems 350 Miya Kohno mkohno@juniper.net 351 Juniper Networks 353 Shin Miyakawa miyakawa@nttv6.jp 354 Taka Mizuguchi 355 Tomoya Yoshida 356 NTT Communications 358 Russ Housley housley@vigilsec.com 359 Vigil Security 361 Junaid Israr jisra052@uottawa.ca 362 Mouhcine Guennoun mguennou@uottawa.ca 363 Hussein Mouftah mouftah@site.uottawa.ca 364 University of Ottawa School of Information Technology and 365 Engineering(SITE) 800 King Edward Avenue, Ottawa, Ontario, Canada, 366 K1N 6N5 368 8. Acknowledgements 370 Junaid Israr's contribution to this specification is part of his PhD 371 research work and thesis at University of Ottawa, Canada. 373 9. IANA Considerations 374 10. Security Considerations 376 Although this specification discusses one portion of a system to 377 validate BGP routes, it should be noted that it relies on a database 378 (RPKI or other) to provide validation information. As such, the 379 security properties of that database must be considered in order to 380 determine the security provided by the overall solution. If 381 "invalid" routes are blocked as this specification suggests, the 382 overall system provides a possible denial-of-service vector, for 383 example if an attacker is able to inject one or more spoofed records 384 into the validation database which lead a good route to be declared 385 invalid. In addition, this system is only able to provide limited 386 protection against a determined attacker -- the attacker need only 387 prepend the "valid" source AS to a forged BGP route announcement in 388 order to defeat the protection provided by this system. This 389 mechanism does not protect against "AS in the middle attacks" or 390 provide any path validation. It only attempts to verify the origin. 391 In general, this system should be thought of more as a protection 392 against misconfiguration than as true "security" in the strong sense. 394 11. References 396 11.1. Normative References 398 [I-D.ietf-sidr-arch] 399 Lepinski, M. and S. Kent, "An Infrastructure to Support 400 Secure Internet Routing", draft-ietf-sidr-arch-09 (work in 401 progress), October 2009. 403 [I-D.ietf-sidr-roa-format] 404 Lepinski, M., Kent, S., and D. Kong, "A Profile for Route 405 Origin Authorizations (ROAs)", 406 draft-ietf-sidr-roa-format-06 (work in progress), 407 October 2009. 409 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 410 Requirement Levels", BCP 14, RFC 2119, March 1997. 412 [RFC3779] Lynn, C., Kent, S., and K. Seo, "X.509 Extensions for IP 413 Addresses and AS Identifiers", RFC 3779, June 2004. 415 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 416 Protocol 4 (BGP-4)", RFC 4271, January 2006. 418 11.2. Informative References 420 [I-D.ymbk-rpki-rtr-protocol] 421 Bush, R. and R. Austein, "The RPKI/Router Protocol", 422 draft-ymbk-rpki-rtr-protocol-04 (work in progress), 423 July 2009. 425 Authors' Addresses 427 Pradosh Mohapatra (editor) 428 Cisco Systems 429 170 W. Tasman Drive 430 San Jose, CA 95134 431 USA 433 Email: pmohapat@cisco.com 435 John Scudder (editor) 436 Juniper Networks 437 1194 N. Mathilda Ave 438 Sunnyvale, CA 94089 439 USA 441 Email: jgs@juniper.net 443 David Ward (editor) 444 Juniper Networks 445 1194 N. Mathilda Ave 446 Sunnyvale, CA 94089 447 USA 449 Email: dward@juniper.net 451 Randy Bush (editor) 452 Internet Initiative Japan, Inc. 453 5147 Crystral Springs 454 Bainbridge Island, Washington 98110 455 USA 457 Email: randy@psg.com 458 Rob Austein (editor) 459 Internet Systems Consortium 460 950 Charter Street 461 Redwood City, CA 94063 462 USA 464 Email: sra@isc.org