<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-aaron-acme-ari-00" submissionType="IETF" category="std" xml:lang="en" consensus="true">

<front>
<title abbrev="ACME ARI">Automated Certificate Management Environment (ACME) Renewal Information (ARI) Extension</title><seriesInfo value="draft-aaron-acme-ari-00" stream="IETF" status="standard" name="Internet-Draft"/>
<author initials="A." surname="Gable"><organization>Internet Security Research Group</organization><address><postal><street/>
</postal><email>aaron@letsencrypt.org</email>
</address></author>
<date/>
<area>Security Area (sec)</area>
<workgroup>ACME Working Group</workgroup>
<keyword>Internet-Draft</keyword>

<abstract>
<t>This document specifies how an ACME server may provide hints to ACME clients as to when they should attempt to renew their certificates. This allows servers to mitigate load spikes, and ensures clients do not make false assumptions about appropriate certificate renewal periods.</t>
</abstract>

<note title="Discussion Venues" removeInRFC="true">
<t>Discussion of this document takes place on the
    Automated Certificate Management Environment Working Group mailing list (acme@ietf.org),
    which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/acme/"/>.</t>
<t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/aarongable/draft-acme-ari"/>.</t>
</note>
</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>Most ACME clients today choose when to attempt to renew a certificate in one of three ways. They may be configured to renew at a specific interval (e.g. via <tt>cron</tt>); they may parse the issued certificate to determine its expiration date and renew a specific amount of time before then; or they may parse the issued certificate and renew when some percentage of its validity period has passed. The first two techniques create significant barriers against the issuing CA changing certificate lifetimes. All three techniques lead to load clustering for the issuing CA.</t>
<t>Being able to indicate to the client a period in which the issuing CA suggests renewal would allow both dynamic changes to the certificate validity period and proactive smearing of load. This document specifies a mechanism by which ACME servers may provide suggested renewal windows to ACME clients.</t>
</section>

<section anchor="conventions-and-definitions"><name>Conventions and Definitions</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"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
</section>

<section anchor="extensions-to-the-acme-protocol-the-order-resource"><name>Extensions to the ACME Protocol: The "order" Resource</name>
<t>An ACME server which wishes to provide renewal information <bcp14>MUST</bcp14> include a new field, "renewalInfo", in finalized Order objects.</t>
<t>renewalInfo (optional, string): A URL for renewal information for the certificate that has been issued in response to this order.</t>

<sourcecode type="json">HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "valid",
  "expires": "2021-01-20T14:09:07.99Z",

  "identifiers": [
    { "type": "dns", "value": "www.example.org" },
    { "type": "dns", "value": "example.org" }
  ],

  "notBefore": "2021-01-01T00:00:00Z",
  "notAfter": "2021-01-08T00:00:00Z",

  "authorizations": [
    "https://example.com/acme/authz/PAniVnsZcis",
    "https://example.com/acme/authz/r4HqLzrSrpI"
  ],

  "finalize": "https://example.com/acme/order/TOlocE8rfgo/finalize",
  "certificate": "https://example.com/acme/cert/mAt3xBGaobw",
  "renewalInfo": "https://example.com/acme/renewal/eXoM9UwLgbL"
}
</sourcecode>
<t>Conforming clients <bcp14>SHOULD</bcp14> store the "renewalInfo" URL locally so that they can poll it at any time during the lifetime of the certificate.</t>
</section>

<section anchor="extensions-to-the-acme-protocol-the-renewalinfo-resource"><name>Extensions to the ACME Protocol: The "renewalInfo" Resource</name>
<t>We define a new resource type, the "renewalInfo" resource, as part of the ACME protocol.</t>
<t>The structure of an ACME renewalInfo resource is as follows:</t>
<t>suggestedWindow (object, required): A JSON object with two keys, "start" and "end", whose values are timestamps, encoded in the format specified in <xref target="RFC3339"/>, which bound the window of time in which the CA recommends renewing the certificate.</t>

