<?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" ipr="trust200902" docName="draft-ietf-lamps-rfc6712bis-10" number="9811" category="std" consensus="true" submissionType="IETF" xml:lang="en" updates="" obsoletes="6712, 9480" tocDepth="4" tocInclude="true" sortRefs="true" symRefs="true" version="3">

  <front>
    <title abbrev="HTTP Transfer for CMP">Internet X.509 Public Key Infrastructure -- HTTP Transfer for the Certificate Management Protocol (CMP)</title>
    <seriesInfo name="RFC" value="9811"/>
    <author initials="H." surname="Brockhaus" fullname="Hendrik Brockhaus">
      <organization abbrev="Siemens">Siemens</organization>
      <address>
        <postal>
          <street>Werner-von-Siemens-Strasse 1</street>
          <city>Munich</city>
          <code>80333</code>
          <country>Germany</country>
        </postal>
        <email>hendrik.brockhaus@siemens.com</email>
        <uri>https://www.siemens.com</uri>
      </address>
    </author>
    <author initials="D." surname="von Oheimb" fullname="David von Oheimb">
      <organization abbrev="Siemens">Siemens</organization>
      <address>
        <postal>
          <street>Werner-von-Siemens-Strasse 1</street>
          <city>Munich</city>
          <code>80333</code>
          <country>Germany</country>
        </postal>
        <email>david.von.oheimb@siemens.com</email>
        <uri>https://www.siemens.com</uri>
      </address>
    </author>
    <author initials="M." surname="Ounsworth" fullname="Mike Ounsworth">
      <organization abbrev="Entrust">Entrust</organization>
      <address>
        <postal>
          <street>1187 Park Place</street>
          <city>Minneapolis</city>
          <region>MN</region>
          <code>55379</code>
          <country>United States of America</country>
        </postal>
        <email>mike.ounsworth@entrust.com</email>
        <uri>https://www.entrust.com</uri>
      </address>
    </author>
    <author initials="J." surname="Gray" fullname="John Gray">
      <organization abbrev="Entrust">Entrust</organization>
      <address>
        <postal>
          <street>1187 Park Place</street>
          <city>Minneapolis</city>
          <region>MN</region>
          <code>55379</code>
          <country>United States of America</country>
        </postal>
        <email>john.gray@entrust.com</email>
        <uri>https://www.entrust.com</uri>
      </address>
    </author>
    <date year="2025" month="July"/>
    <area>SEC</area>
    <workgroup>lamps</workgroup>

    <keyword>CMP</keyword>
    <keyword>HTTP</keyword>
    <keyword>Certificate management</keyword>
    <keyword>PKI</keyword>

    <abstract>
<t>This document describes how to layer the Certificate Management Protocol
(CMP) over HTTP.</t>
      <t>It includes the updates to RFC 6712 specified in Section 3 of RFC 9480; these
updates introduce CMP URIs using a well-known prefix. It obsoletes
RFC 6712; and, together with RFC 9810, it also obsoletes
RFC 9480.</t>
    </abstract>
  </front>
  <middle>
    <?line 99?>

<section anchor="sect-1">
      <name>Introduction</name>
      <t>The Certificate Management Protocol (CMP) <xref target="RFC9810"/> requires a well-defined
transfer mechanism to enable End Entities (EEs), Registration
Authorities (RAs), and Certification Authorities (CAs) to pass
PKIMessage structures between them.</t>
      <t>The first version of the CMP specification <xref target="RFC2510"/> 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-, email-, and
HTTP-based transfer, but those were not specified in detail.</t>
      <t>Since the second version of the CMP specification <xref target="RFC4210"/> incorporated
