<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE rfc [
  <!ENTITY RFC2119 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC2181 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2181.xml">
  <!ENTITY RFC5730 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml">
  <!ENTITY RFC7481 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7481.xml">
  <!ENTITY RFC8174 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC8499 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8499.xml">
  <!ENTITY RFC9083 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9083.xml">
  <!ENTITY RFC9364 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9364.xml">
  <!ENTITY RFC9803 SYSTEM "https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9803.xml">
  <!ENTITY draft-ietf-regext-rdap-extensions SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-regext-rdap-extensions.xml">
  <!ENTITY draft-ietf-deleg SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-deleg.xml">
]>

<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>

<rfc
  category="std"
  docName="draft-ietf-regext-rdap-ttl-extension-06"
  ipr="trust200902"
  submissionType="IETF"
  consensus="true"
  xmlns:xi="http://www.w3.org/2001/XInclude">

<front>

<title abbrev="RDAP TTL Extension">
  RDAP Extension for DNS Time-To-Live (TTL Values)
</title>

<author
  initials="G."
  surname="Brown"
  fullname="Gavin Brown">
  <organization>ICANN</organization>
  <address>
    <postal>
      <street>12025 Waterfront Drive, Suite 300</street>
      <city>Los Angeles</city>
      <code>90094-2536</code>
      <country>US</country>
      <region>CA</region>
    </postal>
    <email>gavin.brown@icann.org</email>
  </address>
</author>

<date/>

<area>Internet</area>

<workgroup>Registration Extensions (REGEXT)</workgroup>

<abstract><t>
This document describes an extension to the Registration Data Access Protocol which allows the Time-To-Live (TTL) values for relevant DNS record types to be included in RDAP responses.
</t></abstract>

<note title="About this draft" removeInRFC="true"><t>
The source for this draft, and an issue tracker, may can be found at <eref target="https://github.com/gbxyz/rdap-ttl-extension"/>.
</t></note>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>

<t>
While <xref target="RFC9083"></xref> allows RDAP server operators to provide information about the content of the <tt>NS</tt>, <tt>DS</tt>, <tt>A</tt> and <tt>AAAA</tt> RRset(s) (see <xref section="8" sectionFormat="of" target="RFC8499"/>) which are published in the DNS for a given registry object (domain or host object),
it does not provide a mechanism to allow the Time-To-Live (TTL) (see <xref section="5" sectionFormat="of" target="RFC8499"/>) values of those RRsets to be included in responses.
</t>

<t>
This document describes how TTL information can be included in domain and nameserver objects in RDAP responses. As per <xref section="5.2" sectionFormat="of" target="RFC2181"/>, TTL values are applicable to RRSets rather than individual records.
</t>

<t>
This document is complementary to the <xref target="RFC5730">Extensible Provisioning Protocol</xref> (EPP) <xref target="RFC9803">Mapping for DNS Time-to-Live (TTL) Values</xref>,
but registry operators do not need to implement that extension in their EPP server in order to implement this RDAP extension.
</t>

</section><!-- introduction -->

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

</section><!-- conventions -->

<section anchor="rdap-response-specification">

<name>RDAP Response Specification</name>

<t>
Servers which support this extension <bcp14>MAY</bcp14> include a <tt>ttl0_data</tt> property in any domain and nameserver objects included in RDAP responses.
</t>

<t>
The <tt>ttl0_data</tt> property is an object which has the following properties:
</t>

<ul>
<li>A <tt>values</tt> property, which is an object which maps DNS record type mnemonics to TTL values;</li>
<li>An <bcp14>OPTIONAL</bcp14> <tt>remarks</tt> property, which is an array of remarks (see <xref section="4.3" sectionFormat="of" target="RFC9083"/>).</li>
</ul>

<t>
As specified in <xref section="8" sectionFormat="of" target="RFC2181"/>, a TTL value is a "an unsigned number, with a minimum value of 0, and a maximum value of 2147483647. That is, a maximum of 2^31 - 1.". TTL values are represented as JSON numbers.
</t>

<t>
Example domain object:
</t>

<sourcecode><![CDATA[{
  "objectClassName": "domain",
  "ldhName": "domain.example",
  "ttl0_data": {
    "values": {
      "NS": 3600,
      "DS": 300
    },
    "remarks": [
      {
        "description": [
          "For more information about the .example",
          " registry policy relating to DS record TTL changes,",
          "see https://domain.example"
        ],
        "links": [
          {
            "rel": "related",
            "title": ".Example Registry DNS TTL Policy",
            "href": "https://domain.example"
          }
        ]
      }
    ]
  }
}]]></sourcecode>

