<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-regext-rdap-partial-response-16" indexInclude="true" ipr="trust200902" number="8982" prepTime="2021-02-09T22:58:41" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-regext-rdap-partial-response-16" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8982" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="RDAP Partial Response">Registration Data Access Protocol (RDAP) Partial Response</title>
    <seriesInfo name="RFC" value="8982" stream="IETF"/>
    <author fullname="Mario Loffredo" initials="M." surname="Loffredo">
      <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
      <address>
        <postal>
          <street>Via Moruzzi,1</street>
          <city>Pisa</city>
          <country>IT</country>
          <code>56124</code>
        </postal>
        <email>mario.loffredo@iit.cnr.it</email>
        <uri>https://www.iit.cnr.it</uri>
      </address>
    </author>
    <author fullname="Maurizio Martinelli" initials="M." surname="Martinelli">
      <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
      <address>
        <postal>
          <street>Via Moruzzi,1</street>
          <city>Pisa</city>
          <country>IT</country>
          <code>56124</code>
        </postal>
        <email>maurizio.martinelli@iit.cnr.it</email>
        <uri>https://www.iit.cnr.it</uri>
      </address>
    </author>
    <date month="02" year="2021"/>
    <area>Applications and Real-Time</area>
    <workgroup>Registration Protocols Extensions</workgroup>
    <keyword>RDAP</keyword>
    <keyword>Partial response</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">The Registration Data Access Protocol (RDAP) does not include capabilities to request partial responses.  Servers will only return full responses that include all of the information that a client is authorized to receive.  A partial response capability that limits the amount of information returned, especially in the case of search queries, could bring benefits to both clients and servers.  This document describes an RDAP query extension that allows clients to specify their preference for obtaining a partial response.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8982" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-used-in-this-do">Conventions Used in This Document</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rdap-path-segment-specifica">RDAP Path Segment Specification</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-subsetting-metadata">Subsetting Metadata</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.1.2">
                  <li pn="section-toc.1-1.2.2.1.2.1">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.2.1.1"><xref derivedContent="2.1.1" format="counter" sectionFormat="of" target="section-2.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rdap-conformance">RDAP Conformance</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.2.1"><xref derivedContent="2.1.2" format="counter" sectionFormat="of" target="section-2.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-representing-subsetting-lin">Representing Subsetting Links</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dealing-with-relationships">Dealing with Relationships</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-basic-field-sets">Basic Field Sets</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-negative-answers">Negative Answers</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-approaches-to-partial-respo">Approaches to Partial Response Implementation</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-specific-issues-raised-by-r">Specific Issues Raised by RDAP</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The use of partial responses in RESTful API <xref target="REST" format="default" sectionFormat="of" derivedContent="REST"/> design is very common.  The rationale is quite simple:
      instead of returning objects in API responses with all data fields, only
      a subset of the fields in each result object is returned.  The benefit
      is obvious: less data transferred over the network means less bandwidth
      usage, faster server responses, less CPU time spent both on the server
      and the client, and less memory usage on the client.</t>
      <t indent="0" pn="section-1-2">Currently, RDAP does not provide a client with any way to request a
      partial response.  Servers can only provide the client with a full
      response <xref target="RFC7483" format="default" sectionFormat="of" derivedContent="RFC7483"/>.  Servers cannot limit the amount of
      information returned in a response based on a client's preferences, and
      this creates inefficiencies.</t>
      <t indent="0" pn="section-1-3">The protocol described in this specification extends RDAP search
      capabilities to enable partial responses through the provisioning of
      predefined sets of fields that clients can submit to an RDAP service by
      adding a new query parameter.  The service is implemented using the
      Hypertext Transfer Protocol (HTTP) <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/> and the
      conventions described in <xref target="RFC7480" format="default" sectionFormat="of" derivedContent="RFC7480"/>.</t>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-conventions-used-in-this-do">Conventions Used in This Document</name>
        <t indent="0" pn="section-1.1-1">
    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" format="default" sectionFormat="of" derivedContent="RFC2119"/>
          <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
        </t>
      </section>
    </section>
    <section anchor="rdap-path-segment-specification" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-rdap-path-segment-specifica">RDAP Path Segment Specification</name>
      <t indent="0" pn="section-2-1">The path segment defined in this section is an
      <bcp14>OPTIONAL</bcp14> extension of search path segments defined in
      <xref target="RFC7482" format="default" sectionFormat="of" derivedContent="RFC7482"/>.  This document defines an RDAP query
      parameter, "fieldSet", whose value is a non-empty string identifying a
      server-defined set of fields returned in place of the full response.
      The field sets supported by a server are usually described in
      out-of-band documents (e.g., RDAP profile) together with other features.
      Moreover, this document defines in <xref target="rdap-subsetting-metadata" format="default" sectionFormat="of" derivedContent="Section 2.1"/> an in-band mechanism by means of
      which servers can provide clients with basic information about the
      supported field sets.</t>
      <t indent="0" pn="section-2-2">The following is an example of an RDAP query including the "fieldSet" parameter:</t>
      <artwork align="left" pn="section-2-3">