its own polling mechanism, 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>CMP can benefit from utilizing reliable transport, as it requires connection and error handling
from the transfer protocol. All these features are covered by HTTP.  Additionally,
delayed delivery of CMP response messages may be handled at transfer level,
regardless of the message contents.  Since <xref target="RFC9480"/> extends the polling
mechanism specified in the second version of <xref target="RFC4210">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 (e.g., HTTP/1.1 as specified in <xref target="RFC9110"/> and <xref target="RFC9112"/>) for transferring CMP messages exclusively uses the POST
method for requests, effectively tunneling CMP over HTTP. While this is
generally considered bad practice (see <xref target="BCP56">RFC 9205</xref> for best current
practice on building protocols with HTTP) 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 identification (transactionID), 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">
        <name>Changes Made by RFC 9480</name>
        <t><xref target="RFC9480">CMP Updates</xref> updated <xref section="3.6" sectionFormat="of" target="RFC6712"/>, supporting the PKI
management operations specified in the <xref target="RFC9483">Lightweight CMP Profile</xref>, in the following areas:</t>
        <ul spacing="normal">
          <li>
            <t>Introduced the HTTP URI path prefix '/.well-known/cmp'.</t>
          </li>
          <li>
            <t>Added options for extending the URI structure with further segments and
defined a new protocol registry group to that aim.</t>
          </li>
        </ul>
      </section>
      <section anchor="sect-1.2">
        <name>Changes Made by This Document</name>
        <t>This document obsoletes <xref target="RFC6712"/>.
It includes the changes specified in <xref section="3" sectionFormat="of" target="RFC9480"/>, as
described in <xref target="sect-1.1"/> of this document. Additionally, it adds the following changes:</t>
        <ul spacing="normal">
          <li>
            <t>Removed the requirement to support HTTP/1.0 <xref target="RFC1945"/> in accordance with Section <xref target="RFC9205" section="4.1" sectionFormat="bare"/> of RFC 9205 <xref target="BCP56"/>.</t>
          </li>
          <li>
            <t>Implementations <bcp14>MUST</bcp14> forward CMP messages when an HTTP error status code occurs; see  <xref target="sect-3.1"/>.</t>
          </li>
          <li>
            <t>Removed <xref section="3.8" sectionFormat="of" target="RFC6712"/> as it contains information redundant with current HTTP specification.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="sect-2">
      <name>Conventions Used in This Document</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section anchor="sect-3">
      <name>HTTP-Based Protocol</name>
      <t>For direct interaction between two entities, where a reliable
transport protocol like TCP <xref target="RFC9293"/> is available, HTTP <xref target="RFC9110"/> <bcp14>SHOULD</bcp14> be
utilized for conveying CMP messages. This specification requires
using the POST method (<xref target="sect-3.1"/>) and the "Content-Type" header
field (<xref target="sect-3.2"/>), which are available since HTTP/1.0 <xref target="RFC1945"/>.</t>
      <t>Note: In some situations, CMP requires multiple request/response
pairs to perform a PKI management operation. Their affiliation
with a PKI management operation is indicated by a
transaction identifier in the CMP message header (see transactionID
described in <xref target="RFC9810" sectionFormat="of" section="5.1.1"/>).
For details on how to transfer multiple requests, see Section
<xref target="RFC9205" sectionFormat="bare" section="4.11"/> of RFC 9205 <xref target="BCP56"/>.</t>
      <section anchor="sect-3.1">
        <name>General Form</name>
        <t>A DER-encoded <xref target="ITU.X690.2021"/> PKIMessage (<xref section="5.1" sectionFormat="of" target="RFC9810"/>) <bcp14>MUST</bcp14> be sent as the
content of an HTTP POST request.  If this HTTP request is
successful, the server returns the CMP response in the content of the
HTTP response.  The HTTP response status code in this case <bcp14>MUST</bcp14> be
200 (OK); other Successful 2xx status codes <bcp14>MUST NOT</bcp14> be used for this purpose.
HTTP responses to pushed CMP announcement messages described in <xref target="sect-3.5"/>
utilize the status codes 201 and 202 to identify whether the received
information was processed.</t>
        <t>While Redirection 3xx status codes <bcp14>MAY</bcp14> 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"/>, the 301 (Moved Permanently) status code
could be misused for permanent denial of service.</t>
        <t>All applicable Client Error 4xx or Server Error 5xx status codes
