<?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 RFC9110 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9110.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 RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.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 RFC8288 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8288.xml">
<!ENTITY draftreversesearch PUBLIC ''
  'https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-regext-rdap-reverse-search-26.xml'>

]>
<?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-ietf-regext-rdap-rir-search-07" 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 initials="J." 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="31" month="January" year="2024" />

    <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.  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.

        </t>

        <t>
            
            While this document is in terms of RIRs and DNRs for the
            sake of consistency with earlier RDAP documents such as <xref
            target="RFC9082" /> and <xref target="RFC9083" />, the
            functionality described here may be used by any RDAP
            server operator that hosts Internet Number Resource (INR)
            objects, such as National Internet Registries (NIRs) or
            Local Internet Registries (LIRs).

        </t>

	<section anchor="conventions" numbered="true" toc="default">
            <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" format="default"/> <xref target="RFC8174"
            format="default"/> when, and only when, they appear in all
            capitals, as shown here.</t>

            <t>Indentation and whitespace in examples are provided
            only to illustrate element relationships, and are not a
            REQUIRED feature of this protocol.</t>

            <t>"..." in examples is used as shorthand for elements
            defined outside of this document.</t>
	</section>
    </section>

    <section title="Basic Searches">

        <section title="Path Segments">

            <t>

                The new resource type path segments for basic search (similar to
                the searches defined in <xref target="RFC9082" /> and <xref
                target="RFC9083" />) 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>

                A search pattern matches a value where it equals the
                string representation of the value, or where it is a
                match for the value in accordance with the partial
                string matching behaviour defined in section 4.1 of
                <xref target="RFC9082" />.

            </t>

        </section>

        <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="Relation Searches">

        <t>

            <xref target="RFC9083" /> contains example objects that
            make use of the "up" link relation in order to simplify
            the process of finding the parent object for a given
            object.  This section defines searches for finding objects
            and sets of objects with respect to their position within
            a hierarchy.

        </t>

        <section title="Path Segments">
            
            <t>

                The variables used in the path segments include:

                <list>

                    <t>&lt;relation&gt;: A relation type, as defined
                    in Section 3.2.2 of this document.</t>

                    <t>&lt;IP address&gt;: An IP address, as defined in
                    Section 3.1.1 of <xref target="RFC9082" />.</t>

                    <t>&lt;CIDR prefix&gt; The first address of a CIDR
                    block, as defined in
                    Section 3.1.1 of <xref target="RFC9082" />.</t>

                    <t>&lt;CIDR length&gt;: The prefix length for a
                    CIDR block, as defined in Section 3.1.1 of <xref
                    target="RFC9082" />.</t>

                    <t>&lt;domain name&gt;: A fully-qualified domain
                    name, as defined in Section 3.1.3 of <xref
                    target="RFC9082" />.</t>

                    <t>&lt;autonomous system number or range&gt; An
                    autonomous system number, as defined in Section
                    3.1.2 of <xref target="RFC9082" />, or two such
                    numbers separated by a single hyphen ('-',
                    US-ASCII value 0x2D), where the second number is
                    greater than the first.</t>

                </list>

            </t>

            <t>

                The new resource type path segments for relation
                search (similar to the searches defined in <xref
                target="RFC9082" /> and <xref target="RFC9083" />)
                are:

                <list>

                    <t>

                        'ips/rirSearch1/&lt;relation&gt;/&lt;IP address&gt;':
                        Used to identify an IP network search using a
                        relation and an address to match a set of
                        IP networks.

                    </t>

                    <t>

                        'ips/rirSearch1/&lt;relation&gt;/&lt;CIDR prefix&gt;/&lt;CIDR length&gt;':
                        Used to identify an IP network search using a
                        relation and a range to match a set of IP
                        networks.

                    </t>

                    <t>

                        'autnums/rirSearch1/&lt;relation&gt;/&lt;autonomous system number or range&gt;':
                        Used to identify an autonomous system number
                        search using a relation and a single ASN or an
                        ASN range to match a set of ASN objects.

                    </t>

                    <t>

                        'domains/rirSearch1/&lt;relation&gt;/&lt;domain name&gt;':
                        Used to identify a reverse domain search using
                        a relation and a reverse domain name to match
                        a set of reverse domains.

                    </t>

                </list>

            </t>

        </section>

        <section title="Relation Search">

            <t>

                Syntax: &lt;object class search path segment&gt;/rirSearch1/&lt;relation&gt;/&lt;object-value&gt;[?status=&lt;status&gt;]

            </t>

            <t>

                The relation searches defined in this document rely on
                the syntax described above.  Each search works in the
                same way for each object type.

            </t>

            <section title="Definitions">

                <t>
    
                    An Internet Number Resource (INR) object value
                    (i.e. an IP network address or range, autonomous
                    system number or number range, or reverse domain
                    name) 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 seven IP network objects:
    
                    <figure anchor="registry-objects">
                        <name>Example registry objects</name>
                        <sourcecode type="drawing"><![CDATA[
                        +--------------+
                        | 192.0.2.0/24 |
                        +--------------+
                           /        \
              +--------------+    +----------------+
              | 192.0.2.0/25 |    | 192.0.2.128/25 |
              +--------------+    +----------------+
                 /                   /          \
     +--------------+   +----------------+  +----------------+
     | 192.0.2.0/28 |   | 192.0.2.128/26 |  | 192.0.2.192/26 |
     +--------------+   +----------------+  +----------------+
        /
 +--------------+   
 | 192.0.2.0/32 |  
 +--------------+ 
]]></sourcecode>
                    </figure>
    
                    the INR object value to parent/child object
                    relationships are:
    
                </t>
    
                <table anchor="parent">
                    <name>Parent objects</name>
                    <thead>
                        <tr>
                            <th>INR object value</th>
                            <th>Parent object</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>192.0.2.0/32</td>
                            <td>192.0.2.0/28</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/28</td>
                            <td>192.0.2.0/25</td>
                        </tr>
                        <tr>
                            <td>192.0.2.64/26</td>
                            <td>192.0.2.0/25</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/26</td>
                            <td>192.0.2.128/25</td>
                        </tr>
                        <tr>
                            <td>192.0.2.192/26</td>
                            <td>192.0.2.128/25</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/25</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/25</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/24</td>
                            <td>N/A</td>
                        </tr>
                    </tbody>
                </table>
    
                <table anchor="children">
                    <name>Child objects</name>
                    <thead>
                        <tr>
                            <th>INR object value</th>
                            <th>Child objects</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>192.0.2.0/24</td>
                            <td>192.0.2.0/25, 192.0.2.128/25</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/25</td>
                            <td>192.0.2.0/28</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/25</td>
                            <td>192.0.2.128/26, 192.0.2.192/26</td>
                        </tr>
                        <tr>
                            <td>192.0.2.64/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.192/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/28</td>
                            <td>192.0.2.0/32</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/32</td>
                            <td>N/A</td>
                        </tr>
                    </tbody>
                </table>
    
                <t>
    
                    Along similar lines, each INR object value may
                    have a "top" object, being the least-specific
                    covering object that exists in the registry, and
                    one or more "bottom" objects, being the
                    most-specific objects that entirely cover the INR
                    object value when taken together.  Given the
                    registry defined in the previous paragraph, the
                    top and bottom object relationships are:
    
                </t>
    
                <table anchor="top">
                    <name>Top objects</name>
                    <thead>
                        <tr>
                            <th>INR object value</th>
                            <th>Top object</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>192.0.2.0/32</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/28</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.64/26</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/26</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.192/26</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/25</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/25</td>
                            <td>192.0.2.0/24</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/24</td>
                            <td>N/A</td>
                        </tr>
                    </tbody>
                </table>
    
                <table anchor="bottom">
                    <name>Bottom objects</name>
                    <thead>
                        <tr>
                            <th>INR object value</th>
                            <th>Bottom objects</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>192.0.2.0/24</td>
                            <td>192.0.2.0/25, 192.0.2.0/28, 192.0.2.0/32, 192.0.2.128/26, 192.0.2.192/26</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/25</td>
                            <td>192.0.2.0/25, 192.0.2.0/28, 192.0.2.0/32</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/25</td>
                            <td>192.0.2.128/26, 192.0.2.192/26</td>
                        </tr>
                        <tr>
                            <td>192.0.2.64/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.128/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.192/26</td>
                            <td>N/A</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/28</td>
                            <td>192.0.2.0/28, 192.0.2.0/32</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/31</td>
                            <td>192.0.2.0/28, 192.0.2.0/32</td>
                        </tr>
                        <tr>
                            <td>192.0.2.0/32</td>
                            <td>N/A</td>
                        </tr>
                    </tbody>
                </table>
    
                <t>
   
                    If there are no more-specific objects for a given
                    INR object value, then the set of bottom objects
                    for that INR object value will be empty.
                    192.0.2.0/32 is an example of such an INR object
                    value.

                </t>

                <t>

                    It is not necessarily the case that the bottom
                    objects for a given INR object value will be
                    disjoint.  For example, 192.0.2.0/28's bottom
                    objects are 192.0.2.0/28 and 192.0.2.0/32.
                    192.0.2.0/32 is included because it is one of the 
                    most-specific objects (i.e. an object at the bottom
                    of the object hierarchy) for 192.0.2.0/28, while
                    192.0.2.0/28 itself is included because it is the
                    most-specific object for the other addresses
                    within the range (i.e. those aside from
                    192.0.2.0/32).

                </t>

                <t>

                    The bottom objects for a given INR object value
                    may include an object that is less-specific than
                    that INR object value.  For example, 192.0.2.0/31
                    is an INR object value that has a more-specific
                    object, being 192.0.2.0/32, so the set of bottom
                    objects must include at least that object.  The
                    most-specific object that covers the residual
                    (i.e. 192.0.2.1/32) is 192.0.2.0/28, so it is
                    included in the results as well.

                </t>

            </section>

            <section title="Relations">

                <section title='"up"'>

                    <t>

                        If the server receives a search containing the
                        relation value "up", it will return the parent
                        object for the specified INR object value.  If
                        no such object exists, it will return an empty
                        search response.

                    </t>

                </section>

                <section title='"down"'>

                    <t>

                        If the server receives a search containing the
                        relation value "down", it will return the
                        child objects for the specified INR object
                        value.  If no such objects exist, it will
                        return an empty search response.  Per the
                        definitions section, this includes only
                        immediate child objects.

                    </t>

                </section>

                <section title='"top"'>

                    <t>

                        If the server receives a search containing the
                        relation value "top", it will return the top
                        object for the specified INR object value.  If
                        no such object exists, it will return an empty
                        search response.

                    </t>
                
                </section>

                <section title='"bottom"'>

                    <t>

                        If the server receives a search containing the
                        relation value "bottom", it will return the
                        bottom objects for the specified INR object
                        value.  If no such objects exist, it will
                        return an empty search response.

                    </t>
                
                </section>

            </section>

        </section>

        <section title="Status">

            <t>

                If the "status" argument is provided, then response
                processing will proceed as though all objects without
                the specified status had first been removed from the
                database.  For example, if the registry objects from
                section 3.2.1 had the following statuses:

            </t>

            <table anchor="statuses">
                <name>Statuses</name>
                <thead>
                    <tr>
                        <th>Object</th>
                        <th>Status</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>192.0.2.0/25</td>
                        <td>active</td>
                    </tr>
                    <tr>
                        <td>192.0.2.128/25</td>
                        <td>inactive</td>
                    </tr>
                    <tr>
                        <td>192.0.2.128/26</td>
                        <td>active</td>
                    </tr>
                    <tr>
                        <td>192.0.2.192/26</td>
                        <td>active</td>
                    </tr>
                </tbody>
            </table>

            <t>

                then a server receiving a "child" object query with
                the INR object value 192.0.2.0/24 and a "status"
                argument of "active" would return the objects
                192.0.2.0/25, 192.0.2.128/26, and 192.0.2.192/26.

            </t>

            <t>

                Status filtering is useful, for example, where the
                client is trying to find the delegation from an RIR to
                an RIR account holder: by using the "top" relation
                with a "status" of "active", the delegation from IANA
                to the RIR will be ignored, and the client will
                receive the delegation from the RIR to the account
                holder in the response instead.

            </t>

            <t>

                By default, any valid status value may be used for
                status filtering.  Server operators MAY opt not to
                support "status" filtering for the "down" and "bottom"
                link relations, in which case the server should
                respond with a HTTP 501 (Not Implemented) <xref
                target="RFC9110" /> response code if it receives such
                a request.  Server operators MAY also opt not to
                support "status" filtering for values other than
                "active" for the "up" and "top" link relations, in
                which case the server should respond with a HTTP 501
                (Not Implemented) <xref target="RFC9110" /> response
                code if it receives such a request.

            </t>

        </section>

        <section title="Link Relations">
            
            <t>

                Each of the relations defined in section 3.2.2 has a
                corresponding link relation that can be used for a
                link object contained within another RDAP object.
                When constructing these link objects, the server MUST
                set link targets that yield the same response as for
                the corresponding search.  The following is an elided
                example of a response that makes use of those link
                relations:

		<figure anchor="example-links">
                    <name>Example links</name>