https://example.com/rdap/domains?name=example*.com&amp;fieldSet=afieldset
</artwork>
      <t indent="0" pn="section-2-4">This solution can be implemented by RDAP providers with less effort
      than field selection and is easily requested by clients.  The
      considerations that have led to this solution are described in more
      detail in <xref target="approaches-to-partial-response-implementation" format="default" sectionFormat="of" derivedContent="Appendix A"/>.</t>
      <section anchor="rdap-subsetting-metadata" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-subsetting-metadata">Subsetting Metadata</name>
        <t indent="0" pn="section-2.1-1">According to most advanced principles in REST design, collectively
        known as "Hypermedia as the Engine of Application State" (HATEOAS)
        <xref target="HATEOAS" format="default" sectionFormat="of" derivedContent="HATEOAS"/>, a client entering a REST application through
        an initial URI should use server-provided links to dynamically
        discover available actions and access the resources it needs.  In this
        way, the client is not required to have prior knowledge of the service
        nor, consequently, to hard-code the URIs of different resources.  This
        allows the server to make URI changes as the API evolves without
        breaking clients.  Definitively, a REST service should be as
        self-descriptive as possible.</t>
        <t indent="0" pn="section-2.1-2">Therefore, servers implementing the query parameter described in
        this specification <bcp14>SHOULD</bcp14> provide additional
        information in their responses about the available field sets.  Such
        information is collected in a new JSON data structure named
        "subsetting_metadata" containing the following properties:</t>
        <dl newline="true" indent="3" spacing="normal" pn="section-2.1-3">
          <dt pn="section-2.1-3.1">"currentFieldSet": "String" (<bcp14>REQUIRED</bcp14>)
</dt>
          <dd pn="section-2.1-3.2">either the value of the "fieldSet" parameter as specified in the query
string, or the field set applied by default.
</dd>
          <dt pn="section-2.1-3.3">"availableFieldSets": "AvailableFieldSet[]"  (<bcp14>OPTIONAL</bcp14>)
</dt>
          <dd pn="section-2.1-3.4">
            <t indent="0" pn="section-2.1-3.4.1">an array of objects, with each element describing an available field set.
The AvailableFieldSet object includes the following members:</t>
            <dl newline="true" indent="3" spacing="normal" pn="section-2.1-3.4.2">
              <dt pn="section-2.1-3.4.2.1">"name": "String" (<bcp14>REQUIRED</bcp14>)
</dt>
              <dd pn="section-2.1-3.4.2.2">the field set name.
</dd>
              <dt pn="section-2.1-3.4.2.3">"default": "Boolean" (<bcp14>REQUIRED</bcp14>)
</dt>
              <dd pn="section-2.1-3.4.2.4">indicator of whether the field set is applied by      
default.  An RDAP server <bcp14>MUST</bcp14> define only one default field set.
</dd>
              <dt pn="section-2.1-3.4.2.5">"description": "String"  (<bcp14>OPTIONAL</bcp14>)
</dt>
              <dd pn="section-2.1-3.4.2.6">a human-readable description of the field set.
</dd>
              <dt pn="section-2.1-3.4.2.7">"links": "Link[]" (<bcp14>OPTIONAL</bcp14>)
</dt>
              <dd pn="section-2.1-3.4.2.8">an array of links as described in <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> containing the