<bcp14>MAY</bcp14> be used to inform the client about errors. Whenever
a client receives an HTTP response with a status code in the 2xx,
4xx, or 5xx ranges, it <bcp14>MUST</bcp14> support handling response message
content containing a CMP response PKIMessage.</t>
      </section>
      <section anchor="sect-3.2">
        <name>Media Type</name>
        <t>The Internet media type "application/pkixcmp" <bcp14>MUST</bcp14> be set in the HTTP
"Content-Type" header field when conveying a PKIMessage.</t>
      </section>
      <section anchor="sect-3.3">
        <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.5"/> 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 <bcp14>MUST</bcp14> be assumed that the transferred CMP message
was not successfully delivered to its destination.</t>
      </section>
      <section anchor="sect-3.4">
        <name>HTTP Request-URI</name>
        <t>Each CMP server on a PKI management entity supporting HTTP or HTTPS transfer
<bcp14>MUST</bcp14> support the use of the path prefix '/.well-known/' as defined in
<xref target="RFC8615"/> and the registered name 'cmp' to ease interworking
in a multi-vendor environment.</t>
        <t>CMP clients have 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, path segments <bcp14>MAY</bcp14> 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 <xref target="RFC9483"/>,
could indicate PKI management operations using an operationLabel &lt;operation&gt;.
The following list shows examples of valid full CMP URIs:</t>
        <ul spacing="normal">
          <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>
        <t>Note that https can also be used instead of http; see <xref target="sect-5">item 5 in the Security Considerations</xref>.</t>
      </section>
      <section anchor="sect-3.5">
        <name>Pushing of Announcements</name>
        <t>A CMP server may create event-triggered announcements or generate
them on a regular basis.  It <bcp14>MAY</bcp14> 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 Certificate Revocation List (CRL), a PKI Information Request using a general message as
described in <xref section="D.5" sectionFormat="of" target="RFC9810"/> can be used.</t>
        <t>When pushing announcement messages, PKIMessage structures <bcp14>MUST</bcp14> be sent as
the content 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.4"/>.</t>
        <t>The following types of PKIMessage are announcements that may be pushed by a