<artwork align="center" type="ascii-art" name="" alt=""><![CDATA[
{
  "startAddress": "192.0.2.0",
  "endAddress": "192.0.2.127",
  ...
  "links": [
    ...,
    {
      "value": "https://rdap.example.com/ip/192.0.2.0/25",
      "rel": "up",
      "href": "https://rdap.example.com/ips/rirSearch1/up/192.0.2.0/25",
      "type": "application/rdap+json"
    },
    {
      "value": "https://rdap.example.com/ip/192.0.2.0/25",
      "rel": "down",
      "href": "https://rdap.example.com/ips/rirSearch1/down/192.0.2.0/25",
      "type": "application/rdap+json"
    },
    {
      "value": "https://rdap.example.com/ip/192.0.2.0/25",
      "rel": "top",
      "href": "https://rdap.example.com/ips/rirSearch1/top/192.0.2.0/25",
      "type": "application/rdap+json"
    },
    {
      "value": "https://rdap.example.com/ip/192.0.2.0/25",
      "rel": "bottom",
      "href": "https://rdap.example.com/ips/rirSearch1/bottom/192.0.2.0/25",
      "type": "application/rdap+json"
    }
  ]
}
]]></artwork>
                </figure>

                Two additional link relations are defined that
                correspond to relation searches with a "status" of
                "active": "top-active" and "up-active".  No other
                status-specific link relations are defined, because
                the only known use cases for status filtering involve
                the "top" and "up" relations and the "active" status.

            </t>

            <t>

                Since the "top" and "up" link relations resolve to a
                single object, it is possible to simply include that
                object's link in the "href" attribute in the link
                object.  The following is an elided example of a
                response that uses this approach:

		<figure anchor="example-object-links">
                    <name>Example single object links</name>