<t>
Example nameserver object:
</t>

<sourcecode><![CDATA[{
  "objectClassName": "nameserver",
  "ldhName": "ns1.domain.example",
  "ttl0_data": {
    "values": {
      "A": 86400,
      "AAAA": 86400
    },
    "remarks": [
      {
        "description": [
          "The .example registry does not permit TTL ",
          "values for nameservers to be changed."
        ]
      }
    ]
  }
}
]]></sourcecode>

<section>
<name>DNS record types and TTL values</name>

<t>
The DNS record type mnemonics that appear as the property names in <tt>values</tt> objects <bcp14>MUST</bcp14> be in all capitals and <bcp14>MUST</bcp14> be registered with IANA in <xref target="IANA-RRTYPES"/>.
TTL values <bcp14>MUST</bcp14> be unsigned integers in the range 0-2147483647 as per <xref section="8" sectionFormat="of" target="RFC2181"/>.
</t>

<t>
Many RDAP clients make use of frameworks which automatically "hydrate" objects using JSON data received in RDAP responses.
As a result, RDAP clients which use these frameworks may need to explicitly carve out the <tt>values</tt> property of <tt>ttl0_data</tt> elements,
since the set of possible DNS record mnemonics is not static, as new DNS record types are added to <xref target="IANA-RRTYPES"/> regularly.
</t>

<t>
In practice, the number of DNS record types that are likely to observed "in the wild" is small,
and will only change as the result of a significant evolution to the DNS protocol itself,
similar to that brought about by <xref target="RFC9364"/>, or which might result from <xref target="I-D.ietf-deleg"/>.
</t>

<t>
For domain objects, the list of expected DNS record types is <tt>NS</tt>, <tt>DS</tt>, <tt>A</tt> and <tt>AAAA</tt>.
</t>

<t>
For nameserver objects, the list of expected DNS record types is just <tt>A</tt> and <tt>AAAA</tt>.
</t>

<t>
Since the list of expected record types may change with time, clients which implement this extension <bcp14>MUST</bcp14> accept responses containing other DNS record types, but <bcp14>MAY</bcp14> ignore unexpected record types.
</t>

</section><!-- types and values -->

<section anchor="rdap-conformance">

<name>RDAP Conformance</name>

<t>
Servers returning responses containing TTL values <bcp14>MUST</bcp14> include the string &quot;<tt>ttl0</tt>&quot; in the <tt>rdapConformance</tt> array.
</t>

</section><!-- conformance -->

</section><!-- specification -->

<section anchor="iana-considerations">

<name>IANA Considerations</name>

<t>
IANA is requested to register the following value in the RDAP Extensions Registry:
</t>

<t>
<strong>Extension identifier:</strong> <tt>ttl0</tt>
</t>

<t>
<strong>Registry operator:</strong> Any
</t>

<t>
<strong>Published specification:</strong> this document
</t>

<t>
<strong>Contact:</strong> IETF &lt;<eref target="mailto:iesg@ietf.org">iesg@ietf.org</eref>&gt;
</t>

<t>
<strong>Intended usage:</strong> this extension describes how DNS TTL values can be included in RDAP responses.
</t>

</section><!-- iana considerations -->

<section anchor="security-considerations">

<name>Security Considerations</name>

<t>
Security services for the extension specified in this document are described in <xref target="RFC7481"/>.
</t>

<t>
This document only concerns itself with the representation of configure TTL
values for domain and host objects. The security implications of those values
are described further in <xref section="6" sectionFormat="of" target="RFC9803"/>.
</t>

</section><!-- security considerations -->

<section anchor="impl-status" removeInRFC="true"><name>Implementation status</name>

<section><name>ICANN RDAP</name>

<t>
Organization: ICANN
</t>

<t>
Name: ICANN RDAP
</t>

<t>
Description: ICANN RDAP contains an RDAP client, server, and common libraries.
</t>

<t>
Level of maturity: Mature
</t>

<t>
Coverage: All aspects of the protocol are implemented.
</t>

<t>
Licensing: Apache License, Version 2.0 or MIT License.
</t>

<t>
Contact: globalsupport@icann.org
</t>

<t>
URL: https://github.com/icann/icann-rdap
</t>

</section><!-- ICANN RDAP Client -->

<section><name>Net::RDAP</name>

<t>
Name: Net::RDAP
</t>

<t>
Description: An RDAP library for Perl.
</t>

<t>
Level of maturity: Mature
</t>

<t>
Coverage: All aspects of the protocol are implemented.
</t>

<t>
Licensing: Perl (Artistic License or GPL).
</t>

<t>
Contact: gavin.brown@fastmail.uk
</t>