<sourcecode type="json">HTTP/1.1 200 OK
Content-Type: application/json

{
  "suggestedWindow": {
    "start": "2021-01-03T00:00:00Z",
    "end": "2021-01-07T00:00:00Z"
  }
}
</sourcecode>
<t>Conforming servers <bcp14>MUST</bcp14> provide the renewalInfo resource via POST-as-GET; they <bcp14>SHOULD</bcp14> provide it via unauthenticated GET as well. Conforming clients <bcp14>SHOULD</bcp14> use unauthenticated GET to request renewalInfo resources.</t>
<t>The server <bcp14>SHOULD</bcp14> include a Retry-After header indicating the polling interval that the ACME server recommends. Conforming clients <bcp14>SHOULD</bcp14> query the "renewalInfo" URL again after the Retry-After period has passed, as the server may provide a different suggestedWindow.</t>
<t>Conforming clients <bcp14>SHOULD</bcp14> select a random time within the suggested window to attempt to renew the certificate. If the selected time is in the past, the client <bcp14>SHOULD</bcp14> attempt renewal immediately.</t>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>The extensions to the ACME protocol described in this document build upon the Security Considerations and threat model defined in Section 10.1 of <xref target="RFC8555"/>.</t>
<t>This document specifies that renewalInfo resources should be exposed via unauthenticated GET requests, a departure from RFC8555’s requirement that clients must send POST-as-GET requests to fetch resources from the server. This is because the information contained in renewalInfo resources is not considered confidential, and because allowing renewalInfo to be easily cached is advantageous to shed load from clients which do not respect the Retry-After header.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>Draft note: The following changes to IANA registries have not yet been made.</t>

<section anchor="new-registries"><name>New Registries</name>
<t>Within the "Automated Certificate Management Environment (ACME) Protocol" registry, IANA has created the new "ACME Renewal Info Object Fields" registry (Section 6.4).</t>
</section>

<section anchor="acme-resource-type"><name>ACME Resource Type</name>
<t>Within the "Automated Certificate Management Environment (ACME) Protocol" registry, the following entry has been added to the "ACME Resource Types" registry.</t>
<table>
<thead>
<tr>
<th>Field Name</th>
<th>Resource Type</th>
<th>Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td>renewalInfo</td>
<td>Renewal Info object</td>
<td>This draft</td>
</tr>
</tbody>
</table></section>

<section anchor="acme-order-object-fields"><name>ACME Order Object Fields</name>
<t>Within the "Automated Certificate Management Environment (ACME) Protocol" registry, the following entry has been added to the "ACME Order Object Fields" registry.</t>
<table>
<thead>
<tr>
<th>Field Name</th>
<th>Field Type</th>
<th>Configurable</th>
<th>Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td>renewalInfo</td>
<td>string</td>
<td>false</td>
<td>This draft</td>
</tr>
</tbody>
</table></section>

<section anchor="acme-renewal-info-object-fields"><name>ACME Renewal Info Object Fields</name>
<t>The "ACME Renewal Info Object Fields" registry lists field names that are defined for use in ACME renewal info objects.</t>
<t>Template:</t>

<ul>
<li>Field name: The string to be used as a field name in the JSON object</li>
<li>Field type: The type of value to be provided, e.g., string, boolean, array of string</li>
<li>Reference: Where this field is defined</li>
</ul>
<t>Initial contents:</t>
<table>
<thead>
<tr>
<th>Field Name</th>
<th>Field type</th>
<th>Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td>suggestedWindow</td>
<td>object</td>
<td>This draft</td>
</tr>
</tbody>
</table></section>
</section>

</middle>

<back>
<references><name>Normative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3339.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8555.xml"/>
</references>

<section anchor="acknowledgments" numbered="false"><name>Acknowledgments</name>
<t>TODO acknowledge.</t>
</section>

</back>

</rfc>
