<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6973 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6973.xml">
<!ENTITY RFC7481 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7481.xml">
<!ENTITY RFC7480 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7480.xml">
<!ENTITY RFC9082 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9082.xml">
<!ENTITY RFC9083 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9083.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY draftreversesearch PUBLIC ''
  'https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-regext-rdap-reverse-search-14.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 category="std" docName="draft-harrison-regext-rdap-rir-search-00" ipr="trust200902">

  <front>
    <title abbrev="RDAP RIR Search">RDAP RIR Search</title>

    <author initials="T." surname="Harrison" fullname="Tom Harrison">
	<organization abbrev="APNIC">Asia Pacific Network Information Centre</organization>
        <address>
            <postal>
                <street>6 Cordelia St</street>
                <city>South Brisbane</city>
                <code>4101</code>
                <country>Australia</country>
                <region>QLD</region>
            </postal>
            <email>tomh@apnic.net</email>
        </address>
    </author>

    <author fullname="Jasdip Singh" surname="Singh">
	<organization abbrev="ARIN">American Registry for Internet Numbers</organization>

	<address>
	    <postal>
		<street>PO Box 232290</street>
		<city>Centreville</city>
		<region>VA</region>
		<code>20120</code>
		<country>United States of America</country>
	    </postal>
	    <email>jasdips@arin.net</email>
	</address>
    </author>

    <date day="6" month="October" year="2022" />

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>template</keyword>
    <abstract>
        <t>

            The Registration Data Access Protocol (RDAP) is used by
            Regional Internet Registries (RIRs) and Domain Name
            Registries (DNRs) to provide access to their resource
            registration information.  The core specifications for
            RDAP define basic search functionality, but there are
            various IP and ASN-related search options provided by RIRs
            via their Whois services for which there is no
            corresponding RDAP functionality.  This document extends
            RDAP to support those search options.

        </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
        <t>

            The <xref target="RFC7480">Registration Data Access
            Protocol (RDAP)</xref> is used by Regional Internet
            Registries (RIRs) and Domain Name Registries (DNRs) to
            provide access to their resource registration information.
            The core specifications for RDAP define basic search
            functionality, but this is limited to domains,
            nameservers, and entities.  No searches were defined for
            IP networks or autonomous system numbers.

        </t>

        <t>

            In an effort to have RDAP reach feature parity with the
            existing RIR Whois services in this respect, this document
            defines additional search options for IP networks and
            autonomous system numbers, along with an additional link
            relation for finding more-specific resources.

        </t>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119" /> <xref target="RFC8174"/>.</t>
      </section>
    </section>

    <section title="Search Path Segment Specification">

        <t>

            The new resource type path segments for search are:

            <list>
            
                <t>

                    'ips': Used to identify an IP network search using
                    a pattern to match one of a set of IP network
                    attributes.

                </t>

                <t>

                    'autnums': Used to identify an Autonomous System
                    number search using a pattern to match one of a
                    set of Autonomous System number attributes.

                </t>

            </list>

        </t>

        <t>

            Search path segments are formed using the same logic as in
            section 3.2 of <xref target="RFC9082" />.

        </t>

        <section title="IP Network Search">
            
            <t>

                Syntax: ips?handle=&lt;handle search pattern&gt;

            </t>


            <t>

                Syntax: ips?name=&lt;name search pattern&gt;

            </t>

            <t>

                Searches for IP network information by handle are
                specified using the form:

            </t>

            <t>

                ips?handle=XXXX

            </t>

            <t>

                XXXX is a search pattern representing an IP network
                identifier, the syntax for which is specific to the
                registration provider.  The following URL would be
                used to find information for IP networks with handles matching
                the "NET-199*" pattern:

            </t>

            <t>

                https://example.com/rdap/ips?handle=NET-199*

            </t>

            <t>

                Searches for IP network information by name are
                specified using the form:

            </t>

            <t>

                ips?name=XXXX

            </t>

            <t>

                XXXX is a search pattern representing an IP network
                identifier that is assigned to the network
                registration by the registration holder.  The
                following URL would be used to find information for IP
                networks with names matching the "NET-EXAMPLE-*" pattern:

            </t>

            <t>

                https://example.com/rdap/ips?name=NET-EXAMPLE-*

            </t>

        </section>

        <section title="Autonomous System Number Search">
            
            <t>

                Syntax: autnums?handle=&lt;handle search pattern&gt;

            </t>


            <t>

                Syntax: autnums?name=&lt;name search pattern&gt;

            </t>

            <t>

                Searches for autonomous system number information by
                handle are specified using the form:

            </t>

            <t>

                autnums?handle=XXXX

            </t>

            <t>

                XXXX is a search pattern representing an autonomous
                system number identifier, the syntax for which is
                specific to the registration provider.  The following
                URL would be used to find information for autonomous
                system numbers with handles matching the "AS1*" pattern:

            </t>

            <t>

                https://example.com/rdap/autnums?handle=AS1*

            </t>

            <t>

                Searches for autonomous system number information by
                name are specified using the form:

            </t>

            <t>

                autnums?name=XXXX

            </t>

            <t>

                XXXX is a search pattern representing an autonomous
                system number identifier that is assigned to the
                autonomous system number registration by the
                registration holder.  The following URL would be used
                to find information for autonomous system numbers with
                names matching the "ASN-EXAMPLE-*" pattern:

            </t>

            <t>

                https://example.com/rdap/autnums?name=ASN-EXAMPLE-*

            </t>

        </section>

    </section>
    
    <section title="Responding To Searches">

        <t>

            As with <xref target="RFC9083" />, responses to the IP
            network and autonomous system number searches defined in
            the previous section take the form of an array of object
            instances, where each instance is an appropriate object
            class for the search (i.e., a search for /ips yields an
            array of IP network object instances, and a search for
            /autnums yields an array of autonomous system number
            object instances).  These arrays are contained within the
            response object.

        </t>

        <t>
   
            The names of the arrays are as follows:

            <list>
                <t>
                    
                    for /ips searches, the array is "ipSearchResults"; and

                </t>

                <t>

                    for /autnums searches, the array is "autnumSearchResults".

                </t>
            </list>

        </t>

    </section>

    <section title="Link Relations">

        <t>

            An IP network, autonomous system number, or reverse domain
            object may have a 'parent' object and one or more 'child'
            objects.  The 'parent' object is the next-least-specific
            object that exists in the relevant registry, while the
            'child' objects are the next-most-specific objects that
            exist in the relevant registry.  For example, for a
            registry with the following four IP network objects:

            <list>
                <t>

                    192.0.2.0/24

                </t>

                <t>

                    192.0.2.0/25

                </t>

                <t>

                    192.0.2.128/25

                </t>

                <t>

                    192.0.2.0/32

                </t>
            </list>

            the parent object of 192.0.2.0/32 would be 192.0.2.0/25,
            the parent object of 192.0.2.128/25 would be 192.0.2.0/24,
            the parent object of 192.0.2.0/25 would be 192.0.2.0/24,
            and 192.0.2.0/24 would have no parent object.  Conversely,
            the child objects for 192.0.2.0/24 would be 192.0.2.0/25
            and 192.0.2.128/25, for 192.0.2.0/25 192.0.2.0/32, and for
            192.0.2.128/25 and 192.0.2.0/32 there would be no child
            objects.

        </t>

        <t>
            
            In order to permit clients to locate the parent object for
            a given object, an operator MAY include a link using the
            "up" link relation that links to the parent object.
            Similarly, in order to permit clients to locate the child
            objects for a given object, an operator MAY include a link
            using the "down" link relation that when resolved, returns
            a response that has the same format as a search for the
            relevant object type containing all of the child objects
            for that object.  For example:

