<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
     submissionType="IETF" 
	 docName="draft-ietf-lamps-rfc6712bis-01" 
	 category="std" 
	 obsoletes="6712"
	 ipr="trust200902" 
	 updates="" 
	 xml:lang="en" 
	 symRefs="true" 
	 sortRefs="false" 
	 tocInclude="true" 
     consensus="true" 
	 version="3" 
	 tocDepth="4">
  <!-- xml2rfc v2v3 conversion 3.12.3 -->
  <!-- Generated by id2xml 1.5.0 on 2022-03-24T13:29:41Z -->
	<front>
    <title abbrev="RFC6712bis">Internet X.509 Public Key Infrastructure -- HTTP Transfer for the Certificate Management Protocol (CMP)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-lamps-rfc6712bis-01"/>

   <author fullname="Hendrik Brockhaus" initials="H." surname="Brockhaus">
      <organization abbrev="Siemens">Siemens</organization>
      <address>
        <postal>
          <street>Werner-von-Siemens-Strasse 1</street>
          <code>80333</code>
          <city>Munich</city>
          <country>Germany</country>
        </postal>
        <email>hendrik.brockhaus@siemens.com</email>
        <uri>https://www.siemens.com</uri>
      </address>
    </author>
   <author fullname="David von Oheimb" initials="D." surname="von Oheimb">
      <organization abbrev="Siemens">Siemens</organization>
      <address>
        <postal>
          <street>Werner-von-Siemens-Strasse 1</street>
          <code>80333</code>
          <city>Munich</city>
          <country>Germany</country>
        </postal>
        <email>david.von.oheimb@siemens.com</email>
        <uri>https://www.siemens.com</uri>
      </address>
    </author>
	<author fullname="Mike Ounsworth" initials="M." surname="Ounsworth">
		<organization abbrev="Entrust">Entrust</organization>
		<address>
			<postal>
				<street>1187 Park Place</street>
				<region>MN</region>
				<code>55379</code>
				<city>Minneapolis</city>
				<country>United States of America</country>
			</postal>
			<email>mike.ounsworth@entrust.com</email>
			<uri>https://www.entrust.com</uri>
		</address>
	</author>
	<author fullname="John Gray" initials="J." surname="Gray">
		<organization abbrev="Entrust">Entrust</organization>
		<address>
			<postal>
				<street>1187 Park Place</street>
				<region>MN</region>
				<code>55379</code>
				<city>Minneapolis</city>
				<country>United States of America</country>
			</postal>
			<email>john.gray@entrust.com</email>
			<uri>https://www.entrust.com</uri>
		</address>
	</author>
    <date year="2022"/>
    <workgroup>LAMPS Working Group</workgroup>
    <abstract>
      <t>This document describes how to layer the Certificate Management Protocol (CMP) over HTTP.</t>
      <t>It includes the updates on RFC 6712 specified in CMP Updates [RFCAAAA] Section 3 and obsoleted both documents.  These updates introduce CMP URIs using a Well-known prefix.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>[RFC Editor: please delete:</t>
	  <t>During IESG telechat the CMP Updates document was approved on condition that LAMPS provides a RFC6712bis document.  Version -00 of this document shall be identical to RFC 6712 and version -01 incorporates the changes specified in CMP Updates Section 3.</t>
	  <t>A history of changes is available in Appendix A of this document.</t>
	  <t>The authors of this document wish to thank Tomi Kause and Martin Peylo, the original authors of RFC 6712, for their work and invite them, next to further volunteers, to join the -bis activity as co-authors.</t>
	  <t>]</t>
	  <t>[RFC Editor:</t>
	  <t>Please perform the following substitution.</t>
        <ul spacing="normal">
          <li>RFCXXXX --> the assigned numerical RFC value for this draft</li>
          <li>
			<t>RFCAAAA --> the assigned numerical RFC value for <xref target="I-D.ietf-lamps-cmp-updates" format="default"/></t>
			<t>Add this RFC number to the list of obsoleted RFCs.</t>
		  </li>
          <li>RFCBBBB --> the assigned numerical RFC value for <xref target="I-D.ietf-lamps-lightweight-cmp-profile" format="default"/></li>
          <li>RFCCCCC --> the assigned numerical RFC value for <xref target="RFC4210bis" format="default"/></li>
		  </ul>
	  <t>]</t>
      <t>
   The Certificate Management Protocol (CMP) [RFCCCCC] requires a well-
   defined transfer mechanism to enable End Entities (EEs), Registration
   Authorities (RAs), and Certification Authorities (CAs) to pass
   PKIMessage sequences between them.</t>
      <t>
   The first version of the CMP specification <xref target="RFC2510" format="default"/> included a brief
   description of a simple transfer protocol layer on top of TCP.  Its
   features were simple transfer-level error handling and a mechanism to
   poll for outstanding PKI messages.  Additionally, it was mentioned
   that PKI messages could also be conveyed using file-, E-mail-, and
   HTTP-based transfer, but those were not specified in detail.</t>
      <t>
   The second version of the CMP specification <xref target="RFC4210" format="default"/> incorporated
   its own polling mechanism and thus the need for a transfer protocol
   providing this functionality vanished.  The remaining features CMP
   requires from its transfer protocols are connection and error
   handling.</t>
	  <t>In addition to reliable transport, CMP requires connection and error handling from the transfer protocol, which is all covered by HTTP.  Additionally, delayed delivery of CMP response messages may be handled at transfer level regardless of the message contents.  Since [RFCAAAA] extends the polling mechanism specified in the second version of <xref target="RFC4210" format="default">CMP</xref> to cover all types of PKI management transactions, delays detected at application level may also be handled within CMP, using pollReq and pollRep messages.</t>
      <t>
   The usage of HTTP for transferring CMP messages exclusively uses the
   POST method for requests, effectively tunneling CMP over HTTP.  While
   this is generally considered bad practice and should not be emulated,
   there are good reasons to do so for transferring CMP.  HTTP is used
   as it is generally easy to implement and it is able to traverse
   network borders utilizing ubiquitous proxies.  Most importantly, HTTP
   is already commonly used in existing CMP implementations.  Other HTTP
   request methods, such as GET, are not used because PKI management
   operations can only be triggered using CMP's PKI messages, which need
   to be transferred using a POST request.</t>
      <t>
   With its status codes, HTTP provides needed error reporting
   capabilities.  General problems on the server side, as well as those
   directly caused by the respective request, can be reported to the
   client.</t>
      <t>
   As CMP implements a transaction ID, identifying transactions spanning
   over more than just a single request/response pair, the statelessness
   of HTTP is not blocking its usage as the transfer protocol for CMP
   messages.</t>
      <section anchor="sect-1.1" numbered="true" toc="default">
        <name>Changes Since RFC 6712</name>
        <t>CMP Updates [RFCAAAA] updated <xref target="RFC6712" format="default">RFC&nbsp;6712</xref>, supporting the PKI management operations specified in the Lightweight CMP Profile [RFCBBBB], in the following areas:</t>
        <ul spacing="normal">
		  <li>Introduce the HTTP URI path prefix '/.well-known/cmp'.</li>
          <li>Add options for extending the URI structure with further segments and to this end define a new protocol registry group.</li>
        </ul>
      </section>
      <section anchor="sect-1.2" numbered="true" toc="default">
        <name>Changes Made by This Document</name>
        <t>This document obsoletes <xref target="RFC6712" format="default">RFC&nbsp;6712</xref>. It includes the changes specified by CMP Updates [RFCAAAA] Section 3 as described in <xref target="sect-1.1" format="default"/>.</t>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>HTTP-Based Protocol</name>
      <t>
   For direct interaction between two entities, where a reliable
   transport protocol like TCP is available, HTTP SHOULD be utilized for
   conveying CMP messages.</t>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>HTTP Versions</name>
        <t>
   Implementations MUST support HTTP/1.0 <xref target="RFC1945" format="default"/> and SHOULD support
   HTTP/1.1 <xref target="RFC2616" format="default"/>.</t>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>Persistent Connections</name>
        <t>
   HTTP persistent connections <xref target="RFC2616" format="default"/> allow multiple interactions to
   take place on the same HTTP connection.  However, neither HTTP nor
   the protocol specified in this document are designed to correlate
   messages on the same connection in any meaningful way; persistent
   connections are only a performance optimization.  In particular,
   intermediaries can do things like mix connections from different
   clients into one "upstream" connection, terminate persistent
   connections, and forward requests as non-persistent requests, etc.
   As such, implementations MUST NOT infer that requests on the same
   connection come from the same client (e.g., for correlating PKI
   messages with ongoing transactions); every message is to be evaluated
   in isolation.</t>
      </section>
      <section anchor="sect-3.3" numbered="true" toc="default">
        <name>General Form</name>
        <t>
   A DER-encoded <xref target="ITU.X690.1994" format="default"/> PKIMessage [RFCCCCC] is sent as the
   entity-body of an HTTP POST request.  If this HTTP request is
   successful, the server returns the CMP response in the body of the
   HTTP response.  The HTTP response status code in this case MUST be
   200; other "Successful 2xx" codes MUST NOT be used for this purpose.
   HTTP responses to pushed CMP Announcement messages (i.e., CA
   Certificate Announcement, Certificate Announcement, Revocation
   Announcement, and Certificate Revocation List (CRL) Announcement)
   utilize the status codes 201 and 202 to identify whether the received
   information was processed.</t>
        <t>
   While "Redirection 3xx" status codes MAY be supported by
   implementations, clients should only be enabled to automatically
   follow them after careful consideration of possible security
   implications.  As described in <xref target="sect-5" format="default"/>, "301 Moved Permanently"
   could be misused for permanent denial of service.</t>
        <t>
   All applicable "Client Error 4xx" or "Server Error 5xx" status codes
   MAY be used to inform the client about errors.</t>
      </section>
      <section anchor="sect-3.4" numbered="true" toc="default">
        <name>Media Type</name>
        <t>
   The Internet Media Type "application/pkixcmp" MUST be set in the HTTP
   Content-Type header field when conveying a PKIMessage.</t>
      </section>
      <section anchor="sect-3.5" numbered="true" toc="default">
        <name>Communication Workflow</name>
        <t>
   In CMP, most communication is initiated by the EEs where every CMP
   request triggers a CMP response message from the CA or RA.</t>
        <t>
   The CMP Announcement messages described in <xref target="sect-3.7" format="default"/> are an
   exception.  Their creation may be triggered by certain events or done
   on a regular basis by a CA.  The recipient of the Announcement only
   replies with an HTTP status code acknowledging the receipt or
   indicating an error, but not with a CMP response.</t>
        <t>
   If the receipt of an HTTP request is not confirmed by receiving an
   HTTP response, it MUST be assumed that the transferred CMP message
   was not successfully delivered to its destination.</t>
      </section>
      <section anchor="sect-3.6" numbered="true" toc="default">
        <name>HTTP Request-URI</name>
        <t>Each CMP server on a PKI management entity supporting HTTP or HTTPS transfer MUST support the use of the path prefix '/.well-known/' as defined in <xref target="RFC8615" format="default">RFC&nbsp;8615</xref> and the registered name 'cmp' to ease interworking in a multi-vendor environment.</t>
        <t keepWithNext="true">The CMP client needs to be configured with sufficient information to form the CMP server URI.  This is at least the authority portion of the URI, e.g., 'www.example.com:80', or the full operation path segment of the PKI management entity. Additionally, OPTIONAL path segments MAY be added after the registered application name as part of the full operation path to provide further distinction.  The path segment 'p' followed by an arbitraryLabel &lt;name&gt; could for example support the differentiation of specific CAs or certificate profiles. Further path segments, e.g., as specified in the Lightweight CMP Profile [RFCBBBB], could indicate PKI management operations using an operationLabel &lt;operation&gt;.  A valid full CMP URI can look like this:</t>
        <ul empty="true" spacing="compact">
		  <li>http://www.example.com/.well-known/cmp</li>
          <li>http://www.example.com/.well-known/cmp/&lt;operation&gt;</li>
          <li>http://www.example.com/.well-known/cmp/p/&lt;name&gt;</li>
          <li>http://www.example.com/.well-known/cmp/p/&lt;name&gt;/&lt;operation&gt;</li>
        </ul>
       </section>
      <section anchor="sect-3.7" numbered="true" toc="default">
        <name>Pushing of Announcements</name>
        <t>
   A CMP server may create event-triggered announcements or generate
   them on a regular basis.  It MAY utilize HTTP transfer to convey them
   to a suitable recipient.  In this use case, the CMP server acts as an
   HTTP client, and the recipient needs to utilize an HTTP server.  As
   no request messages are specified for those announcements, they can
   only be pushed to the recipient.</t>
        <t>
   If an EE wants to poll for a potential CA Key Update Announcement or
   the current CRL, a PKI Information Request using a General Message as
   described in Appendix E.5 of [RFCCCCC] can be used.</t>
        <t>
   When pushing Announcement messages, PKIMessage structures are sent as
   the entity-body of an HTTP POST request.</t>
        <t>
   Suitable recipients for CMP announcements might, for example, be
   repositories storing the announced information, such as directory
   services.  Those services listen for incoming messages, utilizing the
   same HTTP Request-URI scheme as defined in <xref target="sect-3.6" format="default"/>.</t>
        <t>
   The following PKIMessages are announcements that may be pushed by a
   CA.  The prefixed numbers reflect ASN.1 numbering of the respective
   element.</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   [15] CA Key Update Announcement
   [16] Certificate Announcement
   [17] Revocation Announcement
   [18] CRL Announcement
]]></artwork>
        <t>
   CMP Announcement messages do not require any CMP response.  However,
   the recipient MUST acknowledge receipt with an HTTP response having
   an appropriate status code and an empty body.  When not receiving
   such a response, it MUST be assumed that the delivery was not
   successful.  If applicable, the sending side MAY try sending the
   Announcement again after waiting for an appropriate time span.</t>
        <t>
   If the announced issue was successfully stored in a database or was
   already present, the answer MUST be an HTTP response with a "201 Created" status code and an empty message body.</t>
        <t>
   In case the announced information was only accepted for further
   processing, the status code of the returned HTTP response MAY also be
   "202 Accepted".  After an appropriate delay, the sender may then try
   to send the Announcement again and may repeat this until it receives
   a confirmation that it has been successfully processed.  The
   appropriate duration of the delay and the option to increase it
   between consecutive attempts should be carefully considered.</t>
        <t>
   A receiver MUST answer with a suitable 4xx or 5xx HTTP error code
   when a problem occurs.</t>
      </section>
      <section anchor="sect-3.8" numbered="true" toc="default">
        <name>HTTP Considerations</name>
        <t>
   While all defined features of the HTTP protocol are available to
   implementations, they SHOULD keep the protocol utilization as simple
   as possible.  For example, there is no benefit in using chunked
   Transfer-Encoding, as the length of an ASN.1 sequence is known when
   starting to send it.</t>
        <t>
   There is no need for the clients to send an "Expect" request-header
   field with the "100-continue" expectation and wait for a "100 Continue" status as described in Section 8.2.3 of <xref target="RFC2616" format="default"/>.  The CMP
   payload sent by a client is relatively small, so having extra
   messages exchanged is inefficient, as the server will only seldom
   reject a message without evaluating the body.</t>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Implementation Considerations</name>
      <t>
   Implementors should be aware that implementations might exist that
   use a different approach for transferring CMP over HTTP, because <xref target="RFC6712" format="default">RFC&nbsp;6712</xref> has been under development for more than a decade.  Further,
   implementations based on earlier drafts of <xref target="RFC6712" format="default">RFC&nbsp;6712</xref> might use an
   unregistered "application/pkixcmp-poll" MIME type.</t>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The following aspects need to be considered by implementers and
   users:</t>
      <ol spacing="normal" type="1"><li>There is the risk for denial-of-service attacks through resource
       consumption by opening many connections to an HTTP server.
       Therefore, idle connections should be terminated after an
       appropriate timeout; this may also depend on the available free
       resources.  After sending a CMP Error Message, the server should
       close the connection, even if the CMP transaction is not yet
       fully completed.</li>
        <li>Without being encapsulated in effective security protocols, such
       as Transport Layer Security (TLS) <xref target="RFC5246" format="default"/>, there is no
       integrity protection at the HTTP protocol level.  Therefore,
       information from the HTTP protocol should not be used to change
       state of the transaction.</li>
        <li>Client users should be aware that storing the target location of
       an HTTP response with the "301 Moved Permanently" status code
       could be exploited by a man-in-the-middle attacker trying to
       block them permanently from contacting the correct server.</li>
        <li>If no measures to authenticate and protect the HTTP responses to
       pushed Announcement messages are in place, their information
       regarding the Announcement's processing state may not be trusted.
       In that case, the overall design of the PKI system must not
       depend on the Announcements being reliably received and processed
       by their destination.</li>
        <li>CMP provides inbuilt integrity protection and authentication.
       The information communicated unencrypted in CMP messages does not
       contain sensitive information endangering the security of the PKI
       when intercepted.  However, it might be possible for an
       eavesdropper to utilize the available information to gather
       confidential technical or business critical information.
       Therefore, users of the HTTP transfer for CMP might want to
       consider using HTTP over TLS according to <xref target="RFC2818" format="default"/> or virtual
       private networks created, for example, by utilizing Internet
       Protocol Security according to <xref target="RFC4301" format="default"/>.  Compliant
       implementations MUST support TLS with the option to authenticate
       both server and client.</li>
      </ol>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>IANA Considerations</name>
		<t>The IANA has already registered what is specified in CMP Updates [RFCAAAA].</t>
		<t>No further action by the IANA is necessary for this document or any anticipated updates.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>The authors of this document wish to thank Tomi Kause and Martin Peylo, the original authors of <xref target="RFC6712" format="default"/>, for their work.</t>
      <t>We also thank all reviewers of this document for their valuable feedback.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1945.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2616.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8615.xml"/>
		<reference anchor="RFC4210bis">
		  <front>
			<title>Internet X.509 Public Key Infrastructure -- Certificate Management Protocol (CMP)</title>
			<author>
				<organization showOnFrontPage="true">IETF</organization>
				</author>
			<date year="2022" month="June"/>
			</front>
		  </reference>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml2/reference.ITU.X690.1994.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-lamps-cmp-updates.xml"/>
	    <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-lamps-lightweight-cmp-profile.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2510.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2818.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4210.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4301.xml"/>
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5246.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6712.xml"/>
      </references>
    </references>
    <section anchor="History" numbered="true" toc="default">
      <name>History of Changes</name>
      <t>Note: This appendix will be deleted in the final version of the document.</t>
      <t keepWithNext="true">From version 00 -&gt; 01:</t>
      <ul spacing="compact">
        <li>Performed all updates specified in CMP Updates Section 3.</li>
      </ul>
	  <t keepWithNext="true">Version 00:</t>
	  <t>This version consists of the text of RFC6712 with the following changes:</t>
	  <ul spacing="compact">
		<li>Introduced the authors of this document and thanked the authors of RFC6712 for their work.</li>
		<li>Added a paragraph to the introduction explaining the background of this document.</li>
		<li>Added the change history to this appendix.</li>
	  </ul>
    </section>
  </back>
</rfc>