<artwork align="center" type="ascii-art" name="" alt=""><![CDATA[
{
  "startAddress": "192.0.2.0",
  "endAddress": "192.0.2.127",
  ...
  "links": [
    ...,
    {
      "value": "https://rdap.example.com/ip/192.0.2.0/25",
      "rel": "up",
      "href": "https://rdap.example.com/192.0.2.0/24",
      "type": "application/rdap+json"
    }
  ]
}
]]></artwork>
                </figure>

            </t>

            <t>

                This section mandates specific behaviour for the "up"
                link relation, but does not define that link relation
                (see <xref target="RFC8288" />).  This is acceptable,
                because this behaviour:

                <list>
                
                    <t>does not conflict with the current description
                    of the link relation; and</t>

                    <t>is not generally applicable, but instead
                    limited to the context of RDAP INR objects
                    only.</t>

                </list>

            </t>

            <t>

                Use of these link relations in responses is OPTIONAL.
                The absence in a response of a link for a specific
                relation does not necessarily mean that the
                corresponding object does not exist or that the
                corresponding search will return no results.

            </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 sections take the form of an array of object
            instances, where each instance is an appropriate object
            class for the search (i.e., a search beginning with /ips
            yields an array of IP network object instances, and a
            search beginning with /autnums yields an array of
            autonomous system number object instances).  The IP
            network object and autonomous system number object types
            are defined in sections 5.4 and 5.5 of <xref
            target="RFC9083" />.  The object instance 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>

        <t>

            The following is an elided example of a response to an IP
            network search:

            <figure anchor="ip-network-search-response">
                <name>IP network search response</name>
                <sourcecode type="drawing"><![CDATA[
{
  "rdapConformance": [ "rdap_level_0", "rirSearch1",
                       "ips", "ipSearchResults", ... ],
  ...
  "ipSearchResults": [
    {
      "objectClassName": "ip network",
      "handle": "XXXX-RIR",
      "startAddress": "192.0.2.0",
      "endAddress": "192.0.2.127",
      ...
    },
    {
      "objectClassName": "ip network",
      "handle": "YYYY-RIR",
      "startAddress": "192.0.2.0",
      "endAddress": "192.0.2.255",
      ...
    }
  ]
}
]]></sourcecode>
            </figure> 

        </t>

        <t>

            The following is an elided example of a response to an
            autonomous system number search:

            <figure anchor="asn-search-response">
                <name>ASN search response</name>
                <sourcecode type="drawing"><![CDATA[
{
  "rdapConformance": [ "rdap_level_0", "rirSearch1",
                       "autnums", "autnumSearchResults", ... ],
  ...
  "autnumSearchResults": [
    {
      "objectClassName": "autnum",
      "handle": "XXXX-RIR",
      "startAutnum": 64496,
      "endAutnum": 64496,
      ...
    },
    {
      "objectClassName": "autnum",
      "handle": "YYYY-RIR",
      "startAddress": "64497",
      "endAddress": "64497",
      ...
    }
  ]
}
]]></sourcecode>
            </figure> 

        </t>

        <t>

            Responses for relation searches for reverse domain objects
            have the same form as for a standard domain search
            response, per <xref target="RFC9083" />.

        </t>

        <t>

            If the search can be processed by the server, but there
            are no results for the search, then the server returns a
            HTTP 200 (OK) response code, with the body of the response
            containing an empty results array.

        </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.

        </t>

        <t>

            If a server receives a reverse search query with a
            searchable resource type (per the definition of that term
            in <xref target="I-D.ietf-regext-rdap-reverse-search" />)
            of "ips", then the reverse search will be performed on the
            IP network objects from its data store.  Similarly, if a
            server receives a reverse search query with a searchable
            resource type of "autnums", then the reverse search will
            be performed on the autonomous system number objects from
            its data store.

        </t>

        <t>

            Additionally, <xref target="IANA" /> includes requests to
            register new entries for IP network and autonomous system
            number searches in the RDAP Reverse Search and RDAP
            Reverse Search Mapping IANA registries.

        </t>

    </section>

    <section title="RDAP Conformance">
        <t>

            A server that supports the functionality specified in this
            document MUST include additional string literals in the
            rdapConformance array of its responses, in accordance with
            the following:

            <list>

                <t>any response that includes an IP network basic
                search link, an IP network relation search link, or an IP
                network reverse search link, includes the "rirSearch1"
                and "ips" literals;</t>

                <t>any response for an IP network basic search
                request, an IP network relation search request, or an
                IP network reverse search request includes the
                "rirSearch1", "ips", and "ipSearchResults"
                literals;</t>

                <t>any response that includes an ASN basic search
                link, an ASN relation search link, or an ASN reverse
                search link includes the "rirSearch1" and "autnums"
                literals;</t>

                <t>any response for an ASN basic search request, an
                ASN relation search request, or an ASN reverse search
                request includes the "rirSearch1", "autnums", and
                "autnumSearchResults" literals;</t>

                <t>any response that includes a domain relation search
                link includes the "rirSearch1" literal;</t>

                <t>any response for a domain relation search request
                includes the "rirSearch1" literal; and</t>

                <t>a response to a "/help" request includes the
                "rirSearch1", "ips", "ipSearchResults", "autnums", and
                "autnumSearchResults" literals.</t>

            </list>

            Although responses will generally not include all of the
            rdapConformance string literals defined in this document,
            that is not meant to imply that a server can support only
            a portion of the functionality defined in this document.

        </t>

        <t>

            The "ips", "autnums", "ipSearchResults", and
            "autnumSearchResults" extension identifiers are included
            here due to the requirements set out in  <xref
            target="RFC7480" />, <xref target="RFC9082" />, and <xref
            target="RFC9083" /> that an RDAP extension identifier be
            used as a prefix in new path segments and JSON members
            introduced by the extension, and those strings are used as
            such as part of the basic searches defined in this
            document.  Furthermore, using these strings as path
            segments helps to increase consistency among the basic
            searches for the core RDAP object types.

        </t>

        <t>

            As with the other core object classes (entity, domain, and
            nameserver), other documents may define additional reverse
            searches with IP networks and ASNs as the searchable
            resource type by registering those in the IANA RDAP
            reverse search registries.  Because a given extension
            identifier must correspond to a single extension, though,
            any document making use of IP networks or ASNs as the
            searchable resource type must also implement the
            functionality described in this document.

        </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.  Server 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, server 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">

        <section title="RDAP Extensions Registry">

            <t>

                IANA is requested to register the following values in the RDAP Extensions Registry:

            </t>

            <t>
                <list style="none">
                    <t>Extension identifier: rirSearch1</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 INR-specific search operations.</t>
                </list>
            </t>

            <t>
                <list style="none">
                    <t>Extension identifier: ips</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 INR-specific search operations.</t>
                </list>
            </t>

            <t>
                <list style="none">
                    <t>Extension identifier: autnums</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 INR-specific search operations.</t>
                </list>
            </t>

            <t>
                <list style="none">
                    <t>Extension identifier: ipSearchResults</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 INR-specific search operations.</t>
                </list>
            </t>

            <t>
                <list style="none">
                    <t>Extension identifier: autnumSearchResults</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 INR-specific search operations.</t>
                </list>
            </t>

        </section>

        <section title="Link Relations Registry">

            <t>

                IANA is requested to register the following values in the Link Relations Registry:

            </t>

            <t>
                <list style="none">
                    <t>Relation Name:  up-active</t>
                    <t>Description:  Refers to an RDAP parent document that has a status of "active" in a hierarchy of documents.</t>
                    <t>Reference: [this document]</t>
                </list>

                <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>

                <list style="none">
                    <t>Relation Name:  top</t>
                    <t>Description:  Refers to the topmost parent document in a hierarchy of documents.</t>
                    <t>Reference: [this document]</t>
                </list>

                <list style="none">
                    <t>Relation Name:  top-active</t>
                    <t>Description:  Refers to the topmost RDAP parent document that has a status of "active" in a hierarchy of documents.</t>
                    <t>Reference: [this document]</t>
                </list>

                <list style="none">
                    <t>Relation Name:  bottom</t>
                    <t>Description:  Refers to the set of child documents that do not themselves have child documents, in a hierarchy of documents.</t>
                    <t>Reference: [this document]</t>
                </list>
            </t>

        </section>

        <section title="RDAP Reverse Search Registry">

            <t>

                IANA is requested to register the following entries in the "RDAP Reverse Search" registry:

            </t>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">fn</t>
                <t hangText="Description:">The server supports the IP/autnum search based on the full name (a.k.a formatted name) of an associated entity.</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">handle</t>
                <t hangText="Description:">The server supports the IP/autnum search based on the handle of an associated entity.</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">email</t>
                <t hangText="Description:">The server supports the IP/autnum search based on the email address of an associated entity.</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">role</t>
                <t hangText="Description:">The server supports the IP/autnum search based on the role of an associated entity.</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

        </section>

        <section title="RDAP Reverse Search Mapping Registry">

            <t>

                IANA is requested to register the following entries
                in the "RDAP Reverse Search Mapping" registry:

            </t>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">fn</t>
                <t hangText="Property Path:">$..entities[*].vcardArray[1][?(@[0]=='fn')][3]</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">handle</t>
                <t hangText="Property Path:">$..entities[*].handle</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">email</t>
                <t hangText="Property Path:">$..entities[*].vcardArray[1][?(@[0]=='email')][3]</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

            <list style="hanging">
                <t hangText="Searchable Resource Type:">ips, autnums</t>
                <t hangText="Related Resource Type:">entity</t>
                <t hangText="Property:">role</t>
                <t hangText="Property Path:">$..entities[*].roles</t>
                <t hangText="Registrant Name:">IETF</t>
                <t hangText="Registrant Contact Information:">iesg@ietf.org</t>
                <t hangText="Reference:">This document.</t>
            </list>

        </section>

    </section>

    <section anchor="implementation-status">
      <name>Implementation Status</name>

      <aside>
        <t>Note to the RFC Editor - remove this section before publication, as
  well as the reference to RFC 7942.</t>
      </aside>

      <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 catalogue of available implementations or their