<artwork align="center" type="ascii-art" name="" alt=""><![CDATA[
{
  ...
  "links": [
    ...,
    {
      "value": "http://rdap.example.com/ip/192.0.2.0/25",
      "rel": "up",
      "href": "http://rdap.example.com/ip/192.0.2.0/24",
      "type": "application/rdap+json"
    },
    {
      "value": "http://rdap.example.com/ip/192.0.2.0/25",
      "rel": "down",
      "href": "http://rdap.example.com/ip-down/192.0.2.0/25",
      "type": "application/rdap+json"
    }
  ]
}
  ]]></artwork>

            In the example above, the link target for the link with
            the "down" relation is
            "http://rdap.example.com/ip-down/192.0.2.0/25".  However,
            the link structure used by a server for these links is not
            defined by this specification, and clients MUST NOT make
            inferences about supported behaviour by inspecting the
            structure of these links.

        </t>

    </section>

    <section title="Reverse Search">

        <t>

            RDAP reverse search is defined by <xref
            target="I-D.ietf-regext-rdap-reverse-search" />.  That
            document limits reverse search to domains, nameservers,
            and entities.  This document extends reverse search to
            cover IP networks and autonomous system numbers as well,
            by incorporating the text from section 2 and additionally
            permitting "searchable-resource-type" to be "ips" or
            "autnums".

        </t>

    </section>

    <section title="RDAP Conformance">
        <t>

            A server that supports all of the functionality specified
            in this document MUST include the string literal
            "rir_search" in the rdapConformance array in their
            response objects.

        </t>
    </section>

    <section title="Privacy Considerations">

        <t>

            The search functionality defined in this document may
            affect the privacy of entities in the registry (and
            elsewhere) in various ways: see <xref target="RFC6973" />
            for a general treatment of privacy in protocol
            specifications.  Registry operators should be aware of the
            tradeoffs that result from implementation of this
            functionality.

        </t>

        <t>

            Many jurisdictions have laws or regulations that restrict
            the use of "Personal Data", per the definition in <xref
            target="RFC6973" />.  Given that, registry operators
            should ascertain whether the regulatory environment in
            which they operate permits implementation of the
            functionality defined in this document.
        
        </t>

    </section>

    <section title="Security Considerations">
        <t>

            <xref target="RFC7481" /> describes security requirements
            and considerations for RDAP generally.

        </t>
    </section>

    <section anchor="IANA" 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: rir_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 identifier is used for RIR-specific search operations.</t>
            </list>
        </t>

        <t>

            IANA is also requested to register the following value in
            the Link Relations Registry:

        </t>

        <t>
            <list style="none">
                <t>Relation Name:  down</t>
                <t>Description:  Refers to a set of child documents in a hierarchy of documents.</t>
                <t>Reference: [this document]</t>
            </list>
        </t>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
        <t>

            TBD

        </t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC7481;
      &RFC9082;
      &RFC9083;
      &RFC8174;
      &draftreversesearch;
    </references>

    <references title="Informative References">
      &RFC6973;
      &RFC7480;
    </references>
  </back>
</rfc>