<t>
URL: https://metacpan.org/pod/Net::RDAP
</t>

</section><!-- rdapper -->

<section><name>rdapper</name>

<t>
Name: rdapper
</t>

<t>
Description: A command-line RDAP client that uses Net::RDAP.
</t>

<t>
Level of maturity: Mature
</t>

<t>
Coverage: All aspects of the protocol are implemented.
</t>

<t>
Licensing: Perl (Artistic License or GPL).
</t>

<t>
Contact: gavin.brown@fastmail.uk
</t>

<t>
URL: https://metacpan.org/pod/App::rdapper
</t>

</section><!-- Net::RDAP -->

</section><!-- implementation status -->

<section anchor="changes" removeInRFC="true"><name>Change Log</name>

<section>
<name>Changes from 05 to 06</name>
<ol>
  <li>Add missing change log entries to assist in IESG review.</li>
  <li>Added <xref target="impl-status"/>.</li>
</ol>
</section>

<section>
<name>Changes from 04 to 05</name>
<ol>
  <li>Clarify that TTL values are represented using JSON numbers.</li>
</ol>
</section>

<section>
<name>Changes from 03 to 04</name>
<t>Updates based on feedback during WGLC:</t>
<ol>
  <li>Remove the xref in the Abstract to avoid issues when rendered as plaintext;</li>
  <li>Refer to RRsets instead of resource records since <xref target="RFC2181"/> requires the TTL of all the records in an RRset to be the same;</li>
  <li>Reference <xref target="RFC2181"/> which defines what a TTL is.</li>
  <li>Clarify that clients need to handle (even if to ignore) unexpected record types.</li>
</ol>
</section>

<section>
<name>Changes from 02 to 03</name>
<ol>
<li>Switch to array model to object model, based on WG feedback.</li>
<li>Added <xref target="thx"/>.</li>
</ol>
</section>

<section>
<name>Changes from 01 to 02</name>
<ol>
<li>Include reference to <xref target="IANA-RRTYPES"/> in <xref target="rdap-response-specification"/> (thanks Jasdip Singh).</li>
<li>Removed the <tt>value</tt> member of the link object in the example domain object so that it conforms with web linking practice (also thanks Jasdip Singh).</li>
</ol>
</section>

<section>
<name>Changes from 00 to 01</name>
<ol>
<li>Updated the extension identifier and extension property name to align with the current best practices in <xref target="I-D.ietf-regext-rdap-extensions"/>.</li>
<li>Added <xref target="security-considerations"/>.</li>
<li>Changed <bcp14>MUST</bcp14> to <bcp14>MAY</bcp14> in the first paragraph of <xref target="rdap-response-specification"/>.</li>
<li>Reduce ambiguity around the repetition of DNS record types in responses.</li>
</ol>
</section>

<section>
<name>Changes from draft-brown-rdap-ttl-extension-03 to draft-ietf-regext-rdap-ttl-extension-00</name>
<ol>
<li>Name change only.</li>
</ol>
</section>

<section>
<name>Changes from 02 to 03</name>
<ol>
<li>Update reference to <xref target="RFC9803"/>.</li>
</ol>
</section>

<section>
<name>Changes from 01 to 02</name>
<ol>
<li>Update reference to the EPP extension.</li>
</ol>
</section>

<section>
<name>Changes from 00 to 01</name>
<ol>
<li>Extension property name renamed to <tt>ttl</tt>.</li>
<li>The extension data structure is now an array allowing common TTL values, remarks and events to be mapped to multiple DNS record types.</li>
<li>The extension data structure may now include remarks and events.</li>
<li>Added normative text regarding the value of DNS record mnemonics and TTL values.</li>
</ol>
</section>

</section>

<section anchor="thx">
<name>Acknowledgements</name>
<t>
The author wishes to thank Andy Newton, Pawel Kowalik, and Maarten Wullink for their constructive feedback and advice during the development of this document.
</t>
</section>

</middle>

<back>

<references>
<name>Normative References</name>

&RFC2119;
&RFC2181;
&RFC7481;
&RFC8174;
&RFC9083;

<reference anchor="IANA-RRTYPES" target="https://www.iana.org/assignments/dns-parameters#dns-parameters-4">
  <front>
    <title>Resource Record (RR) TYPEs</title>
    <author>
      <organization>IANA</organization>
    </author>
  </front>
</reference>
</references>

<references>
<name>Informative References</name>

&RFC5730;
&RFC8499;
&RFC9364;
&RFC9803;
&draft-ietf-regext-rdap-extensions;
&draft-ietf-deleg;
</references>

</back>

</rfc>