query string that applies the field set (see <xref target="subsetting_links" format="default" sectionFormat="of" derivedContent="Section 2.1.2"/>).
</dd>
            </dl>
          </dd>
        </dl>
        <section anchor="rdap-conformance" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.1">
          <name slugifiedName="name-rdap-conformance">RDAP Conformance</name>
          <t indent="0" pn="section-2.1.1-1">Servers returning the "subsetting_metadata" section in their responses <bcp14>MUST</bcp14> include "subsetting" in the rdapConformance array.</t>
        </section>
        <section anchor="subsetting_links" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.2">
          <name slugifiedName="name-representing-subsetting-lin">Representing Subsetting Links</name>
          <t indent="0" pn="section-2.1.2-1">An RDAP server <bcp14>MAY</bcp14> use the "links" array of the "subsetting_metadata" element to provide ready-made references <xref target="RFC8288" format="default" sectionFormat="of" derivedContent="RFC8288"/> to the available field sets (<xref target="subset-link-in-response-example" format="default" sectionFormat="of" derivedContent="Figure 1"/>).  The target URI in each link is the reference to an alternative to the current view of results identified by the context URI.</t>
          <t indent="0" pn="section-2.1.2-2">The "value", "rel", and "href" JSON values <bcp14>MUST</bcp14> be specified.  All other JSON values are <bcp14>OPTIONAL</bcp14>.</t>
          <figure anchor="subset-link-in-response-example" align="left" suppress-title="false" pn="figure-1">
            <name slugifiedName="name-example-of-a-subsetting_met">Example of a "subsetting_metadata" Instance</name>
            <sourcecode type="json" markers="false" pn="section-2.1.2-3.1">
{
  "rdapConformance": [
    "rdap_level_0",
    "subsetting"
  ],
  ...
  "subsetting_metadata": {
    "currentFieldSet": "afieldset",
    "availableFieldSets": [
      {
      "name": "anotherfieldset",
      "description": "Contains some fields",
      "default": false,
      "links": [
        {
        "value": "https://example.com/rdap/domains?name=example*.com
                  &amp;fieldSet=afieldset",
        "rel": "alternate",
        "href": "https://example.com/rdap/domains?name=example*.com
                 &amp;fieldSet=anotherfieldset",
        "title": "Result Subset Link",
        "type": "application/rdap+json"
        }
      ]
      },
    ...
    ]
  },
  ...
  "domainSearchResults": [
    ...
  ]
}
</sourcecode>
          </figure>
        </section>
      </section>
    </section>
    <section anchor="rdap-field-set-relationships" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-dealing-with-relationships">Dealing with Relationships</name>
      <t indent="0" pn="section-3-1">Representation of second-level objects within a field set produces additional considerations.  Since the representation of the topmost returned objects will vary according to the field set in use, the response may contain no relationships (e.g., for an abbreviated field set) or may contain associated objects as in a normal RDAP query response.  Each field set can indicate the format of the additional objects to be returned, in the same manner that the format of the topmost objects is controlled by the field set.</t>
    </section>
    <section anchor="basic-field-sets" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-basic-field-sets">Basic Field Sets</name>
      <t indent="0" pn="section-4-1">This section defines three basic field sets that servers
      <bcp14>MAY</bcp14> implement to facilitate their interaction with
      clients:</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-4-2">
        <dt pn="section-4-2.1">"id":
</dt>
        <dd pn="section-4-2.2">The server provides only the key field; "handle" for entities, and "ldhName" for domains   
and nameservers.  If a returned domain or nameserver is an Internationalized Domain Name (IDN) <xref target="RFC5890" format="default" sectionFormat="of" derivedContent="RFC5890"/>, then the "unicodeName" field <bcp14>MUST</bcp14> additionally be included in the      
response.  This field set could be used when the client wants to obtain a collection of object            
identifiers (<xref target="fieldSet-id-response-example" format="default" sectionFormat="of" derivedContent="Figure 2"/>).
</dd>
        <dt pn="section-4-2.3">"brief":
</dt>
        <dd pn="section-4-2.4">The field set contains the fields that can be included in a "short" response.       
This field set could be used when the client is asking for a subset of the full response that provides   
only basic knowledge of each object.
</dd>
        <dt pn="section-4-2.5">"full":
