idnits 2.17.1 draft-ietf-pkix-cmp-transport-protocols-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? == There are 2 instances of lines with non-ascii characters in the document. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 547 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 6 instances of too long lines in the document, the longest one being 8 characters in excess of 72. ** There are 13 instances of lines with control characters in the document. ** The abstract seems to contain references ([RFC2119], [CMP]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 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 seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'CMP' is mentioned on line 40, but not defined == Unused Reference: 'HTTP' is defined on line 479, but no explicit reference was found in the text == Unused Reference: 'RFC821' is defined on line 485, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2510 (Obsoleted by RFC 4210) ** Obsolete normative reference: RFC 2616 (ref. 'HTTP') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 821 (Obsoleted by RFC 2821) Summary: 11 errors (**), 0 flaws (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Draft 2 PKIX Working Group Amit Kapoor (Certicom) 3 Expires in 6 months Ronald Tschal�r (Certicom) 5 June 22 2000 7 Transport Protocols for CMP 8 10 Status of this Memo 12 This document is an Internet-Draft and is in full conformance with 13 all provisions of Section 10 of RFC2026. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that 17 other groups may also distribute working documents as 18 Internet-Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six 21 months and may be updated, replaced, or obsoleted by other documents 22 at any time. It is inappropriate to use Internet- Drafts as 23 reference material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.txt 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 This Internet-Draft will expire on December 22, 2000 33 Copyright Notice 35 Copyright (C) The Internet Society (2000). All Rights Reserved. 37 Abstract 39 This document describes how to layer Certificate Management 40 Protocols [CMP] over various transport protocols. 42 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD 43 NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document (in 44 uppercase, as shown) are to be interpreted as described in 45 [RFC2119]. 47 This document version corresponds to the draft-ietf-pkix-cmp-transports-03.txt 48 published and discussed in the PKI Forum interoperability mailing list. 50 1. Motivation 52 Section 5 of the [RFC2510] spec specifies sending the DER-encoded 53 CMP message directly over various protocols. However, implementors, 54 during various interoperability workshops, found the protocol 55 lacking in the following respects: 57 1. No clear definition on when the connection is to be closed 58 and by whom. 59 2. No version number specified to allow for extensions. 60 3. Error messages cannot be processed by applications. 62 Realizing that this could not be achieved in a backward compatible 63 way, and acknowledging the changes being made to [RFC2510], the 64 decision was made to enhance the protocol now to avoid 65 interoperability conflicts later and to pull the transport section 66 out in a separate draft. This enhancement tries to keep as much of 67 the older protocol as possible, while ensuring that implementations 68 using the old protocol will not mistake a new message for a valid 69 message in the [RFC2510] format. 71 2. TCP-Based Management Protocol 73 While this section is called TCP-Based and the messages are called 74 TCP-message's, the same protocol can be used over any reliable, 75 connection oriented transport protocol (e.g. SNA, DECnet, etc.). 76 This protocol is suitable for cases where an end entity (or an RA) 77 initiates a transaction and can poll to pick up the results. 79 The client sends a TCP-message to the server, and the server 80 responds with another TCP-message. 82 The protocol basically assumes a listener process on an RA or CA 83 which can accept TCP-messages on a well-defined port (default port 84 number is 829). Typically a client initiates connection to the 85 server and submits a PKI message. The server replies with a PKI 86 message or with a reference number to be used later when polling 87 for the actual PKI message response. 89 If a polling-reference was supplied then the client will send a 90 polling request using this polling-reference after waiting for at 91 least the specified time. The server may again reply with a 92 polling-reference or with the actual PKI message response. 94 When the final PKI response message has been picked up by the 95 client then no new polling reference is supplied. 97 If a transaction is initiated by a PKI entity (RA or CA) then an 98 end entity must either supply a listener process or be supplied 99 with a polling reference (see below) in order to allow it to pick 100 up the PKI message from the PKI management component. 102 2.1 General Form 104 A TCP-message consists of: 106 length (32-bits) 107 version (8-bits) 108 flags (variable length) 109 message-type (8-bits), 110 value (defined below) 112 The length field contains the number of octets of the remainder of 113 the TCP-message (i.e., number of octets of plus 114 plus 2). All bit values in this protocol are specified to be in 115 network byte order. 117 The version field indicates the version of the TCP-message. It MUST 118 be incremented for each specification which changes the flags field 119 in a way that is not fully backwards compatible with the previous 120 version (e.g. when the length of the flags field is changed). 122 The flags field is for transporting TCP-message specific data. The 123 length of this field is version dependent and is fixed for a given 124 version. 126 The message-type field is used to indicate the type of TCP-message. 128 The value field contains message-type dependent data. 130 2.2 Version Negotiation 132 If a client knows the protocol version(s) supported by the 133 server (e.g. from a previous TCP-message exchange or via some 134 out-of-band means) then it SHOULD send a TCP-message with the highest 135 version supported both by it and the server. If a client does 136 not know what version(s) the server supports then it SHOULD send 137 a TCP-message using the highest version it supports. 139 If a server receives a TCP-message version that it supports, then it 140 MUST reply with a TCP-message of the same version. If the version 141 received is higher than what the server supports, it MUST send 142 back a VersionNotSupported errorMsgRep (defined below) containing 143 the highest version it supports. 145 2.3 TCP-message Version 10 147 The TCP-message version will be 10 for this document. The number 148 has deliberately been chosen to prevent [RFC2510] compliant 149 applications from treating it as a valid message type. Applications 150 receiving a version less than 10 SHOULD interpret the message as 151 being an [RFC2510] style message. 153 The length of the flags field for this version is 1 octet. The LSB 154 is used to indicate a connection close; all other bits in the flags 155 octet MUST be ignored by receivers, and MUST be set to zero by 156 senders. 158 By default connections are kept open after the receipt of a 159 response. Either party (client or server) MAY set the connection 160 close bit at any time. If the connection close bit is set on a 161 request, then the server MUST set the bit in the response and 162 close the connection after sending the response. If the bit is set 163 on a response from the server, the client MUST NOT send any further 164 requests on that connection. Applications MAY decide to close an 165 idle connection (one on which no response is outstanding) after 166 some time-out. Because of the problem where a client sends a 167 request and the server closes the connection while the request is 168 still in flight, clients SHOULD automatically retry a request for 169 which no part of the response could be read due to a connection 170 close or reset. 172 If the connection is kept open, it MUST only be used for subsequent 173 request/response transactions started by the client - the server 174 MUST NOT use it to send requests to the client. Different 175 transactions may be freely interwoven on the same connection. E.g. 176 a CR/CP need not immediately be followed by the Confirm, but may be 177 followed by any other request from a different transaction. 179 2.4 Detecting and Interoperating with RFC-2510 Conformant Implementations 181 Servers wishing to interoperate with clients conforming to 182 [RFC2510] can do so by treating any received message with a version 183 less than 10 as an [RFC2510] message and responding in that format. 184 Servers not wishing to support [RFC2510] messages MUST respond with 185 a [RFC2510] errorMsgRep. 187 Clients wishing to interoperate with [RFC2510] compliant servers 188 SHOULD treat a response with a version less than 10 as an [RFC2510] 189 style message. If this message is an errorMsgRep (message-type 06) 190 then the client MAY automatically retry the request using the 191 [RFC2510] format; if the message is not an errorMsgRep or the 192 implementation does not wish to support [RFC2510] then it MUST 193 abort the corresponding CMP transaction. 195 2.5 Message Types 197 message-types 0-127 are reserved and will be issued under IANA 198 auspices. message-types 128-255 are reserved for application use. 200 The message-type's currently defined are: 202 Message name Message-type 204 pkiReq '00'H 206 pollRep '01'H 208 pollReq '02'H 210 finRep '03'H 212 pkiRep '05'H 214 errorMsgRep '06'H 216 If server receives an unknown message-type then it MUST reply with 217 an InvalidMessageType errorMsgRep. If a client receives an unknown 218 message-type then it MUST abort the CMP transaction. 220 The different TCP-messages are discussed in the following sections: 222 2.5.1 pkiReq 224 The pkiReq is to be used to carry a PKIMessage from the client to the 225 server. The portion of this TCP-message will contain: 227 DER-encoded PKIMessage. 229 The type of PKIMessages that can be carried by this TCP-message are: 231 CRL Announcement 232 Certificate Confirmation 233 Poll Request 234 Subscription Request 235 CA Key Update Announcement 236 Certificate Announcement 237 Certification Request 238 Cross-Certification Request 239 Error Message 240 General Message 241 Initialization Request 242 Key Recovery Request 243 Key Update Request 244 Nested Message 245 PKCS-10 Request 246 POP Response 247 Revocation Request 249 2.5.2 pkiRep 251 This TCP-message is to be used to send back the response to the request. 252 The portion of the pkiRep will contain: 254 DER encoded PKI message 256 The type of PKIMessages that can be carried by this TCP-message are: 258 Confirmation 259 Poll Response 260 Subscription Response 261 Certification Response 262 Error Message 263 General Response 264 Initialization Response 265 Key Recovery Response 266 Key Update Response 267 POP Challenge 268 Revocation Response 270 2.5.3 pollReq 272 The pollReq will be the used by the client to check the status of a 273 pending TCP-message. The portion of the pollReq will 274 contain: 276 polling-reference (32 bits) 278 The MUST be the one returned via the pollRep 279 TCP-message. 281 2.5.4 pollRep 283 The pollRep will be the response sent by the server to the client 284 when there are no TCP-message response ready. The portion of 285 the pollRep will contain: 287 polling-reference (32 bits) 288 time-to-check-back (32 bits) 290 The is a unique 32-bit number sent by the server. 291 The is the time in seconds indicating the minimum 292 interval after which the client SHOULD check the status again. 294 The duration for which the server keeps the 295 unique is left to the implementation. 297 2.5.5 finRep 299 finRep will be the response from the server indicating end of 300 transaction, i.e., there are no further messages to be delivered 301 from the server. The portion of the finRep will 302 contain: 304 '00'H (8 bits) 306 2.5.6 errorMsgRep 308 This TCP-message is sent when a TCP-message level protocol error is 309 detected. Please note that PKIError messages MUST NOT be sent 310 using this. Examples of TCP-message level errors are: 312 1. Invalid protocol version 313 2. Invalid TCP message-type 314 3. Invalid polling reference number 316 The field of the TCP-message SHALL contain: 318 error-type (16-bits) 319 data-length (16-bits) 320 data ( octets) 321 UTF8 String (SHOULD include a RFC 1766 language tag) 323 The is of the form MMNN where M and N are hex digits 324 (0-F) and MM represents the major category and NN the minor. The 325 major categories defined by this specification are: 327 '01'H TCP-message version negotiation 328 '02'H client errors 329 '03'H server errors 331 The major categories '80'H-'FF'H are reserved for application use. 333 The and are additional information about the 334 error to be used by programs for further processing and recovery. 335 contains the length of the field in number of 336 octets. Error messages not needing additional information to be 337 conveyed MUST set the to 0. 339 The UTF8 text string is for user readable error messages. 341 2.5.6.1 VersionNotSupported errorMsgRep 343 The VersionNotSupported errorMsgRep is defined as follows: 345 error-type: '0101'H 346 data-length: 1 347 data: 348 UTF8-text String: implementation defined 350 where is the highest version the server supports. 352 2.5.6.2 GeneralClientError errorMsgRep 354 The GeneralClientError errorMsgRep is defined as follows: 356 error-type: '0200'H 357 data-length: 0 358 data: 359 UTF8-text String: implementation defined 361 2.5.6.3 InvalidMessageType errorMsgRep 363 The InvalidMessageType errorMsgRep is defined as follows: 365 error-type: '0201'H 366 data-length: 1 367 data: 368 UTF8-text String: implementation defined 370 where is the message-type received by the 371 server. 373 2.5.6.4 InvalidPollID errorMsgRep 375 The InvalidPollID errorMsgRep is defined as follows: 377 error-type: '0202'H 378 data-length: 4 379 data: 380 UTF8-text String: implementation defined 382 where is the polling-reference received by 383 the server. 385 2.5.6.5 GeneralServerError errorMsgRep 387 The GeneralServerError errorMsgRep is defined as follows: 389 error-type: '0300'H 390 data-length: 0 391 data: 392 UTF8-text String: implementation defined 394 3. HTTP-Based Management Protocol 396 A client creates a TCP-message, as specified in section 2.0. The 397 message is then sent as the entity-body of an HTTP POST request. If 398 the HTTP request is successful then the server returns a similar 399 message in the body of the response. The response status code in 400 this case MUST be 200; other 2xx codes MUST NOT be used. The content 401 type of the request and response MUST be "application/pkixcmp". 402 Applications MAY wish to also recognized and use the 403 "application/x-pkixcmp" MIME type (specified in earlier versions of 404 this document) in order to support backward compatibility wherever 405 applicable. Content codings may be applied. 407 Note that a server may return any 1xx, 3xx, 4xx, or 5xx code if the 408 HTTP request needs further handling or is otherwise not acceptable. 410 Because in general CMP messages are not cacheable, requests and 411 responses should include a "Cache-Control: no-cache" (and, if either 412 side uses HTTP/1.0, a "Pragma: no-cache") to prevent the client from 413 getting cached responses. This is especially important for polling 414 requests and responses. 416 Connection management SHOULD be based on the HTTP provided mechanisms 417 (Connection and Proxy-Connection headers) and not on the connection 418 flag carried in the TCP-message. 420 4. File based protocol 422 A file containing a PKI message MUST contain only the DER encoding of 423 one PKI message, i.e., there MUST be no extraneous header or trailer 424 information in the file. 426 Such files can be used to transport PKI messages using, e.g., FTP. 428 5. Mail based protocol 430 This subsection specifies a means for conveying ASN.1-encoded 431 messages for the protocol exchanges via Internet mail. 433 A simple MIME object is specified as follows. 435 Content-Type: application/pkixcmp 436 Content-Transfer-Encoding: base64 438 <> 440 This MIME object can be sent and received using common MIME 441 processing engines and provides a simple Internet mail transport for 442 PKIX-CMP messages. Implementations MAY wish to also recognize and 443 use the "application/x-pkixcmp" MIME type (specified in earlier 444 versions of this document) in order to support backward compatibility 445 wherever applicable. 447 6. Security Considerations 449 Three aspects need to be considered by server side implementors: 451 1. There is no security at the TCP and HTTP protocol level (unless 452 tunneled via SSL/TLS) and thus TCP-message should not be used 453 to change state of the transaction. Change of state should be 454 done on the signed PKIMessage being carried within the 455 TCP-message. 457 2. If the server is going to be sending messages with sensitive 458 information (not meant for public consumption) in the clear, it 459 is RECOMMENDED that the server send back the message directly 460 and not use the pollRep. 462 3. The polling request/response mechanism can be used for all kinds 463 of denial of service attacks. It is RECOMMENDED that the server 464 not change the polling-reference between polling requests. 466 7. Acknowledgments 468 The authors gratefully acknowledge the contributions of various 469 members of the IETF PKIX Working Group and the ICSA CA-talk mailing 470 list (a list solely devoted to discussing CMP interoperability 471 efforts). 473 8. References 475 [RFC2510] Adams, C., Farrell, S., "Internet X.509 Public Key 476 Infrastructure, Certificate Management Protocols", RFC 2510, 477 March 1999. 479 [HTTP] Fielding, R.T., et. al, "Hypertext Transfer Protocol -- 480 HTTP/1.1", RFC 2616, June 1999. 482 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 483 Requirement Levels", RFC 2119, March 1997. 485 [RFC821] Postel, J., "Simple Mail Transfer Protocol", RFC 821, 486 August 1982. 488 Authors' Addresses 490 Amit Kapoor 491 Certicom 492 25801 Industrial Blvd 493 Hayward, CA 94545 494 US 496 E-Mail: amit@trustpoint.com 498 Ronald Tschal�r 499 Certicom 500 25801 Industrial Blvd 501 Hayward, CA 94545 502 US 504 E-Mail: ronald@trustpoint.com 506 Full Copyright Statement 508 Copyright (C) The Internet Society (2000). All Rights Reserved. 510 This document and translations of it may be copied and furnished to 511 others, and derivative works that comment on or otherwise explain 512 it or assist in its implementation may be prepared, copied, 513 published and distributed, in whole or in part, without restriction 514 of any kind, provided that the above copyright notice and this 515 paragraph are included on all such copies and derivative works. 516 However, this document itself may not be modified in any way, such 517 as by removing the copyright notice or references to the Internet 518 Society or other Internet organizations, except as needed for the 519 purpose of developing Internet standards in which case the 520 procedures for copyrights defined in the Internet Standards process 521 must be followed, or as required to translate it into languages 522 other than English. 524 The limited permissions granted above are perpetual and will not be 525 revoked by the Internet Society or its successors or assigns. 527 This document and the information contained herein is provided on 528 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET 529 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR 530 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 531 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 532 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.