CA.  The prefixed numbers reflect ASN.1 tags of the PKIBody structure (<xref section="5.1.2" sectionFormat="of" target="RFC9810"/>).</t>
        <artwork><![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 <bcp14>MUST</bcp14> acknowledge receipt with an HTTP response having
an appropriate status code and empty content.  When not receiving
such a response, it <bcp14>MUST</bcp14> be assumed that the delivery was not
successful.  If applicable, the sending side <bcp14>MAY</bcp14> 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 <bcp14>MUST</bcp14> be an HTTP response with a 201 (Created)
status code and empty content.</t>
        <t>In case the announced information was only accepted for further
processing, the status code of the returned HTTP response <bcp14>MAY</bcp14> 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 <bcp14>MUST</bcp14> answer with a suitable 4xx or 5xx error code
when a problem occurs.</t>
      </section>
    </section>
    <section anchor="sect-4">
      <name>Implementation Considerations</name>
      <t>Implementers should be aware that other implementations might exist that
use a different approach for transferring CMP over HTTP.
Further, implementations based on earlier documents that led to
<xref target="RFC6712"/> might use an unregistered "application/pkixcmp-poll" media type.
Conforming implementations <bcp14>MAY</bcp14> handle this type like "application/pkixcmp".</t>
    </section>
    <section anchor="sect-5">
      <name>Security Considerations</name>
      <t>All security considerations in HTTP <xref target="RFC9110"/> apply.
The following items need to be considered by implementers and users:</t>
      <ol spacing="normal" type="1"><li>
          <t>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.</t>
        </li>
        <li>
          <t>Without being encapsulated in effective security protocols, such
  as Transport Layer Security (TLS) <xref target="RFC5246"/> <xref target="RFC8446"/>, or
  without using HTTP digest <xref target="RFC9530"/>, there is no
  integrity protection at the HTTP level.  Therefore,
  information from the HTTP should not be used to change
  state of the transaction, regardless of whether any mechanism was
  used to ensure the authenticity or integrity of HTTP messages
  (e.g., TLS or HTTP digests).</t>
        </li>
        <li>
          <t>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 meddler-in-the-middle attacker trying to
  block them permanently from contacting the correct server.</t>
        </li>
        <li>
          <t>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.</t>
        </li>
        <li>
          <t>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 personal, technical, or business-critical information.
  The protection of the confidentiality of CMP messages together with
  an initial authentication of the RA/CA before the first CMP message
  is transmitted ensures the privacy of the EE requesting
  certificates. Therefore, users of the HTTP transfer for CMP messages
  should consider using HTTP over TLS according to <xref target="RFC9110"/> or using virtual
  private networks created, for example, by utilizing Internet
  Protocol Security according to <xref target="RFC7296"/>.</t>
        </li>
      </ol>
    </section>
    <section anchor="sect-6">
      <name>IANA Considerations</name>
      <t>IANA has made the following updates:</t>
<ul>
<li>the reference for "application/pkixcmp" in the "Media Types" registry <eref                                                     
target="https://www.iana.org/assignments/media-types" brackets="angle"/> refers to this document, instead of <xref target="RFC2510"/>.  </li>
      <li>the reference for "application/pkixcmp" in the "CoAP Content-Formats" registry <eref target="https://www.iana.org/assignments/core-parameters" brackets="angle"/> refers to this document, instead of <xref target="RFC4210"/>. </li>
      <li>the reference for "cmp" in the "Well-Known URIs" registry <eref target="https://www.iana.org/assignments/well-known-uris/" brackets="angle"/> 
refers to this document instead of <xref target="RFC4210"/>.</li>
      <li>the reference for "p" in the "CMP Well-Known URI Path Segments" registry <eref                                                      
target="https://www.iana.org/assignments/cmp" brackets="angle"/> refers to this document instead of <xref target="RFC9480"/>. </li>
</ul>

      <t>No further action by IANA is necessary for this document or any anticipated
updates.</t>
    </section>
  </middle>
  <back>

    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-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.8615.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9110.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9112.xml"/>

<reference anchor="RFC9810" target="https://www.rfc-editor.org/info/rfc9810">
  <front>
    <title>Internet X.509 Public Key Infrastructure -- Certificate Management Protocol (CMP)</title>
    <author fullname="Hendrik Brockhaus" initials="H." surname="Brockhaus">
      <organization>Siemens</organization>
    </author>
    <author fullname="David von Oheimb" initials="D." surname="von Oheimb">
      <organization>Siemens</organization>
    </author>
    <author fullname="Mike Ounsworth" initials="M." surname="Ounsworth">
      <organization>Entrust</organization>
    </author>
    <author fullname="John Gray" initials="J." surname="Gray">
      <organization>Entrust</organization>
    </author>
    <date month="July" year="2025"/>
  </front>
  <seriesInfo name="RFC" value="9810"/>
  <seriesInfo name="DOI" value="10.17487/RFC9810"/>
</reference>

        <reference anchor="ITU.X690.2021" target="https://www.itu.int/rec/T-REC-X.690-202102-I/en">
          <front>
            <title>Information Technology - ASN.1 encoding rules:
            Specification of Basic Encoding Rules (BER), Canonical Encoding
            Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2021"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.690"/>
        </reference>

        <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.8174.xml"/>

      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9480.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9483.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.4210.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"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7296.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9530.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml9/reference.BCP.56.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9293.xml"/>

      </references>
    </references>
    <section anchor="sect-7" numbered="false">
      <name>Acknowledgements</name>
      <t>The authors wish to thank <contact fullname="Tomi Kause"/> and <contact fullname="Martin Peylo"/>, the
original authors of <xref target="RFC6712"/>, for their work.</t>
      <t>We also thank all reviewers for their valuable feedback.</t>
    </section>
  </back>
</rfc>
