<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd"
[
  <!ENTITY RFC2119 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
  <!ENTITY RFC3912 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3912.xml'>
  <!ENTITY RFC4648 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml'>
  <!ENTITY RFC5730 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5730.xml'>
  <!ENTITY RFC6350 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6350.xml'>
  <!ENTITY RFC7095 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7095.xml'>
  <!ENTITY RFC7230 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml'>
  <!ENTITY RFC7480 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7480.xml'>
  <!ENTITY RFC7481 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7481.xml'>
  <!ENTITY RFC7482 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7482.xml'>
  <!ENTITY RFC7483 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7483.xml'>
  <!ENTITY RFC7942 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml'>
  <!ENTITY RFC8174 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml'>
  <!ENTITY RFC8605 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8605.xml'>
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc compact="yes"?>
<?rfc subcompact="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc iprnotified="no"?>

<rfc category="std" docName="draft-ietf-regext-rdap-reverse-search-05" ipr="trust200902">
  <front>
    <title abbrev="RDAP Reverse search">Registration Data Access Protocol (RDAP) Reverse search capabilities</title>
       
    <author fullname="Mario Loffredo" initials="M." surname="Loffredo">
      <organization>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>http://www.iit.cnr.it</uri>
      </address>
    </author>

    <author fullname="Maurizio Martinelli" initials="M." surname="Martinelli">
      <organization>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>http://www.iit.cnr.it</uri>
      </address>
    </author>

    <date/>
    <area>Applications and Real-Time</area>
    <workgroup>Registration Protocols Extensions</workgroup>
    <keyword>RDAP</keyword>
    <keyword>Reverse search</keyword>

      <abstract>
          <t>The Registration Data Access Protocol (RDAP) does not include query capabilities to find the list of domains related to a set of entities matching a given search pattern.  In the RDAP context, an entity can be associated to any defined object class.  Therefore, a reverse search can be applied to other use cases than the classic domain-entity scenario.  This document describes RDAP query extensions that allow servers to provide a reverse search feature based on the relationship between any searchable object and the related entities.</t>
      </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Reverse Whois is a service provided by many web applications that allow users to find domain names owned by an individual or a company starting from the owner's details, such as name and email.  Even if it has been considered useful for some legal purposes (e.g. uncovering trademark infringements, detecting cybercrime cases), its availability as a standardized Whois capability has been objected for two main reasons, which now don't seem to conflict with an RDAP implementation.</t>
      
      <t>The first objection has been caused by the potential risks of privacy violation.  However, TLDs community is considering a new generation of Registration Directory Services <xref target="ICANN-RDS1"/> <xref target="ICANN-RDS2"/> <xref target="ICANN-RA"/>, which provide access to sensitive data under some permissible purposes and according to adequate policies to enforce the requestor accreditation, authentication, authorization, and terms and conditions of data use.  It is well known that such security policies are not implemented in Whois <xref target="RFC3912"/>, while they are in RDAP <xref target="RFC7481"/>.  Therefore, RDAP permits a reverse search implementation complying with privacy protection principles.</t>

      <t>Another objection to the implementation of a reverse search capability has been connected with its impact on server processing.  Since RDAP supports search queries, the impact of both standard and reverse searches is equivalent and can be mitigated by servers adopting ad hoc strategies.  Furthermore, the reverse search is almost always performed by specifying an entity role (e.g. registrant, technical contact) and this can contribute to restricting the result set.</t>

      <t>Reverse searches, such as finding the list of domain names associated with contacts or nameservers may be useful to registrars as well.  Usually, registries adopt out-of-band solutions to provide results to registrars asking for reverse searches on their domains.  Possible reasons for such requests are:</t>

        <t><list style="symbols">
	  <t>the loss of synchronization between the registrar database and the registry database;<vspace blankLines='1' /></t>
	  <t>the need for such data to perform massive EPP <xref target="RFC5730"/> updates (e.g. changing the contacts of a set of domains, etc.).</t>
	</list></t>

      <t>Currently, RDAP does not provide any way for a client to search for the collection of domains associated with an entity <xref target="RFC7482"/>.  A query (lookup or search) on domains can return the array of entities related to a domain with different roles (registrant, registrar, administrative, technical, reseller, etc.), but the reverse operation is not allowed.  Only reverse searches to find the collection of domains related to a nameserver (ldhName or ip) can be requested.  Since an entity can be in relationship with any RDAP object <xref target="RFC7483"/>, the availability of a reverse search can be common to all resource type path segments defined for search.</t>
   
      <t>The protocol described in this specification aims to extend the RDAP query capabilities to enable the reverse search based on the relationship between any object and the associated entities.  The extension is implemented by adding new path segments (i.e. search paths) and using a RESTful web service <xref target="REST"/>.  The service is implemented using the Hypertext Transfer Protocol (HTTP) <xref target="RFC7230"/> and the conventions described in <xref target="RFC7480"/>.</t>

        <section title="Conventions Used in This Document">
            <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>

      <section anchor="rdap-path-segment-specification" title="RDAP Path Segment Specification">

        <t>The new search paths are OPTIONAL extensions of those defined in <xref target="RFC7482"/>.  A generic reverse search path is described by the syntax:</t>

	       <t>{resource-type}/reverse/{role}?{property}=&lt;search pattern&gt;</t>

        <t>The path segments are defined as in the following:</t>
        <t><list style="symbols">
            <t>resource-type: it MUST be one of resource type path segments defined in Section 3.2 of <xref target="RFC7482"/>: &quot;domains&quot;, &quot;nameservers&quot; or &quot;entities&quot;;<vspace blankLines='1' /></t>
            <t>role: it MUST be one of the roles described in Section 10.2.4 of <xref target="RFC7483"/>.  For role independent reverse searches, the value &quot;entity&quot; MUST be used;<vspace blankLines='1' /></t>
            <t>property: it identifies the entity property to be used in matching the search pattern.  A pre-defined list of properties includes: fn, handle, email, city, country, cc.  The mapping between such properties and the RDAP properties is shown in <xref target="table_reverse_search_properties"/>.  Some of the properties are related to jCard elements <xref target="RFC7095"/> but, being jCard the JSON format for vCard <xref target="RFC6350"/>, the corresponding definitions are included in vCard specification.  Servers MAY implement additional properties to those defined in this document.</t>
        </list></t>
          <t>Partial string matching is allowed as defined in section 4.1 of <xref target="RFC7482"/>.</t>

      <texttable anchor="table_reverse_search_properties" title="Mapping between the reverse search properties and the RDAP properties">
          <ttcol align="left">Reverse search property</ttcol>
          <ttcol align="left">RDAP property</ttcol>
          <ttcol align="left">RFC 7483</ttcol>
          <ttcol align="left">RFC 6350</ttcol>
          <ttcol align="left">RFC 8605</ttcol>
          <c>handle</c><c>handle</c><c>5.1.</c><c></c><c></c>
          <c>fn</c><c>jCard fn</c><c></c><c>6.2.1</c><c></c>
          <c>email</c><c>jCard email</c><c></c><c>6.4.2</c><c></c>
          <c>city</c><c>locality in jCard adr</c><c></c><c>6.3.1</c><c></c>
          <c>country</c><c>country name in jCard adr</c><c></c><c>6.3.1</c><c></c>
          <c>cc</c><c>country code in jCard adr</c><c></c><c></c><c>3.1</c>
      </texttable>


       <figure anchor="reverse-search-request" title="Examples of reverse search queries">
        <artwork xml:space="preserve"><![CDATA[

      https://example.com/rdap/domains/reverse/technical?handle=CID-40*

      https://example.com/rdap/domains/reverse/registrant?fn=Bobby*

      https://example.com/rdap/domains/reverse/registrant?cc=US

      https://example.com/rdap/entites/reverse/registrar?handle=RegistrarX
        ]]></artwork>
       </figure>

      <t>The &quot;country&quot; property can be used as an alternative to &quot;cc&quot; when RDAP servers don't include the jCard &quot;cc&quot; parameter <xref target="RFC8605"/> in their response.</t>
      </section>


      <section anchor="rdap-conformance" title="RDAP Conformance">
          <t>Servers complying with this specification MUST include the value &quot;reverse_search&quot; in the rdapConformance property of the help response <xref target="RFC7483"/>.  The information needed to register this value in the &quot;RDAP Extensions&quot; registry is described in <xref target="IANA-considerations"/>.</t>
      </section>

      <section anchor="impl-considerations" title="Implementation Considerations">
       <t>The implementation of the proposed extension is technically feasible.  Both handle and fn are used as standard path segments to search for entities <xref target="RFC7482"/>.  With regards to the other reverse search properties, namely email, city and country code, the impact of their usage on server processing is evaluated to be the same as other existing query capabilities (e.g. wildcard prefixed search pattern) so the risks to degrade the performance or to generate huge result sets can be mitigated by adopting the same policies (e.g. restricting the search functionality, limiting the rate of search requests according to the user profile, truncating and paging the results, returning partial responses).</t>
    </section>


    <section anchor="impl-status" title="Implementation Status">
      <t>NOTE: Please remove this section and the reference to RFC 7942 prior to publication as an RFC.</t>
      
      <t>This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in <xref target="RFC7942"/>.  The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs.  Please note that the listing of any individual implementation here does not imply endorsement by the IETF.  Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors.  This is not intended as, and must not be construed to be, a catalog of available implementations or their features.  Readers are advised to note that other implementations may exist.</t>
      
      <t>According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.  It is up to the individual working groups to use this information as they see fit".</t>
      
      <section anchor="iit-cnr-registro-it" title="IIT-CNR/Registro.it">
        <t><list style="none">
	  <t>Responsible Organization: Institute of Informatics and Telematics of National Research Council (IIT-CNR)/Registro.it</t>
	  <t>Location: https://rdap.pubtest.nic.it/</t>
	  <t>Description: This implementation includes support for RDAP queries using data from the public test environment of .it ccTLD.</t>
	  <t>Level of Maturity: This is a "proof of concept" research implementation.</t>
	  <t>Coverage: This implementation includes all of the features described in this specification.</t>
	  <t>Contact Information: Mario Loffredo, mario.loffredo@iit.cnr.it</t>
	</list></t>
      </section>
    </section>

      <section anchor="IANA-considerations" title="IANA Considerations">
          <t>IANA is requested to register the following value in the RDAP Extensions Registry:</t>

          <t><list style="none">
              <t>Extension identifier: reverse_search</t>
              <t>Registry operator: Any</t>
              <t>Published specification: This document.</t>
              <t>Contact: IETF &lt;iesg@ietf.org&gt;</t>
              <t>Intended usage: This extension describes reverse search query patterns for RDAP.</t>
          </list></t>

      </section>

      <section anchor="privacy-considerations" title="Privacy Considerations">
      <t>The use of the capability described in this document MUST be compliant with the rules about privacy protection each RDAP provider is subject to.  Sensitive registration data MUST be protected and accessible for permissible purposes only.  Therefore, RDAP servers MUST provide reverse search only to those requestors who are authorized according to a lawful basis.  Some potential users of this capability include registrars searching for their own domains and operators in the exercise of an official authority or performing a specific task in the public interest that is set out in a law.  Another scenario consists of permitting reverse searches, which take into account only those entities that have previously given the explicit consent for publishing and processing their personal data.</t>
   </section>

   <section anchor="security-considerations" title="Security Considerations">
      <t>Security services required to provide controlled access to the operations specified in this document are described in <xref target="RFC7481"/>.</t>
      <t>The specification of the entity role within the reverse search path allows the RDAP servers to implement different authorization policies on a per-role basis.</t>
   </section>

    <section title="Acknowledgements">
      <t>The authors would like to acknowledge Tom Harrison, Scott Hollenbeck, Francisco Arias, Gustavo Lozano and Eduardo Alvarez for their contribution to this document.</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC3912;
      &RFC5730;
      &RFC6350;
      &RFC7095;
      &RFC7230;
      &RFC7480;
      &RFC7481;
      &RFC7482;
      &RFC7483;
      &RFC7942;
      &RFC8174;
      &RFC8605;
    </references>
    
    <references title="Informative References">
        <reference anchor='ICANN-RA' target='https://newgtlds.icann.org/sites/default/files/agreements/agreement-approved-31jul17-en.pdf'>
		<front>
		<title>Registry Agreement</title>
		<author>
		<organization>Internet Corporation For Assigned Names and Numbers</organization>		
		</author>
		<date year='2017' month='July' />		
		</front>
	</reference>
        <reference anchor='ICANN-RDS1' target='https://www.icann.org/en/system/files/files/final-report-06jun14-en.pdf'>
		<front>
		<title>Final Report from the Expert Working Group on gTLD Directory Services: A Next-Generation Registration Directory Service (RDS)</title>
		<author>
		<organization>Internet Corporation For Assigned Names and Numbers</organization>		
		</author>
		<date year='2014' month='June' />		
		</front>
	</reference>
        <reference anchor='ICANN-RDS2' target='http://whois.icann.org/sites/default/files/files/final-issue-report-next-generation-rds-07oct15-en.pdf'>
		<front>
		<title>Final Issue Report on a Next-Generation gTLD RDS to Replace WHOIS</title>
		<author>
		<organization>Internet Corporation For Assigned Names and Numbers</organization>		
		</author>
		<date year='2015' month='October' />		
		</front>
	</reference>
        <reference anchor='REST' target='http://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf'>
            <front>
                <title>Architectural Styles and the Design of Network-based Software Architectures</title>
                <author initials='R.' surname='Fielding' fullname='Roy Thomas Fielding'>
                    <organization>PH.D. DISSERTATION, UNIVERSITY OF CALIFORNIA, IRVINE</organization>
                </author>
                <date year='2000'/>
            </front>
        </reference>
    </references>
    <section title="Change Log">
      <t>
        <list style="hanging">
          <t hangText="00:">Initial working group version ported from draft-loffredo-regext-rdap-reverse-search-04</t>
		<t hangText="01:">Updated &quot;Privacy Considerations&quot; section.</t>
           <t hangText="02:">Revised the text.</t>
           <t hangText="03:">Refactored the query model.</t>
           <t hangText="04:">Keepalive refresh.</t>
           <t hangText="05:">Reorganized "Abstract".  Corrected "Conventions Used in This Document" section.  Added &quot;RDAP Conformance&quot; section.  Changed &quot;IANA Considerations&quot; section.  Added references to RFC7095 and RFC8174.  Other minor edits.</t>
        </list>
      </t>
    </section>

  </back>
</rfc>
