idnits 2.17.00 (12 Aug 2021) /tmp/idnits56490/draft-ietf-opsawg-sdi-07.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 : ---------------------------------------------------------------------------- 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 date (April 07, 2020) is 774 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'AU' is mentioned on line 683, but not defined == Missing Reference: 'Some-State' is mentioned on line 684, but not defined == Outdated reference: draft-gutmann-scep has been published as RFC 8894 == Outdated reference: draft-ietf-anima-bootstrapping-keyinfra has been published as RFC 8995 == Outdated reference: draft-ietf-opsawg-tacacs has been published as RFC 8907 -- Obsolete informational reference (is this intentional?): RFC 5751 (Obsoleted by RFC 8551) Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Intended status: Informational C. Doyle 5 Expires: October 9, 2020 Juniper Networks 6 April 07, 2020 8 Secure Device Install 9 draft-ietf-opsawg-sdi-07 11 Abstract 13 Deploying a new network device in a location where the operator has 14 no staff of its own often requires that an employee physically travel 15 to the location to perform the initial install and configuration, 16 even in shared datacenters with "smart-hands" type support. In many 17 cases, this could be avoided if there were a secure way to initially 18 provision the device. 20 This document extends existing auto-install / Zero-Touch Provisioning 21 mechanisms to make the process more secure. 23 [ Ed note: Text inside square brackets ([]) is additional background 24 information, answers to frequently asked questions, general musings, 25 etc. They will be removed before publication. This document is 26 being collaborated on in Github at: https://github.com/wkumari/draft- 27 wkumari-opsawg-sdi. The most recent version of the document, open 28 issues, etc should all be available here. The authors (gratefully) 29 accept pull requests. ] 31 [ Ed note: This document introduces concepts and serves as the basic 32 for discussion - because of this, it is conversational, and would 33 need to be firmed up before being published ] 35 Status of This Memo 37 This Internet-Draft is submitted in full conformance with the 38 provisions of BCP 78 and BCP 79. 40 Internet-Drafts are working documents of the Internet Engineering 41 Task Force (IETF). Note that other groups may also distribute 42 working documents as Internet-Drafts. The list of current Internet- 43 Drafts is at https://datatracker.ietf.org/drafts/current/. 45 Internet-Drafts are draft documents valid for a maximum of six months 46 and may be updated, replaced, or obsoleted by other documents at any 47 time. It is inappropriate to use Internet-Drafts as reference 48 material or to cite them other than as "work in progress." 49 This Internet-Draft will expire on October 9, 2020. 51 Copyright Notice 53 Copyright (c) 2020 IETF Trust and the persons identified as the 54 document authors. All rights reserved. 56 This document is subject to BCP 78 and the IETF Trust's Legal 57 Provisions Relating to IETF Documents 58 (https://trustee.ietf.org/license-info) in effect on the date of 59 publication of this document. Please review these documents 60 carefully, as they describe your rights and restrictions with respect 61 to this document. Code Components extracted from this document must 62 include Simplified BSD License text as described in Section 4.e of 63 the Trust Legal Provisions and are provided without warranty as 64 described in the Simplified BSD License. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 69 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 4 70 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 71 2.1. Example Scenario . . . . . . . . . . . . . . . . . . . . 5 72 3. Vendor Role / Requirements . . . . . . . . . . . . . . . . . 6 73 3.1. Device key generation . . . . . . . . . . . . . . . . . . 6 74 3.2. Certificate Publication Server . . . . . . . . . . . . . 6 75 4. Operator Role / Responsibilities . . . . . . . . . . . . . . 7 76 4.1. Administrative . . . . . . . . . . . . . . . . . . . . . 7 77 4.2. Technical . . . . . . . . . . . . . . . . . . . . . . . . 7 78 4.3. Example Initial Customer Boot . . . . . . . . . . . . . . 8 79 5. Additional Considerations . . . . . . . . . . . . . . . . . . 11 80 5.1. Key storage . . . . . . . . . . . . . . . . . . . . . . . 11 81 5.2. Key replacement . . . . . . . . . . . . . . . . . . . . . 11 82 5.3. Device reinstall . . . . . . . . . . . . . . . . . . . . 11 83 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 84 7. Security Considerations . . . . . . . . . . . . . . . . . . . 11 85 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 86 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 87 9.1. Normative References . . . . . . . . . . . . . . . . . . 12 88 9.2. Informative References . . . . . . . . . . . . . . . . . 13 89 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 14 90 Appendix B. Demo / proof of concept . . . . . . . . . . . . . . 15 91 B.1. Step 1: Generating the certificate. . . . . . . . . . . . 15 92 B.1.1. Step 1.1: Generate the private key. . . . . . . . . . 15 93 B.1.2. Step 1.2: Generate the certificate signing request. . 16 94 B.1.3. Step 1.3: Generate the (self signed) certificate 95 itself. . . . . . . . . . . . . . . . . . . . . . . . 16 96 B.2. Step 2: Generating the encrypted config. . . . . . . . . 16 97 B.2.1. Step 2.1: Fetch the certificate. . . . . . . . . . . 16 98 B.2.2. Step 2.2: Encrypt the config file. . . . . . . . . . 16 99 B.2.3. Step 2.3: Copy config to the config server. . . . . . 17 100 B.3. Step 3: Decrypting and using the config. . . . . . . . . 17 101 B.3.1. Step 3.1: Fetch encrypted config file from config 102 server. . . . . . . . . . . . . . . . . . . . . . . . 17 103 B.3.2. Step 3.2: Decrypt and use the config. . . . . . . . . 17 104 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 106 1. Introduction 108 In a growing, global network, significant amounts of time and money 109 are spent deploying new devices and "forklift" upgrading existing 110 devices. In many cases, these devices are in shared datacenters (for 111 example, Internet Exchange Points (IXP) or "carrier neutral 112 datacenters"), which have staff on hand that can be contracted to 113 perform tasks including physical installs, device reboots, loading 114 initial configurations, etc. There are also a number of (often 115 vendor proprietary) protocols to perform initial device installs and 116 configurations - for example, many network devices will attempt to 117 use DHCP [RFC2131]to get an IP address and configuration server, and 118 then fetch and install a configuration when they are first powered 119 on. 121 The configurations of network devices contain a significant amount of 122 security related and / or proprietary information (for example, 123 RADIUS [RFC2865] or TACACS+ [I-D.ietf-opsawg-tacacs] secrets). 124 Exposing these to a third party to load onto a new device (or using 125 an auto-install techniques which fetch an unencrypted config file via 126 TFTP [RFC1350]) or something similar, is an unacceptable security 127 risk for many operators, and so they send employees to remote 128 locations to perform the initial configuration work; this costs, time 129 and money. 131 There are some workarounds to this, such as asking the vendor to pre- 132 configure the devices before shipping it; asking the smart-hands to 133 install a terminal server; providing a minimal, unsecured 134 configuration and using that to bootstrap to a complete 135 configuration, etc; but these are often clumsy and have security 136 issues - for example, in the terminal server case, the console port 137 connection could be easily snooped. 139 This document layers security onto existing auto-install solutions to 140 provide a secure method to initially configure new devices. It is 141 optimized for simplicity, both for the implementor and the operator; 142 it is explicitly not intended to be an "all singing, all dancing" 143 fully featured system for managing installed / deployed devices, nor 144 is it intended to solve all use-cases - rather it is a simple 145 targeted solution to solve a common operational issue where the 146 network device has been delivered, fibre laid (as appropriate) but 147 there is no trusted member of the operator's staff to perform the 148 initial configuration. 150 Solutions such as Secure Zero Touch Provisioning (SZTP)" [RFC8572], 151 [I-D.ietf-anima-bootstrapping-keyinfra] and similar are much more 152 fully featured, but also more complex to implement and / or are not 153 widely deployed yet. 155 This solution is specifically designed to be a simple method on top 156 of exiting device functionality. If devices do not support this new 157 method, they can continue to use the existing functionality. In 158 addition, operators can choose to use this to protect their 159 configuration information, or can continue to use the existing 160 functionality. 162 The issue of securely installing devices is in no way a new issue, 163 nor is it limited to network devices; it occurs when deploying 164 servers, PCs, IoT devices, and in many other situations. While the 165 solution described in this document is obvious (encrypt the config, 166 then decrypt it with a device key), this document only discusses the 167 use for network devices, such as routers and switches. 169 1.1. Requirements notation 171 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 172 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 173 "OPTIONAL" in this document are to be interpreted as described in BCP 174 14 [RFC2119] [RFC8174] when, and only when, they appear in all 175 capitals, as shown here. 177 2. Overview 179 Most network devices already include some sort of initial 180 bootstrapping logic (sometimes called 'autoboot', or 'autoinstall'). 181 This generally works by having a newly installed / unconfigured 182 device obtain an IP address and address of a config server (often 183 called 'next-server', 'siaddr' or 'tftp-server-name') using DHCP (see 184 [RFC2131]). The device then contacts this configuration server to 185 download its initial configuration, which is often identified using 186 the devices serial number, MAC address or similar. This document 187 extends this (vendor specific) paradigm by allowing the configuration 188 file to be encrypted. 190 This document describes a concept, and some example ways of 191 implementing this concept. As devices have different capabilities, 192 and use different configuration paradigms, one method will not suit 193 all, and so it is expected that vendors will differ in exactly how 194 they implement this. 196 This document uses the serial number of the device as a unique 197 identifier for simplicity; some vendors may not want to implement the 198 system using the serial number as the identifier for business reasons 199 (a competitor or similar could enumerate the serial numbers and 200 determine how many devices have been manufactured). Implementors are 201 free to choose some other way of generating identifiers (e.g., UUID 202 [RFC4122]), but this will likely make it somewhat harder for 203 operators to use (the serial number is usually easy to find on a 204 device, a more complex system is likely harder to track). 206 [ Ed note: This example also uses TFTP because that is what many 207 vendors use in their auto-install / ZTP feature. It could easily 208 instead be HTTP, FTP, etc. ] 210 2.1. Example Scenario 212 Sirius Cybernetics Corp needs another peering router, and so they 213 order another router from Acme Network Widgets, to be drop-shipped to 214 the Point of Presence (POP) / datacenter. Acme begins assembling the 215 new device, and tells Sirius what the new device's serial number will 216 be (SN:17894321). When Acme first installs the firmware on the 217 device and boots it, the device generates a public-private keypair, 218 and Acme publishes it on their keyserver (in a public key 219 certificate, for ease of use). 221 While the device is being shipped, Sirius generates the initial 222 device configuration, fetches the certificate from Acme keyservers by 223 providing the serial number of the new device. Sirius then encrypts 224 the device configuration and puts this encrypted config on a (local) 225 TFTP server. 227 When the device arrives at the POP, it gets installed in Sirius' 228 rack, and cabled as instructed. The new device powers up and 229 discovers that it has not yet been configured. It enters its 230 autoboot state, and begins the DHCP process. Sirius' DHCP server 231 provides it with an IP address and the address of the configuration 232 server. The router uses TFTP to fetch its config file (note that all 233 this is existing functionality). The device attempts to load the 234 config file - if the config file is unparsable, (new functionality) 235 the device tries to use its private key to decrypt the file, and, 236 assuming it validates, installs the new configuration. 238 Only the "correct" device will have the required private key and be 239 able to decrypt and use the config file (See Security 240 Considerations). An attacker would be able to connect to the network 241 and get an IP address. They would also be able to retrieve 242 (encrypted) config files by guessing serial numbers (or perhaps the 243 server would allow directory listing), but without the private keys 244 an attacker will not be able to decrypt the files. 246 3. Vendor Role / Requirements 248 This section describes the vendors roles and responsibilities and 249 provides an overview of what the device needs to do. 251 3.1. Device key generation 253 Each devices requires a public-private key keypair, and for the 254 public part to be published and retrievable by the operator. The 255 cryptograthic algorithm and keylenghts to be used are out of the 256 scope of this document. This section illustrates one method, but, as 257 with much of this document the exact mechanism may will vary by 258 vendor. [I-D.gutmann-scep] is one method which vendors may want to 259 strongly consider. 261 During the manufacturing stage, when the device is initially powered 262 on, it will generate a public-private keypair. It will send its 263 unique identifier and the public key to the vendor's Certificate 264 Publication Server to be published. The vendor's Certificate 265 Publication Server should only accept certificates from the 266 manufacturing facility, and which match vendor defined policies (for 267 example, extended key usage, extensions, etc.) Note that some 268 devices may be constrained, and so may send the raw public key and 269 unique identifier to the certificate publication server, while more 270 capable devices may generate and send self-signed certificates. 272 3.2. Certificate Publication Server 274 The certificate publication server contains a database of 275 certificates. If newly manufactured devices upload certificates the 276 certificate publication server can simply publish these, if the 277 devices provide raw public keys and unique identifiers the 278 certificate publication server will need to wrap these in a 279 certificate. Note that the certificate publication server MUST only 280 accept certificates or keys from the vendor's manufacturing 281 facilities. 283 The customers (e.g., Sirius Cybernetics Corp) query this server with 284 the serial number (or other provided unique identifier) of a device, 285 and retrieve the associated certificate. It is expected that 286 operators will receive the unique identifier (serial number) of 287 devices when they purchase them, and will download and store / cache 288 the certificate. This means that there is not a hard requirement on 289 the uptime / reachability of the certificate publication server. 291 +------------+ 292 +------+ |Certificate | 293 |Device| |Publication | 294 +------+ | Server | 295 +------------+ 296 +----------------+ +--------------+ 297 | +---------+ | | | 298 | | Initial | | | | 299 | | boot? | | | | 300 | +----+----+ | | | 301 | | | | | 302 | +------v-----+ | | | 303 | | Generate | | | | 304 | |Self-signed | | | | 305 | |Certificate | | | | 306 | +------------+ | | | 307 | | | | +-------+ | 308 | +-------|---|-->|Receive| | 309 | | | +---+---+ | 310 | | | | | 311 | | | +---v---+ | 312 | | | |Publish| | 313 | | | +-------+ | 314 | | | | 315 +----------------+ +--------------+ 317 Initial certificate generation and publication. 319 4. Operator Role / Responsibilities 321 4.1. Administrative 323 When purchasing a new device, the accounting department will need to 324 get the unique device identifier (likely serial number) of the new 325 device and communicate it to the operations group. 327 4.2. Technical 329 The operator will contact the vendor's publication server, and 330 download the certificate (by providing the unique device identifier 331 of the device). The operator SHOULD fetch the certificate using a 332 secure transport (e.g., HTTPS). The operator will then encrypt the 333 initial configuration (for example, using SMIME [RFC5751]) using the 334 key in the certificate, and place it on their TFTP server. See 335 Appendix B for examples. 337 +------------+ 338 +--------+ |Certificate | 339 |Operator| |Publication | 340 +--------+ | Server | 341 +------------+ 342 +----------------+ +----------------+ 343 | +-----------+ | | +-----------+ | 344 | | Fetch | | | | | | 345 | | Device |<------>|Certificate| | 346 | |Certificate| | | | | | 347 | +-----+-----+ | | +-----------+ | 348 | | | | | 349 | +-----v------+ | | | 350 | | Encrypt | | | | 351 | | Device | | | | 352 | | Config | | | | 353 | +-----+------+ | | | 354 | | | | | 355 | +-----v------+ | | | 356 | | Publish | | | | 357 | | TFTP | | | | 358 | | Server | | | | 359 | +------------+ | | | 360 | | | | 361 +----------------+ +----------------+ 363 Fetching the certificate, encrypting the configuration, publishing 364 the encrypted configuration. 366 4.3. Example Initial Customer Boot 368 When the device is first booted by the customer (and on subsequent 369 boots), if the device does not have a valid configuration, it will 370 use existing auto-install functionality. As an example, it performs 371 DHCP Discovery until it gets a DHCP offer including DHCP option 66 372 (Server-Name) or 150 (TFTP server address), contact the server listed 373 in these DHCP options and downloads its config file. Note that this 374 is existing functionality (for example, Cisco devices fetch the 375 config file named by the Bootfile-Name DHCP option (67)). 377 After retrieving the config file, the device needs to determine if it 378 is encrypted or not. If it is not encrypted, the existing behavior 379 is used. If the configuration is encrypted, the process continues as 380 described in this document. The method used to determine if the 381 config is encrypted or not is implementation dependant; there are a 382 number of (obvious) options, including having a magic string in the 383 file header, using a file name extension (e.g., config.enc), or using 384 specific DHCP options. 386 If the file is encrypted, the device will attempt to decrypt and 387 parse the file. It able, it will install the configuration, and 388 start using it. If this fails, the device with either abort the 389 auto-install process, or will repeat this process until it succeeds. 391 Note that the device only needs to be able to download the config 392 file; after the initial power-on in the factory it never needs to 393 access the Internet or vendor or certificate publication server - it 394 (and only it) has the private key and so has the ability to decrypt 395 the config file. 397 +--------+ +--------------+ 398 | Device | |Config server | 399 +--------+ | (e.g. TFTP) | 400 +--------------+ 401 +---------------------------+ +------------------+ 402 | +-----------+ | | | 403 | | | | | | 404 | | DHCP | | | | 405 | | | | | | 406 | +-----+-----+ | | | 407 | | | | | 408 | +-----v------+ | | +-----------+ | 409 | | | | | | Encrypted | | 410 | |Fetch config|<------------------>| config | | 411 | | | | | | file | | 412 | +-----+------+ | | +-----------+ | 413 | | | | | 414 | X | | | 415 | / \ | | | 416 | / \ N +--------+ | | | 417 | | Enc?|---->|Install,| | | | 418 | \ / | Boot | | | | 419 | \ / +--------+ | | | 420 | V | | | 421 | |Y | | | 422 | | | | | 423 | +-----v------+ | | | 424 | |Decrypt with| | | | 425 | |private key | | | | 426 | +-----+------+ | | | 427 | | | | | 428 | v | | | 429 | / \ | | | 430 | / \ Y +--------+ | | | 431 | |Sane?|---->|Install,| | | | 432 | \ / | Boot | | | | 433 | \ / +--------+ | | | 434 | V | | | 435 | |N | | | 436 | | | | | 437 | +----v---+ | | | 438 | |Give up | | | | 439 | |go home | | | | 440 | +--------+ | | | 441 | | | | 442 +---------------------------+ +------------------+ 444 Device boot, fetch and install config file 446 5. Additional Considerations 448 5.1. Key storage 450 Ideally, the keypair would be stored in a Trusted Platform Module 451 (TPM) on something which is identified as the "router" - for example, 452 the chassis / backplane. This is so that a keypair is bound to what 453 humans think of as the "device", and not, for example (redundant) 454 routing engines. Devices which implement IEEE 802.1AR [IEEE802-1AR] 455 could choose to use the IDevID for this purpose. 457 5.2. Key replacement 459 It is anticipated that some operator may want to replace the (vendor 460 provided) keys after installing the device. There are two options 461 when implementing this - a vendor could allow the operator's key to 462 completely replace the initial device generated key (which means 463 that, if the device is ever sold, the new owner couldn't use this 464 technique to install the device), or the device could prefer the 465 operators installed key. This is an implementation decision left to 466 the vendor. 468 5.3. Device reinstall 470 Increasingly, operations is moving towards an automated model of 471 device management, whereby portions (or the entire) configuration is 472 programmatically generated. This means that operators may want to 473 generate an entire configuration after the device has been initially 474 installed and ask the device to load and use this new configuration. 475 It is expected (but not defined in this document, as it is vendor 476 specific) that vendors will allow the operator to copy a new, 477 encrypted config (or part of a config) onto a device and then request 478 that the device decrypt and install it (e.g.: 'load replace 479 encrypted)). The operator could also choose to reset the 480 device to factory defaults, and allow the device to act as though it 481 were the initial boot (see Section 4.3). 483 6. IANA Considerations 485 This document makes no requests of the IANA. 487 7. Security Considerations 489 This mechanism is intended to replace either expensive (traveling 490 employees) or insecure mechanisms of installing newly deployed 491 devices such as: unencrypted config files which can be downloaded by 492 connecting to unprotected ports in datacenters, mailing initial 493 config files on flash drives, or emailing config files and asking a 494 third-party to copy and paste it over a serial terminal. It does not 495 protect against devices with malicious firmware, nor theft and reuse 496 of devices. 498 An attacker (e.g., a malicious datacenter employee) who has physical 499 access to the device before it is connected to the network the 500 attacker may be able to extract the device private key (especially if 501 it isn't stored in a TPM), pretend to be the device when connecting 502 to the network, and download and extract the (encrypted) config file. 504 This mechanism does not protect against a malicious vendor - while 505 the keypair should be generated on the device, and the private key 506 should be securely stored, the mechanism cannot detect or protect 507 against a vendor who claims to do this, but instead generates the 508 keypair off device and keeps a copy of the private key. It is 509 largely understood in the operator community that a malicious vendor 510 or attacker with physical access to the device is largely a "Game 511 Over" situation. 513 Even when using a secure bootstrapping mechanism, security conscious 514 operators may wish to bootstrapping devices with a minimal / less 515 sensitive config, and then replace this with a more complete one 516 after install. 518 8. Acknowledgments 520 The authors wish to thank everyone who contributed, including Benoit 521 Claise, Francis Dupont, Sam Ribeiro, Michael Richardson, Sean Turner 522 and Kent Watsen. Joe Clarke also provided significant comments and 523 review, and Tom Petch provided significant editorial contributions to 524 better describe the use cases, and clarify the scope. 526 9. References 528 9.1. Normative References 530 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 531 Requirement Levels", BCP 14, RFC 2119, 532 DOI 10.17487/RFC2119, March 1997, 533 . 535 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 536 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 537 May 2017, . 539 9.2. Informative References 541 [I-D.gutmann-scep] 542 Gutmann, P., "Simple Certificate Enrolment Protocol", 543 draft-gutmann-scep-16 (work in progress), March 2020. 545 [I-D.ietf-anima-bootstrapping-keyinfra] 546 Pritikin, M., Richardson, M., Eckert, T., Behringer, M., 547 and K. Watsen, "Bootstrapping Remote Secure Key 548 Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping- 549 keyinfra-40 (work in progress), April 2020. 551 [I-D.ietf-opsawg-tacacs] 552 Dahm, T., Ota, A., dcmgash@cisco.com, d., Carrel, D., and 553 L. Grant, "The TACACS+ Protocol", draft-ietf-opsawg- 554 tacacs-18 (work in progress), March 2020. 556 [IEEE802-1AR] 557 IEEE, "IEEE Standard for Local and Metropolitan Area 558 Networks - Secure Device Identity", June 2018, 559 . 561 [RFC1350] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, 562 RFC 1350, DOI 10.17487/RFC1350, July 1992, 563 . 565 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", 566 RFC 2131, DOI 10.17487/RFC2131, March 1997, 567 . 569 [RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson, 570 "Remote Authentication Dial In User Service (RADIUS)", 571 RFC 2865, DOI 10.17487/RFC2865, June 2000, 572 . 574 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 575 Unique IDentifier (UUID) URN Namespace", RFC 4122, 576 DOI 10.17487/RFC4122, July 2005, 577 . 579 [RFC5751] Ramsdell, B. and S. Turner, "Secure/Multipurpose Internet 580 Mail Extensions (S/MIME) Version 3.2 Message 581 Specification", RFC 5751, DOI 10.17487/RFC5751, January 582 2010, . 584 [RFC8572] Watsen, K., Farrer, I., and M. Abrahamsson, "Secure Zero 585 Touch Provisioning (SZTP)", RFC 8572, 586 DOI 10.17487/RFC8572, April 2019, 587 . 589 Appendix A. Changes / Author Notes. 591 [RFC Editor: Please remove this section before publication ] 593 From -03 to -04 595 o Addressed Joe's WGLC comments. This involved changing the "just 596 try decrypt and pray" to vendor specific, like a file extension, 597 magic header sting, etc. 599 o Addressed tom's comments. 601 From individual WG-01 to -03: 603 o Addressed Joe Clarke's comments - 604 https://mailarchive.ietf.org/arch/msg/opsawg/JTzsdVXw- 605 XtWXZIIFhH7aW_-0YY 607 o Many typos / nits 609 o Broke Overview and Example Scenario into 2 sections. 611 o Reordered text for above. 613 From individual -04 to WG-01: 615 o Renamed from draft-wkumari-opsawg-sdi-04 -> draft-ietf-opsawg- 616 sdi-00 618 From -00 to -01 620 o Nothing changed in the template! 622 From -01 to -03: 624 o See github commit log (AKA, we forgot to update this!) 626 o Added Colin Doyle. 628 From -03 to -04: 630 Addressed a number of comments received before / at IETF104 (Prague). 631 These include: 633 o Pointer to https://datatracker.ietf.org/doc/draft-ietf-netconf- 634 zerotouch -- included reference to (now) RFC8572 (KW) 636 o Suggested that 802.1AR IDevID (or similar) could be used. Stress 637 that this is designed for simplicity (MR) 639 o Added text to explain that any unique device identifier can be 640 used, not just serial number - serial number is simple and easy, 641 but anything which is unique (and can be communicated to the 642 customer) will work (BF). 644 o Lots of clarifications from Joe Clarke. 646 o Make it clear it should first try use the config, and if it 647 doesn't work, then try decrypt and use it. 649 o The CA part was confusing people - the certificate is simply a 650 wrapper for the key, and the Subject just an index, and so removed 651 that. 653 o Added a bunch of ASCII diagrams 655 Appendix B. Demo / proof of concept 657 This section contains a rough demo / proof of concept of the system. 658 It is only intended for illustration, and is not intended to be used 659 in production. 661 It uses OpenSSL from the command line, in production something more 662 automated would be used. In this example, the unique identifier is 663 the serial number of the router, SN19842256. 665 B.1. Step 1: Generating the certificate. 667 This step is performed by the router. It generates a key, then a 668 csr, and then a self signed certificate. 670 B.1.1. Step 1.1: Generate the private key. 672 $ openssl genrsa -out key.pem 2048 673 Generating RSA private key, 2048 bit long modulus 674 ................................................. 675 ................................................. 676 ..........................+++ 677 ...................+++ 678 e is 65537 (0x10001) 680 B.1.2. Step 1.2: Generate the certificate signing request. 682 $ openssl req -new -key key.pem -out SN19842256.csr 683 Country Name (2 letter code) [AU]:. 684 State or Province Name (full name) [Some-State]:. 685 Locality Name (eg, city) []:. 686 Organization Name (eg, company) [Internet Widgits Pty Ltd]:. 687 Organizational Unit Name (eg, section) []:. 688 Common Name (e.g. server FQDN or YOUR name) []:SN19842256 689 Email Address []:. 691 Please enter the following 'extra' attributes 692 to be sent with your certificate request 693 A challenge password []: 694 An optional company name []:. 696 B.1.3. Step 1.3: Generate the (self signed) certificate itself. 698 $ openssl req -x509 -days 36500 -key key.pem -in SN19842256.csr -out 699 SN19842256.crt 701 The router then sends the key to the vendor's keyserver for 702 publication (not shown). 704 B.2. Step 2: Generating the encrypted config. 706 The operator now wants to deploy the new router. 708 They generate the initial config (using whatever magic tool generates 709 router configs!), fetch the router's certificate and encrypt the 710 config file to that key. This is done by the operator. 712 B.2.1. Step 2.1: Fetch the certificate. 714 $ wget http://keyserv.example.net/certificates/SN19842256.crt 716 B.2.2. Step 2.2: Encrypt the config file. 718 I'm using S/MIME because it is simple to demonstrate. This is almost 719 definitely not the best way to do this. 721 $ openssl smime -encrypt -aes-256-cbc -in SN19842256.cfg\ 722 -out SN19842256.enc -outform PEM SN19842256.crt 723 $ more SN19842256.enc 724 -----BEGIN PKCS7----- 725 MIICigYJKoZIhvcNAQcDoIICezCCAncCAQAxggE+MIIBOgIBADAiMBUxEzARBgNV 726 BAMMClNOMTk4NDIyNTYCCQDJVuBlaTOb1DANBgkqhkiG9w0BAQEFAASCAQBABvM3 727 ... 728 LZoq08jqlWhZZWhTKs4XPGHUdmnZRYIP8KXyEtHt 729 -----END PKCS7----- 731 B.2.3. Step 2.3: Copy config to the config server. 733 $ scp SN19842256.enc config.example.com:/tftpboot 735 B.3. Step 3: Decrypting and using the config. 737 When the router connects to the operator's network it will detect 738 that does not have a valid configuration file, and will start the 739 "autoboot" process. This is a well documented process, but the high 740 level overview is that it will use DHCP to obtain an IP address and 741 config server. It will then use TFTP to download a configuration 742 file, based upon its serial number (this document modifies the 743 solution to fetch an encrypted config file (ending in .enc)). It 744 will then decrypt the config file, and install it. 746 B.3.1. Step 3.1: Fetch encrypted config file from config server. 748 $ tftp 2001:0db8::23 -c get SN19842256.enc 750 B.3.2. Step 3.2: Decrypt and use the config. 752 $ openssl smime -decrypt -in SN19842256.enc -inform pkcs7\ 753 -out config.cfg -inkey key.pem 755 If an attacker does not have the correct key, they will not be able 756 to decrypt the config: 758 $ openssl smime -decrypt -in SN19842256.enc -inform pkcs7\ 759 -out config.cfg -inkey wrongkey.pem 760 Error decrypting PKCS#7 structure 761 140352450692760:error:06065064:digital envelope 762 routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:592: 763 $ echo $? 764 4 766 Authors' Addresses 768 Warren Kumari 769 Google 770 1600 Amphitheatre Parkway 771 Mountain View, CA 94043 772 US 774 Email: warren@kumari.net 776 Colin Doyle 777 Juniper Networks 778 1133 Innovation Way 779 Sunnyvale, CA 94089 780 US 782 Email: cdoyle@juniper.net