idnits 2.17.1 draft-ietf-ace-cmpv2-coap-transport-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([Lightweight-CMP-Profile]), 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 == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (May 25, 2021) is 1060 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 (-21) exists of draft-ietf-lamps-lightweight-cmp-profile-05 -- Obsolete informational reference (is this intentional?): RFC 6347 (Obsoleted by RFC 9147) Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 ACE M. Sahni, Ed. 3 Internet-Draft S. Tripathi, Ed. 4 Intended status: Standards Track Palo Alto Networks 5 Expires: November 26, 2021 May 25, 2021 7 CoAP Transport for Certificate Management Protocol 8 draft-ietf-ace-cmpv2-coap-transport-02 10 Abstract 12 This document specifies the use of Constrained Application Protocol 13 (CoAP) as a transport medium for the Certificate Management Protocol 14 (CMP) as mentioned in the Lightweight CMP Profile 15 [Lightweight-CMP-Profile]. CMP defines the interaction between 16 various PKI entities for the purpose of certificate creation and 17 management. CoAP is an HTTP like client-server protocol used by 18 various constrained devices in the IoT space. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on November 26, 2021. 37 Copyright Notice 39 Copyright (c) 2021 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. CoAP Transport For CMP . . . . . . . . . . . . . . . . . . . 3 57 2.1. CoAP URI Format . . . . . . . . . . . . . . . . . . . . . 3 58 2.2. Discovery of CMP RA/CA . . . . . . . . . . . . . . . . . 3 59 2.3. CoAP Request Format . . . . . . . . . . . . . . . . . . . 4 60 2.4. CoAP Content-Format . . . . . . . . . . . . . . . . . . . 4 61 2.5. Announcement PKIMessage . . . . . . . . . . . . . . . . . 4 62 2.6. CoAP Block-Wise Transfer Mode . . . . . . . . . . . . . . 4 63 2.7. Multicast CoAP . . . . . . . . . . . . . . . . . . . . . 5 64 3. Using CoAP over DTLS . . . . . . . . . . . . . . . . . . . . 5 65 4. Proxy Support . . . . . . . . . . . . . . . . . . . . . . . . 5 66 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 67 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 68 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 69 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 70 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 71 8.2. Informative References . . . . . . . . . . . . . . . . . 7 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 74 1. Introduction 76 The Certificate Management Protocol (CMP) [RFC4210] is used by the 77 PKI entities for the generation and management of certificates. One 78 of the requirements of Certificate Management Protocol is to be 79 independent of the transport protocol in use. CMP has mechanisms to 80 take care of required transactions, error reporting and protection of 81 messages. The Constrained Application Protocol (CoAP) defined in 82 [RFC7252], [RFC7959] and [RFC8323] is a client-server protocol like 83 HTTP. It is designed to be used by constrained devices over 84 constrained networks. The recommended transport for CoAP is UDP, 85 however [RFC8323] specifies the support of CoAP over TCP, TLS and 86 Websockets. This document specifies the use of CoAP over UDP as a 87 transport medium for the CMP version 2 [RFC4210], CMP version 3 88 [Certificate-Management-Protocol-Updates] and Lightweight CMP Profile 89 [Lightweight-CMP-Profile]. This document, in general, follows the 90 HTTP transport specifications for CMP defined in [RFC6712] and 91 specifies the additional requirements for using CoAP as a transport 92 medium. This document also provides guidance on how to use a "CoAP- 93 to-HTTP" proxy for a better adaptation of CoAP transport without 94 significant changes to the existing PKI entities. Although CoAP 95 transport can be used for communication between Registration 96 Authority (RA) and Certification Authority (CA) or between CAs, the 97 scope of this document is for communication between End Entity (EE) 98 and RA or EE and CA. This document is applicable only when the CoAP 99 transport is used for the CMP transactions. 101 1.1. Terminology 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY",and 105 "OPTIONAL" in this document are to be interpreted as described in BCP 106 14 [RFC2119] [RFC8174] when, and only when, they appear in all 107 capitals, as shown here. 109 2. CoAP Transport For CMP 111 A CMP transaction consists of exchanging PKIMessages [RFC4210] 112 between PKI End Entities (EEs), Registration Authorities (RAs), and 113 Certification Authorities (CAs). If the EEs are constrained devices 114 then they may prefer, as a CMP client, the use of CoAP instead of 115 HTTP as the transport medium, while the RAs and CAs, in general, are 116 not constrained and can support both CoAP and HTTP Client and Server 117 implementations. This section specifies how to use CoAP as the 118 transport medium for the Certificate Management Protocol. 120 2.1. CoAP URI Format 122 The CoAP URI format is described in section 6 of [RFC7252]. The CoAP 123 endpoints MUST support use of the path prefix "/.well-known/" as 124 defined in [RFC8615] and the registered name "cmp" to help with 125 endpoint discovery and interoperability. Optional path segments MAY 126 be added after the registered application name (i.e. after "/.well- 127 known/cmp") to provide path specific to a CA, certificate profile or 128 PKI management operations. A valid full operation path segment can 129 look like this: 131 coap://www.example.com/.well-known/cmp 132 coap://www.example.com/.well-known/cmp/operationalLabel 133 coap://www.example.com/.well-known/cmp/profileLabel 134 coap://www.example.com/.well-known/cmp/profileLabel/operationalLabel 136 2.2. Discovery of CMP RA/CA 138 The EEs can be configured with enough information to form the CMP 139 server URI. The minimum information that can be configured is the 140 scheme i.e. "coap://" or "coaps://" and the authority portion of the 141 URI, e.g. "example.com:5683". If the port number is not specified in 142 the authority, then port 5683 MUST be assumed for the "coap://" 143 scheme and port 5684 MUST be assumed for the "coaps://" scheme. 144 Optionally, in the environments where a Local Registration Authority 145 (LRA) or a Local CA is deployed, EEs can also use the CoAP service 146 discovery mechanism [RFC7252] to discover the URI of the Local RA or 147 CA's CMP endpoint. The CoAP CMP endpoints supporting service 148 discovery MUST also support resource discovery in the CoRE Link 149 Format as described in [RFC6690]. 151 2.3. CoAP Request Format 153 The CMP PKIMessages MUST be DER encoded and sent as the body of the 154 CoAP POST request. If the CoAP request is successful then the server 155 MUST return a "2.05 Content" response code. If the CoAP request is 156 not successful then an appropriate CoAP Client Error 4.xx or a Server 157 Error 5.xx response code MUST be returned. 159 2.4. CoAP Content-Format 161 When transferring CMP PKIMesssage over CoAP the media type 162 "application/pkixcmp" MUST be used. 164 2.5. Announcement PKIMessage 166 When using the CoAP protocol, a PKI EE SHOULD poll for the potential 167 changes via "PKI Information" request using "PKI General Message" 168 defined in the PKIMessage [RFC4210] for various type of changes like 169 CA key update or to get current CRL [RFC5280] to check revocation or 170 using Support messages defined in section 5.4 of Lightweight CMP 171 Profile [Lightweight-CMP-Profile]. This will help constrained 172 devices that are acting as EEs conserve resources by eliminating the 173 need to create an endpoint for receiving notifications from RA or CA. 174 It will also simplify the implementation of CoAP-to-HTTP proxy. 176 2.6. CoAP Block-Wise Transfer Mode 178 A CMP PKIMesssage consists of a header, body, protection, and 179 extraCerts structures. These structures may contain many optional 180 and potentially large fields, a CMP message can be much larger than 181 the Maximum Transmission Unit (MTU) of the outgoing interface of the 182 device. In order to avoid IP fragmentation of messages exchanged 183 between EEs and RAs or CAs, the Block-Wise transfer [RFC7959] mode 184 MUST be used for the CMP Transactions over CoAP. If a CoAP-to-HTTP 185 proxy is in the path between EEs and CA or EEs and RA then it MUST 186 receive the entire body from the client before sending the HTTP 187 request to the server. This will avoid unnecessary errors in case 188 the entire content of the PKIMesssage is not received and the proxy 189 opens a connection with the server. 191 2.7. Multicast CoAP 193 CMP PKIMessages sent over CoAP transport MUST NOT use a Multicast 194 destination address. 196 3. Using CoAP over DTLS 198 Although CMP protocol does not depend upon the underlying transport 199 for protecting the messages but in cases when an end to end secrecy 200 is desired for the CoAP transport, CoAP over DTLS [RFC6347] as a 201 transport medium SHOULD be used. Section 9.1 of [RFC7252] defines 202 how to use DTLS [RFC6347] for securing the CoAP. Once a DTLS 203 [RFC6347] connection is established it SHOULD be used for as long as 204 possible to avoid the frequent overhead of setting up a DTLS 205 [RFC6347] connection for constrained devices. 207 4. Proxy Support 209 This section provides guidance on using a CoAP-to-HTTP proxy between 210 EEs and RAs or CAs in order to avoid changes to the existing PKI 211 implementation. Since the CMP payload is same over CoAP and HTTP 212 transport, a CoAP-to-HTTP cross-protocol proxy can be implemented 213 based on section 10 of [RFC7252]. The CoAP-to-HTTP proxy can be 214 either located closer to the EEs or closer to the RA or CA. In case 215 the proxy is deployed closer to the EEs then it may also support 216 service discovery and resource discovery as described in section 2.2. 217 The CoAP-to-HTTP proxy MUST function as a reverse proxy, only 218 permitting connections to a limited set of pre-configured servers. 219 It is out of scope of this document on how a reverse proxy can route 220 CoAP client requests to one of the configured servers. Some 221 recommended mechanisms are as follows: 223 o Use Uri-Path option to identify a server. 224 o Use separate hostnames for each of the configured servers and then 225 use Uri-Host option for routing the CoAP requests. 226 o Use separate hostnames for each of the configured servers and then 227 use Server Name Indication ([RFC8446]) in case of "coaps://" 228 scheme for routing CoAP requests. 230 5. Security Considerations 232 The CMP protocol depends upon various mechanisms in the protocol 233 itself for making the transactions secure therefore security issues 234 of CoAP due to using UDP do not carry over to the CMP layer. However 235 the CoAP is vulnerable to many issues due to the connectionless 236 characteristics of UDP itself. The Security considerations for CoAP 237 protocol are mentioned in the [RFC7252]. 239 In order to to reduce the risks imposed by DoS attacks, the 240 implementations SHOULD minimize fragmentation of messages, i.e. avoid 241 small packets containing partial CMP PKIMessage data. 243 A CoAP-to-HTTP proxy can also protect the PKI entities from various 244 attacks by enforcing basic checks and validating messages before 245 sending them to PKI entities. Proxy can be deployed at the edge of 246 End Entities" network or in front of an RA and CA to protect them. 248 6. IANA Considerations 250 This document requires a new entry to the CoAP Content-Formats 251 Registry code for the content-type "application/pkixcmp" and a new 252 entry in Well-Known URIs for URI Suffix "cmp". 254 7. Acknowledgments 256 The authors would like to thank Hendrik Brockhaus, David von Oheimb, 257 and Andreas Kretschmer for their guidance in writing the content of 258 this document and providing valuable feedback. 260 8. References 262 8.1. Normative References 264 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 265 Requirement Levels", BCP 14, RFC 2119, 266 DOI 10.17487/RFC2119, March 1997, 267 . 269 [RFC4210] Adams, C., Farrell, S., Kause, T., and T. Mononen, 270 "Internet X.509 Public Key Infrastructure Certificate 271 Management Protocol (CMP)", RFC 4210, 272 DOI 10.17487/RFC4210, September 2005, 273 . 275 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 276 Housley, R., and W. Polk, "Internet X.509 Public Key 277 Infrastructure Certificate and Certificate Revocation List 278 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 279 . 281 [RFC6690] Shelby, Z., "Constrained RESTful Environments (CoRE) Link 282 Format", RFC 6690, DOI 10.17487/RFC6690, August 2012, 283 . 285 [RFC6712] Kause, T. and M. Peylo, "Internet X.509 Public Key 286 Infrastructure -- HTTP Transfer for the Certificate 287 Management Protocol (CMP)", RFC 6712, 288 DOI 10.17487/RFC6712, September 2012, 289 . 291 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 292 Application Protocol (CoAP)", RFC 7252, 293 DOI 10.17487/RFC7252, June 2014, 294 . 296 [RFC7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in 297 the Constrained Application Protocol (CoAP)", RFC 7959, 298 DOI 10.17487/RFC7959, August 2016, 299 . 301 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 302 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 303 May 2017, . 305 [RFC8323] Bormann, C., Lemay, S., Tschofenig, H., Hartke, K., 306 Silverajan, B., and B. Raymor, Ed., "CoAP (Constrained 307 Application Protocol) over TCP, TLS, and WebSockets", 308 RFC 8323, DOI 10.17487/RFC8323, February 2018, 309 . 311 [RFC8615] Nottingham, M., "Well-Known Uniform Resource Identifiers 312 (URIs)", RFC 8615, DOI 10.17487/RFC8615, May 2019, 313 . 315 8.2. Informative References 317 [Certificate-Management-Protocol-Updates] 318 Brockhaus, H. and D. von Oheimb, "Certificate Management 319 Protocol (CMP) Updates", Work in Progress, draft- 320 brockhaus-lamps-cmp-updates-03, 2021, 321 . 324 [Lightweight-CMP-Profile] 325 Brockhaus, H., Fries, S., and D. von Oheimb, "Lightweight 326 CMP Profile", Work in Progress, draft-ietf-lamps- 327 lightweight-cmp-profile-05, 2021, 328 . 331 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 332 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 333 January 2012, . 335 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 336 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 337 . 339 Authors' Addresses 341 Mohit Sahni (editor) 342 Palo Alto Networks 343 3000 Tannery Way 344 Santa Clara, CA 95054 345 US 347 EMail: msahni@paloaltonetworks.com 349 Saurabh Tripathi (editor) 350 Palo Alto Networks 351 3000 Tannery Way 352 Santa Clara, CA 95054 353 US 355 EMail: stripathi@paloaltonetworks.com