idnits 2.17.1 draft-ietf-pkix-cmp-transport-protocols-02.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: ---------------------------------------------------------------------------- == 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 610 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 4 instances of too long lines in the document, the longest one being 3 characters in excess of 72. ** There are 10 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) == Unused Reference: 'HTTP' is defined on line 491, but no explicit reference was found in the text == Unused Reference: 'RFC821' is defined on line 497, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2510 (Obsoleted by RFC 4210) == Outdated reference: A later version (-09) exists of draft-ietf-pkix-rfc2510bis-01 ** 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: 10 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 October 03 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 April 03, 2001 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 1. Motivation 49 Section 5 of the [RFC2510] spec specifies how to exchange CMP 50 messages over various transports. However, implementors, during 51 various interoperability workshops, found the protocol lacking in 52 the following respects: 54 1. For CMP-over-TCP (section 5.2): 55 A. No clear definition on when the connection is to be 56 closed and by whom. 57 B. No version number specified to allow for extensions. 58 C. Error messages cannot be processed by applications. 60 2. For CMP-over-HTTP (section 5.4): 61 A. No support for polling 62 B. No specification of what to do in the case where there 63 is no CMP response message (e.g. after a conf) 65 Realizing that this could not be achieved in a backward compatible 66 way, and acknowledging the changes being made to [RFC2510], the 67 decision was made to enhance the protocol now to avoid 68 interoperability conflicts later and to pull the transport section 69 out in a separate draft. This enhancement tries to keep as much of 70 the older protocol as possible, while ensuring that implementations 71 using the old protocol will not mistake a new message for a valid 72 message in the [RFC2510] format. 74 For CMP-over-HTTP a new content type is specified which carries a 75 TCP-message instead of a plain DER-encoded PKIMessage. 77 2. TCP-Based Management Protocol 79 While this section is called TCP-Based and the messages are called 80 TCP-message's, the same protocol can be used over any reliable, 81 connection oriented transport protocol (e.g. SNA, DECnet, etc.). 82 This protocol is suitable for cases where an end entity (or an RA) 83 initiates a transaction and can poll to pick up the results. 85 The client sends a TCP-message to the server, and the server 86 responds with another TCP-message. Note that a response MUST be 87 sent for every request, even if the encapsulated CMP message in the 88 request does not have a corresponding response. 90 The protocol basically assumes a listener process on an RA or CA 91 which can accept TCP-messages on a well-defined port (default port 92 number is 829). Typically a client initiates connection to the 93 server and submits a PKI message. The server replies with a PKI 94 message or with a reference number to be used later when polling 95 for the actual PKI message response. 97 If a polling-reference was supplied then the client will send a 98 polling request using this polling-reference after waiting for at 99 least the specified time. The server may again reply with a 100 polling-reference or with the actual PKI message response. 102 When the final PKI response message has been picked up by the 103 client then no new polling reference is supplied. 105 If a transaction is initiated by a PKI entity (RA or CA) then an 106 end entity must either supply a listener process or be supplied 107 with a polling reference (see below) in order to allow it to pick 108 up the PKI message from the PKI management component. 110 2.1 General Form 112 A TCP-message consists of: 114 length (32-bits) 115 version (8-bits) 116 flags (variable length) 117 message-type (8-bits), 118 value (defined below) 120 The length field contains the number of octets of the remainder of 121 the TCP-message (i.e., number of octets of plus 122 plus 2). All bit values in this protocol are specified to be in 123 network byte order. 125 The version field indicates the version of the TCP-message. It MUST 126 be incremented for each specification which changes the flags field 127 in a way that is not fully backwards compatible with the previous 128 version (e.g. when the length of the flags field is changed). 130 The flags field is for transporting TCP-message specific data. The 131 length of this field is version dependent and is fixed for a given 132 version. 134 The message-type field is used to indicate the type of TCP-message. 136 The value field contains message-type dependent data. 138 2.2 Version Negotiation 140 If a client knows the protocol version(s) supported by the 141 server (e.g. from a previous TCP-message exchange or via some 142 out-of-band means) then it SHOULD send a TCP-message with the highest 143 version supported both by it and the server. If a client does 144 not know what version(s) the server supports then it SHOULD send 145 a TCP-message using the highest version it supports. 147 If a server receives a TCP-message version that it supports, then it 148 MUST reply with a TCP-message of the same version. If the version 149 received is higher than what the server supports, it MUST send 150 back a VersionNotSupported errorMsgRep (defined below) containing 151 the highest version it supports. 153 2.3 TCP-message Version 10 155 The TCP-message version will be 10 for this document. The number 156 has deliberately been chosen to prevent [RFC2510] compliant 157 applications from treating it as a valid message type. Applications 158 receiving a version less than 10 SHOULD interpret the message as 159 being an [RFC2510] style message. 161 The length of the flags field for this version is 1 octet. The LSB 162 is used to indicate a connection close; all other bits in the flags 163 octet MUST be ignored by receivers, and MUST be set to zero by 164 senders. 166 By default connections are kept open after the receipt of a 167 response. Either party (client or server) MAY set the connection 168 close bit at any time. If the connection close bit is set on a 169 request, then the server MUST set the bit in the response and 170 close the connection after sending the response. If the bit is set 171 on a response from the server, the client MUST NOT send any further 172 requests on that connection. Applications MAY decide to close an 173 idle connection (one on which no response is outstanding) after 174 some time-out. Because of the problem where a client sends a 175 request and the server closes the connection while the request is 176 still in flight, clients SHOULD automatically retry a request for 177 which no part of the response could be read due to a connection 178 close or reset. 180 If the connection is kept open, it MUST only be used for subsequent 181 request/response transactions started by the client - the server 182 MUST NOT use it to send requests to the client. Different 183 transactions may be freely interwoven on the same connection. E.g. 184 a CR/CP need not immediately be followed by the Confirm, but may be 185 followed by any other request from a different transaction. 187 2.4 Detecting and Interoperating with RFC-2510 Conformant Implementations 189 Servers wishing to interoperate with clients conforming to 190 [RFC2510] can do so by treating any received message with a version 191 less than 10 as an [RFC2510] message and responding in that format. 192 Servers not wishing to support [RFC2510] messages MUST respond with 193 a [RFC2510] errorMsgRep. 195 Clients wishing to interoperate with [RFC2510] compliant servers 196 SHOULD treat a response with a version less than 10 as an [RFC2510] 197 style message. If this message is an errorMsgRep (message-type 06) 198 then the client MAY automatically retry the request using the 199 [RFC2510] format; if the message is not an errorMsgRep or the 200 implementation does not wish to support [RFC2510] then it MUST 201 abort the corresponding CMP transaction. 203 2.5 Message Types 205 message-types 0-127 are reserved and will be issued under IANA 206 auspices. message-types 128-255 are reserved for application use. 208 The message-type's currently defined are: 210 Message name Message-type 212 pkiReq '00'H 214 pollRep '01'H 216 pollReq '02'H 218 finRep '03'H 220 pkiRep '05'H 222 errorMsgRep '06'H 224 If server receives an unknown message-type then it MUST reply with 225 an InvalidMessageType errorMsgRep. If a client receives an unknown 226 message-type then it MUST abort the CMP transaction. 228 The different TCP-messages are discussed in the following sections: 230 2.5.1 pkiReq 232 The pkiReq is to be used to carry a PKIMessage from the client to the 233 server. The portion of this TCP-message will contain: 235 DER-encoded PKIMessage. 237 The type of PKIMessages that can be carried by this TCP-message are: 239 CRL Announcement 240 Certificate Confirmation 241 Poll Request 242 Subscription Request 243 CA Key Update Announcement 244 Certificate Announcement 245 Certification Request 246 Cross-Certification Request 247 Error Message 248 General Message 249 Initialization Request 250 Key Recovery Request 251 Key Update Request 252 Nested Message 253 PKCS-10 Request 254 POP Response 255 Revocation Request 257 2.5.2 pkiRep 259 This TCP-message is to be used to send back the response to the request. 260 The portion of the pkiRep will contain: 262 DER encoded PKI message 264 The type of PKIMessages that can be carried by this TCP-message are: 266 Confirmation 267 Poll Response 268 Subscription Response 269 Certification Response 270 Error Message 271 General Response 272 Initialization Response 273 Key Recovery Response 274 Key Update Response 275 POP Challenge 276 Revocation Response 278 2.5.3 pollReq 280 The pollReq will be the used by the client to check the status of a 281 pending TCP-message. The portion of the pollReq will 282 contain: 284 polling-reference (32 bits) 286 The MUST be the one returned via the pollRep 287 TCP-message. 289 2.5.4 pollRep 291 The pollRep will be the response sent by the server to the client 292 when there are no TCP-message response ready. The portion of 293 the pollRep will contain: 295 polling-reference (32 bits) 296 time-to-check-back (32 bits) 298 The is a unique 32-bit number sent by the server. 299 The is the time in seconds indicating the minimum 300 interval after which the client SHOULD check the status again. 302 The duration for which the server keeps the 303 unique is left to the implementation. 305 2.5.5 finRep 307 finRep is sent by the server whenever no other response applies 308 (such as after receiving a CMP certConf), and usually indicates 309 the end of the CMP transaction. The portion of the finRep 310 will contain: 312 '00'H (8 bits) 314 2.5.6 errorMsgRep 316 This TCP-message is sent when a TCP-message level protocol error is 317 detected. Please note that PKIError messages MUST NOT be sent 318 using this. Examples of TCP-message level errors are: 320 1. Invalid protocol version 321 2. Invalid TCP message-type 322 3. Invalid polling reference number 324 The field of the TCP-message SHALL contain: 326 error-type (16-bits) 327 data-length (16-bits) 328 data ( octets) 329 UTF8 String (SHOULD include a RFC 1766 language tag) 331 The is of the form MMNN where M and N are hex digits 332 (0-F) and MM represents the major category and NN the minor. The 333 major categories defined by this specification are: 335 '01'H TCP-message version negotiation 336 '02'H client errors 337 '03'H server errors 339 The major categories '80'H-'FF'H are reserved for application use. 341 The and are additional information about the 342 error to be used by programs for further processing and recovery. 343 contains the length of the field in number of 344 octets. Error messages not needing additional information to be 345 conveyed MUST set the to 0. 347 The UTF8 text string is for user readable error messages. 349 2.5.6.1 VersionNotSupported errorMsgRep 351 The VersionNotSupported errorMsgRep is defined as follows: 353 error-type: '0101'H 354 data-length: 1 355 data: 356 UTF8-text String: implementation defined 358 where is the highest version the server supports. 360 2.5.6.2 GeneralClientError errorMsgRep 362 The GeneralClientError errorMsgRep is defined as follows: 364 error-type: '0200'H 365 data-length: 0 366 data: 367 UTF8-text String: implementation defined 369 2.5.6.3 InvalidMessageType errorMsgRep 371 The InvalidMessageType errorMsgRep is defined as follows: 373 error-type: '0201'H 374 data-length: 1 375 data: 376 UTF8-text String: implementation defined 378 where is the message-type received by the 379 server. 381 2.5.6.4 InvalidPollID errorMsgRep 383 The InvalidPollID errorMsgRep is defined as follows: 385 error-type: '0202'H 386 data-length: 4 387 data: 388 UTF8-text String: implementation defined 390 where is the polling-reference received by 391 the server. 393 2.5.6.5 GeneralServerError errorMsgRep 395 The GeneralServerError errorMsgRep is defined as follows: 397 error-type: '0300'H 398 data-length: 0 399 data: 400 UTF8-text String: implementation defined 402 3. HTTP-Based Management Protocol 404 A client creates a TCP-message, as specified in section 2.0. The 405 message is then sent as the entity-body of an HTTP POST request. If 406 the HTTP request is successful then the server returns a similar 407 message in the body of the response. The response status code in 408 this case MUST be 200; other 2xx codes MUST NOT be used. The content 409 type of the request and response MUST be "application/pkixcmp-poll". 410 Applications MAY wish to also recognized and use the 411 "application/x-pkixcmp-poll" MIME type (specified in earlier 412 versions of this document) in order to support backward 413 compatibility wherever applicable. Content codings may be applied. 415 Note that a server may return any 1xx, 3xx, 4xx, or 5xx code if the 416 HTTP request needs further handling or is otherwise not acceptable. 418 Because in general CMP messages are not cacheable, requests and 419 responses should include a "Cache-Control: no-cache" (and, if either 420 side uses HTTP/1.0, a "Pragma: no-cache") to prevent the client from 421 getting cached responses. This is especially important for polling 422 requests and responses. 424 Connection management SHOULD be based on the HTTP provided mechanisms 425 (Connection and Proxy-Connection header fields) and not on the 426 connection flag carried in the TCP-message. 428 4. File based protocol 430 A file containing a PKI message MUST contain only the DER encoding of 431 one PKI message, i.e., there MUST be no extraneous header or trailer 432 information in the file. 434 Such files can be used to transport PKI messages using, e.g., FTP. 436 5. Mail based protocol 438 This subsection specifies a means for conveying ASN.1-encoded 439 messages for the protocol exchanges via Internet mail. 441 A simple MIME object is specified as follows. 443 Content-Type: application/pkixcmp 444 Content-Transfer-Encoding: base64 446 <> 448 This MIME object can be sent and received using common MIME 449 processing engines and provides a simple Internet mail transport for 450 PKIX-CMP messages. Implementations MAY wish to also recognize and 451 use the "application/x-pkixcmp" MIME type (specified in earlier 452 versions of this document) in order to support backward compatibility 453 wherever applicable. 455 6. Security Considerations 457 Three aspects need to be considered by server side implementors: 459 1. There is no security at the TCP and HTTP protocol level (unless 460 tunneled via SSL/TLS) and thus TCP-message should not be used 461 to change state of the transaction. Change of state should be 462 done on the signed PKIMessage being carried within the 463 TCP-message. 465 2. If the server is going to be sending messages with sensitive 466 information (not meant for public consumption) in the clear, it 467 is RECOMMENDED that the server send back the message directly 468 and not use the pollRep. 470 3. The polling request/response mechanism can be used for all kinds 471 of denial of service attacks. It is RECOMMENDED that the server 472 not change the polling-reference between polling requests. 474 7. Acknowledgments 476 The authors gratefully acknowledge the contributions of various 477 members of the IETF PKIX Working Group and the ICSA CA-talk mailing 478 list (a list solely devoted to discussing CMP interoperability 479 efforts). 481 8. References 483 [RFC2510] Adams, C., Farrell, S., "Internet X.509 Public Key 484 Infrastructure, Certificate Management Protocols", RFC 2510, 485 March 1999. 487 [CMP] Adams, C., Farrell, S., "Internet X.509 Public Key 488 Infrastructure, Certificate Management Protocols", 489 draft-ietf-pkix-rfc2510bis-01.txt, July 2000 491 [HTTP] Fielding, R.T., et. al, "Hypertext Transfer Protocol -- 492 HTTP/1.1", RFC 2616, June 1999. 494 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 495 Requirement Levels", RFC 2119, March 1997. 497 [RFC821] Postel, J., "Simple Mail Transfer Protocol", RFC 821, 498 August 1982. 500 Authors' Addresses 502 Amit Kapoor 503 Certicom 504 25801 Industrial Blvd 505 Hayward, CA 94545 506 US 508 E-Mail: amit@trustpoint.com 510 Ronald Tschal�r 511 Certicom 512 25801 Industrial Blvd 513 Hayward, CA 94545 514 US 516 E-Mail: ronald@trustpoint.com 518 Appendix A: Registration of MIME Type for Section 3 520 To: ietf-types@iana.org 521 Subject: Registration of MIME media type application/pkixcmp-poll 523 MIME media type name: application 525 MIME subtype name: pkixcmp-poll 527 Required parameters: none 529 Optional parameters: none 531 Encoding considerations: 532 Content may contain arbitrary octet values (the ASN.1 DER encoding of 533 a PKI message, as defined in the IETF PKIX Working Group 534 specifications). base64 encoding is required for MIME e-mail; no 535 encoding is necessary for HTTP. 537 Security considerations: 538 This MIME type may be used to transport Public-Key Infrastructure 539 (PKI) messages between PKI entities. These messages are defined by 540 the IETF PKIX Working Group and are used to establish and maintain an 541 Internet X.509 PKI. There is no requirement for specific security 542 mechanisms to be applied at this level if the PKI messages themselves 543 are protected as defined in the PKIX specifications. 545 Interoperability considerations: - 547 Published specification: this document 549 Applications which use this media type: 550 Applications using certificate management, operational, or ancillary 551 protocols (as defined by the IETF PKIX Working Group) to send PKI 552 messages via e-mail or HTTP. 554 Additional information: 556 Magic number (s): - 557 File extension (s): ".cmp" 558 Macintosh File Type Code (s): - 560 Person and email address to contact for further information: 561 Carlisle Adams, cadams@entrust.com 563 Intended usage: COMMON 565 Author/Change controller: Carlisle Adams 567 Full Copyright Statement 569 Copyright (C) The Internet Society (2000). All Rights Reserved. 571 This document and translations of it may be copied and furnished to 572 others, and derivative works that comment on or otherwise explain 573 it or assist in its implementation may be prepared, copied, 574 published and distributed, in whole or in part, without restriction 575 of any kind, provided that the above copyright notice and this 576 paragraph are included on all such copies and derivative works. 577 However, this document itself may not be modified in any way, such 578 as by removing the copyright notice or references to the Internet 579 Society or other Internet organizations, except as needed for the 580 purpose of developing Internet standards in which case the 581 procedures for copyrights defined in the Internet Standards process 582 must be followed, or as required to translate it into languages 583 other than English. 585 The limited permissions granted above are perpetual and will not be 586 revoked by the Internet Society or its successors or assigns. 588 This document and the information contained herein is provided on 589 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET 590 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR 591 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 592 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 593 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.