</dt>
        <dd pn="section-4-2.6">The field set contains all of the information the server can provide for a
particular object.
</dd>
      </dl>
      <t indent="0" pn="section-4-3">The "objectClassName" field is implicitly included in each of the above field sets.  RDAP providers <bcp14>SHOULD</bcp14> include a "links" field indicating the "self" link relationship.  RDAP providers <bcp14>MAY</bcp14> also add any property providing service information.</t>
      <t indent="0" pn="section-4-4">Fields included in the "brief" and "full" field set responses <bcp14>MUST</bcp14> take into account the user's access and authorization levels.</t>
      <figure anchor="fieldSet-id-response-example" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-example-of-rdap-response-ac">Example of RDAP Response According to the "id" Field Set</name>
        <sourcecode type="json" markers="false" pn="section-4-5.1">
{
  "rdapConformance": [
    "rdap_level_0",
    "subsetting"
  ],
  ...
  "domainSearchResults": [
    {
      "objectClassName": "domain",
      "ldhName": "example1.com",
      "links": [
        {
        "value": "https://example.com/rdap/domain/example1.com",
        "rel": "self",
        "href": "https://example.com/rdap/domain/example1.com",
        "type": "application/rdap+json"
        }
      ]
    },
    {
      "objectClassName": "domain",
      "ldhName": "example2.com",
      "links": [
        {
        "value": "https://example.com/rdap/domain/example2.com",
        "rel": "self",
        "href": "https://example.com/rdap/domain/example2.com",
        "type": "application/rdap+json"
        }
      ]
    },
    ...
  ]
}
</sourcecode>
      </figure>
    </section>
    <section anchor="negative-answers" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-negative-answers">Negative Answers</name>
      <t indent="0" pn="section-5-1">Each request including an empty or unsupported "fieldSet" value <bcp14>MUST</bcp14> produce an HTTP 400 (Bad Request) response code.  Optionally, the response <bcp14>MAY</bcp14> include additional information regarding the supported field sets in the HTTP entity body (<xref target="field-set-error" format="default" sectionFormat="of" derivedContent="Figure 3"/>).</t>
      <figure anchor="field-set-error" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-example-of-rdap-error-respo">Example of RDAP Error Response Due to an Invalid Field Set Included in the Request</name>
        <sourcecode type="json" markers="false" pn="section-5-2.1">
{
    "errorCode": 400,
    "title": "Field set 'unknownfieldset' is not valid",
    "description": [
        "Supported field sets are: 'afieldset', 'anotherfieldset'."
    ]

}
</sourcecode>
      </figure>
    </section>
    <section anchor="IANA-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-6-1">IANA has registered the following value in the "RDAP Extensions" registry:</t>
      <dl spacing="compact" indent="3" newline="false" pn="section-6-2">
        <dt pn="section-6-2.1">Extension identifier:
</dt>
        <dd pn="section-6-2.2">subsetting
</dd>
        <dt pn="section-6-2.3">Registry operator:
</dt>
        <dd pn="section-6-2.4">Any
</dd>
        <dt pn="section-6-2.5">Published specification:
</dt>
        <dd pn="section-6-2.6">RFC 8982
</dd>
        <dt pn="section-6-2.7">Contact:
</dt>
        <dd pn="section-6-2.8">IETF &lt;iesg@ietf.org&gt;
</dd>
        <dt pn="section-6-2.9">Intended usage:
</dt>
        <dd pn="section-6-2.10">This extension describes a best practice for partial response provisioning.