features.  Readers are advised to note that other implementations may
exist.</t>

      <t>According to <xref target="RFC7942"/>, "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="apnic-rdap-implementation" title="APNIC RDAP Implementation">
        <t><list style="none">
          <t>Responsible Organization: Asia-Pacific Network Information Centre (APNIC)<vspace blankLines='1' /></t>
          <t>Location: https://github.com/APNIC-net/rdap-rmp-demo/tree/rir-search<vspace blankLines='1' /></t>
          <t>Description: This implementation includes support for the various searches and responses described in this document.<vspace blankLines='1' /></t>
          <t>Level of Maturity: This is a proof-of-concept implementation.<vspace blankLines='1' /></t>
          <t>Coverage: This implementation includes all of the features described in this
          specification.<vspace blankLines='1' /></t>
          <t>Contact Information: Tom Harrison, tomh@apnic.net</t>
        </list></t>
      </section>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
        <t>

            The authors wish to thank Mario Loffredo, Andy Newton,
            Antoin Verschuren, and James Gould for document review and
            associated comments.

        </t>
    </section>

  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC9110;
      &RFC7481;
      &RFC9082;
      &RFC9083;
      &RFC8174;
      &draftreversesearch;
    </references>

    <references title="Informative References">
      &RFC6973;
      &RFC7480;
      &RFC7942;
      &RFC8288;
    </references>
  </back>
</rfc>