</dd>
      </dl>
    </section>
    <section anchor="security-considerations" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-7-1">A search query typically requires more server resources (such as memory, CPU cycles, and network bandwidth) when compared to a lookup query.  This increases the risk of server resource exhaustion and subsequent denial of service.  This risk can be mitigated by supporting the return of partial responses combined with other strategies (e.g., restricting search functionality, limiting the rate of search requests, and truncating and paging results).</t>
      <t indent="0" pn="section-7-2">Support for partial responses gives RDAP operators the ability to implement data access control policies based on the HTTP authentication mechanisms described in <xref target="RFC7481" format="default" sectionFormat="of" derivedContent="RFC7481"/>.  RDAP operators can vary the information returned in RDAP responses based on a client's access and authorization levels.  For example:</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-7-3">
        <li pn="section-7-3.1">
          <t indent="0" pn="section-7-3.1.1">the list of fields for each set can differ based on the client's access and authorization levels;</t>
          <t indent="0" pn="section-7-3.1.2"/>
        </li>
        <li pn="section-7-3.2">the set of available field sets could be restricted based on the client's access and authorization levels.</li>
      </ul>
      <t indent="0" pn="section-7-4">Servers can also define different result limits according to the available field sets, so a more flexible truncation strategy can be implemented.  The new query parameter presented in this document provides RDAP operators with a way to implement a server that reduces inefficiency risks.</t>
    </section>
  </middle>
  <back>
    <references pn="section-8">
      <name slugifiedName="name-references">References</name>
      <references pn="section-8.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC5890" target="https://www.rfc-editor.org/info/rfc5890" quoteTitle="true" derivedAnchor="RFC5890">
          <front>
            <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
            <author initials="J." surname="Klensin" fullname="J. Klensin">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="August"/>
            <abstract>
              <t indent="0">This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version.  It describes the document collection and provides definitions and other material that are common to the set.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5890"/>
          <seriesInfo name="DOI" value="10.17487/RFC5890"/>
        </reference>
        <reference anchor="RFC7230" target="https://www.rfc-editor.org/info/rfc7230" quoteTitle="true" derivedAnchor="RFC7230">
          <front>
            <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
            <author initials="R." surname="Fielding" fullname="R. Fielding" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Reschke" fullname="J. Reschke" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="June"/>
            <abstract>
              <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.  This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7230"/>
          <seriesInfo name="DOI" value="10.17487/RFC7230"/>
        </reference>
        <reference anchor="RFC7480" target="https://www.rfc-editor.org/info/rfc7480" quoteTitle="true" derivedAnchor="RFC7480">
          <front>
            <title>HTTP Usage in the Registration Data Access Protocol (RDAP)</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Ellacott" fullname="B. Ellacott">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Kong" fullname="N. Kong">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document is one of a collection that together describes the Registration Data Access Protocol (RDAP).  It describes how RDAP is transported using the Hypertext Transfer Protocol (HTTP).  RDAP is a successor protocol to the very old WHOIS protocol.  The purpose of this document is to clarify the use of standard HTTP mechanisms for this application.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7480"/>
          <seriesInfo name="DOI" value="10.17487/RFC7480"/>
        </reference>
        <reference anchor="RFC7481" target="https://www.rfc-editor.org/info/rfc7481" quoteTitle="true" derivedAnchor="RFC7481">
          <front>
            <title>Security Services for the Registration Data Access Protocol (RDAP)</title>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Kong" fullname="N. Kong">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">The Registration Data Access Protocol (RDAP) provides "RESTful" web services to retrieve registration metadata from Domain Name and Regional Internet Registries.  This document describes information security services, including access control, authentication, authorization, availability, data confidentiality, and data integrity for RDAP.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7481"/>
          <seriesInfo name="DOI" value="10.17487/RFC7481"/>
        </reference>
        <reference anchor="RFC7482" target="https://www.rfc-editor.org/info/rfc7482" quoteTitle="true" derivedAnchor="RFC7482">
          <front>
            <title>Registration Data Access Protocol (RDAP) Query Format</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document describes uniform patterns to construct HTTP URLs that may be used to retrieve registration information from registries (including both Regional Internet Registries (RIRs) and Domain Name Registries (DNRs)) using "RESTful" web access patterns.  These uniform patterns define the query syntax for the Registration Data Access Protocol (RDAP).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7482"/>
          <seriesInfo name="DOI" value="10.17487/RFC7482"/>
        </reference>
        <reference anchor="RFC7483" target="https://www.rfc-editor.org/info/rfc7483" quoteTitle="true" derivedAnchor="RFC7483">
          <front>
            <title>JSON Responses for the Registration Data Access Protocol (RDAP)</title>
            <author initials="A." surname="Newton" fullname="A. Newton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Hollenbeck" fullname="S. Hollenbeck">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="March"/>
            <abstract>
              <t indent="0">This document describes JSON data structures representing registration information maintained by Regional Internet Registries (RIRs) and Domain Name Registries (DNRs).  These data structures are used to form Registration Data Access Protocol (RDAP) query responses.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7483"/>
          <seriesInfo name="DOI" value="10.17487/RFC7483"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8288" target="https://www.rfc-editor.org/info/rfc8288" quoteTitle="true" derivedAnchor="RFC8288">
          <front>
            <title>Web Linking</title>
            <author initials="M." surname="Nottingham" fullname="M. Nottingham">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="October"/>
            <abstract>
              <t indent="0">This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
              <t indent="0">It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8288"/>
          <seriesInfo name="DOI" value="10.17487/RFC8288"/>
        </reference>
      </references>
      <references pn="section-8.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="CQL" target="https://github.com/gregwhitaker/catnap/wiki/Catnap-Query-Language-Reference" quoteTitle="true" derivedAnchor="CQL">
          <front>
            <title>Catnap Query Language Reference</title>
            <author initials="G." surname="Whitaker" fullname="Greg Whitaker">
		</author>
            <date year="2017" month="September"/>
          </front>
          <refcontent>commit d4f402c</refcontent>
        </reference>
        <reference anchor="HATEOAS" target="https://www.e4developer.com/2018/02/16/hateoas-simple-explanation/" quoteTitle="true" derivedAnchor="HATEOAS">
          <front>
            <title>HATEOAS - a simple explanation</title>
            <author initials="B." surname="Jedrzejewski" fullname="Bartosz Jedrzejewski">
		</author>
            <date month="February" year="2018"/>
          </front>
        </reference>
        <reference anchor="REST" target="https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf" quoteTitle="true" derivedAnchor="REST">
          <front>
            <title>Architectural Styles and the Design of Network-based Software Architectures</title>
            <author initials="R." surname="Fielding" fullname="Roy Thomas Fielding">
            </author>
            <date year="2000"/>
          </front>
          <refcontent>Ph.D. Dissertation, University of California, Irvine</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="approaches-to-partial-response-implementation" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-approaches-to-partial-respo">Approaches to Partial Response Implementation</name>
      <t indent="0" pn="section-appendix.a-1">Looking at the implementation experiences of partial responses offered by data providers on the web, two approaches are observed:</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-appendix.a-2">
        <li pn="section-appendix.a-2.1">
          <t indent="0" pn="section-appendix.a-2.1.1">the client explicitly describes the data fields to be returned;</t>
          <t indent="0" pn="section-appendix.a-2.1.2"/>
        </li>
        <li pn="section-appendix.a-2.2">the client describes a name identifying a server-defined set of data fields.</li>
      </ul>
      <t indent="0" pn="section-appendix.a-3">The former is more flexible than the latter because clients can specify all the data fields they need.  However, it has some drawbacks:</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-appendix.a-4">
        <li pn="section-appendix.a-4.1">
          <t indent="0" pn="section-appendix.a-4.1.1">Fields have to be declared according to a given syntax.  This is
          a simple task when the data structure of the object is flat, but it
          is much more difficult when the object has a tree structure like
          that of a JSON object.  The presence of arrays and deep nested
          objects complicate both the syntax definition of the query and,
          consequently, the processing required on the server side.</t>
          <t indent="0" pn="section-appendix.a-4.1.2"/>
        </li>
        <li pn="section-appendix.a-4.2">
          <t indent="0" pn="section-appendix.a-4.2.1">Clients need to recognize the returned data structure to avoid
          cases when the requested fields are invalid.</t>
          <t indent="0" pn="section-appendix.a-4.2.2"/>
        </li>
        <li pn="section-appendix.a-4.3">The request of some fields might not match the client's access and
        authorization levels.  Clients might request unauthorized fields, and
        servers have to define a strategy for responding such as always
        returning an error response or returning a response that ignores the
        unauthorized fields.</li>
      </ul>
      <section anchor="specific-issues-in-rdap" numbered="true" removeInRFC="false" toc="include" pn="section-a.1">
        <name slugifiedName="name-specific-issues-raised-by-r">Specific Issues Raised by RDAP</name>
        <t indent="0" pn="section-a.1-1">In addition to those listed above, RDAP responses raise some specific issues:</t>
        <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-a.1-2">
          <li pn="section-a.1-2.1">
            <t indent="0" pn="section-a.1-2.1.1">Relevant entity object information is included in a jCard, but
            such information cannot be easily selected because it is split
            into the items of a jagged array.</t>
            <t indent="0" pn="section-a.1-2.1.2"/>
          </li>
          <li pn="section-a.1-2.2">RDAP responses contain some properties providing service
          information (e.g., rdapConformance, links, notices, remarks, etc.),
          which are not normally selected but are just as important.
          They could be returned anyway but, in this case, the server would
          provide unrequested data.</li>
        </ul>
        <t indent="0" pn="section-a.1-3">It is possible to address these issues.  For example, the Catnap
        Query Language <xref target="CQL" format="default" sectionFormat="of" derivedContent="CQL"/> is a comprehensive expression
        language that can be used to customize the JSON response of a RESTful
        web service.  Application of CQL to RDAP responses would explicitly
        identify the output fields that would be acceptable when a few fields
        are requested but it would become very complicated when processing a
        larger number of fields.  In the following, two CQL expressions for a
        domain search query are shown (<xref target="cql-example" format="default" sectionFormat="of" derivedContent="Figure 4"/>).  In the
        first, only objectClassName and ldhName are requested.  In the second,
        the fields of a possible WHOIS-like response are listed.</t>
        <figure anchor="cql-example" align="left" suppress-title="false" pn="figure-4">
          <name slugifiedName="name-examples-of-cql-expressions">Examples of CQL Expressions for a Domain Search Query</name>
          <sourcecode type="http-message" markers="false" pn="section-a.1-4.1">
https://example.com/rdap/domains?name=example*.com
        &amp;fields=domainSearchResults(objectClassName,ldhName)

https://example.com/rdap/domains?name=example*.com
        &amp;fields=domainSearchResults(objectClassName,ldhName,
                unicodeName,
                status,
                events(eventAction,eventDate),
                entities(objectClassName,handle,roles),
                nameservers(objectClassName,ldhName))

</sourcecode>
        </figure>
        <t indent="0" pn="section-a.1-5">The field set approach seems to facilitate RDAP interoperability.
        Servers can define basic field sets that, if known to clients, can
        increase the probability of obtaining a valid response.  The usage of
        field sets makes the query string less complex.  Moreover, the
        definition of predefined sets of fields makes it easier to establish
        result limits.</t>
        <t indent="0" pn="section-a.1-6">Finally, considering that there is no real need for RDAP users to
        have the maximum flexibility in defining all the possible sets of
        logically connected fields (e.g., users interested in domains usually
        need to know the status, the creation date, and the expiry date of
        each domain), the field set approach is preferred.</t>
      </section>
    </section>
    <section numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.b-1">The authors would like to acknowledge <contact fullname="Scott Hollenbeck"/>, <contact fullname="Tom Harrison"/>, <contact fullname="Karl Heinz Wolf"/>, <contact fullname="Jasdip Singh"/>, <contact fullname="Patrick Mevzek"/>, <contact fullname="Benjamin Kaduk"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Murray Kucherawy"/>, <contact fullname="Erik Kline"/>, and <contact fullname="Robert Wilton"/> for their contribution to this document.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Mario Loffredo" initials="M." surname="Loffredo">
        <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
        <address>
          <postal>
            <street>Via Moruzzi,1</street>
            <city>Pisa</city>
            <country>IT</country>
            <code>56124</code>
          </postal>
          <email>mario.loffredo@iit.cnr.it</email>
          <uri>https://www.iit.cnr.it</uri>
        </address>
      </author>
      <author fullname="Maurizio Martinelli" initials="M." surname="Martinelli">
        <organization showOnFrontPage="true">IIT-CNR/Registro.it</organization>
        <address>
          <postal>
            <street>Via Moruzzi,1</street>
            <city>Pisa</city>
            <country>IT</country>
            <code>56124</code>
          </postal>
          <email>maurizio.martinelli@iit.cnr.it</email>
          <uri>https://www.iit.cnr.it</uri>
        </address>
      </author>
    </section>
  </back>
</rfc>
