Registration Protocols Extensions M. Loffredo
Internet-Draft M. Martinelli
Intended status: Standards Track IIT-CNR/
Expires: November 26, 2017 S. Hollenbeck
Verisign Labs
May 25, 2017

Registration Data Access Protocol (RDAP) Query Parameters for Result Sorting and Paging


The Registration Data Access Protocol (RDAP) does not include core functionality for clients to provide sorting and paging (subsetting) parameters for control of large result sets. This omission can lead to unpredictable server processing of queries and client processing of responses. This unpredictability can be greatly reduced if clients can provide servers with their preferences for managing response values. This document describes RDAP query extensions that allow clients to specify their preferences for sorting and paging result sets.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on November 26, 2017.

Copyright Notice

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ( in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

Table of Contents

1. Introduction

The availability of functionality for result sorting and paging provides benefits to both clients and servers in the implementation of RESTful services [REST]. These benefits include:

Approaches to implementing features for result sorting and paging can be grouped into two main categories:

  1. Sorting and paging are implemented through the introduction of additional parameters in the query string (i.e. ODATA protocol [OData-Part1]);
  2. Information related to the number of results and the specific portion of the result set to be returned, in addition to a set of ready-made links for the result set scrolling, are inserted in the HTTP header of the request/response.

However, there are some drawbacks associated with use of the HTTP header. First, the header properties cannot be set directly from a web browser. Moreover, in an HTTP session, the information on the status (i.e. the session identifier) is usually inserted in the header or in the cookies, while the information on the resource identification or the search type is included in the query string. The second approach is therefore not compliant with the HTTP standard [RFC2616]. As a result, this document describes a specification based on use of query parameters.

Currently the RDAP protocol [RFC7482] defines two query types:

While the lookup query does not produce issues in the management of large result sets, the search query can potentially generate a large result set that could be truncated according to the limits of the server. In addition, it is not possible to obtain the total number of the objects found that might be returned in a search query response [RFC7483]. Lastly, there is no mechanism to specify sort criteria to return the most relevant objects at the beginning of the result set.

The protocol described in this specification extends RDAP query capabilities to enable result sorting and paging, by adding four new query parameters that can be applied to RDAP search path segments. The service is implemented using the Hypertext Transfer Protocol (HTTP) [RFC7230] and the conventions described in RFC 7480 [RFC7480].

The implementation of these parameters is technically feasible, as operators for counting, sorting and paging rows are currently supported by the major RDBMSs. Impact on the current state of RDAP implementation is estimated to be quite low.

1.1. Conventions Used in This Document

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 [RFC2119].

2. RDAP Query Parameter Specification

These new query parameters are OPTIONAL extensions of path segments defined in RFC 7482 [RFC7482]. The query parameters are as follows:

Augmented Backus-Naur Form (ABNF) [RFC5234] is used in the following sections to describe the formal syntax of these new parameters.

FOR DISCUSSION: Do we need to describe value constraints, error conditions and returned error codes relative to the paging parameters?

2.1. "count" parameter

Currently the RDAP protocol does not allow a client to determine the total number of the results in a query response when the result set is truncated. This is rather inefficient because the user cannot evaluate the query precision and, at the same time, cannot receive information that could be relevant.

The new parameter "count" provides additional functionality (Figure 1) that allows a client to request information from the server that specifies the number of elements found to match a particular search pattern.

Figure 1: Example of RDAP query reporting the count parameter

The ABNF syntax is the following:

A trueValue means that the server MUST provide the total number of the objects in the paging_count property of the response (Figure 2). A falseValue means that the server MUST NOT provide this number.

  "rdapConformance": [
  "domainSearchResults": [

Figure 2: Example of RDAP response with paging_count property

2.2. "sortby" parameter

The RDAP protocol does not provide any capability to specify response value sort criteria. A server could implement a default sorting scheme according to the object class, but this feature is not mandatory and might not meet user requirements. Sorting can be addressed by the client, but this solution is rather inefficient. Sorting and paging using features provided by the DBMS used by the RDAP server could help avoid truncation of relevant results and allow for scrolling the result set using subsequent queries.

The "sortby" parameter allows the client to ask the server to sort the results according to the values of one or more properties and according to the sort direction of each property. The ABNF syntax is the following:

  • sortby = "sortby" EQ sortbyItem *( "," sortbyItem )
  • sortbyItem = property-ref [":" ( "a" / "d" ) ]

"a" means that the ascending sort MUST be applied, "d" means that the descending sort MUST be applied. If the sort direction is absent, an ascending sort MUST be applied (Figure 3).

In the sortby ABNF syntax, property-ref represents a reference to a property of an RDAP object. Such a reference could be expressed by using a JSON Path. The JSON Path in a JSON document [RFC7159] is equivalent to the XPath [W3C.CR-xpath-31-20161213] in a XML document. For example, the JSON Path to select the value of the ldhName property inside an RDAP domain object is "$.ldhName", where $ identifies the root of the document (DOM). Another way to select a value inside a JSON document is the JSON Pointer [RFC6901]. While JSON Path or JSON Pointer are both standard ways to select any value inside JSON data, neither is particularly easy to use (e.g. "$.events[?(@.eventAction='registration')].eventDate" is the JSON Path expression of the registration date in a RDAP domain object).

Therefore, this specification provides a definition of property-ref in terms of RDAP properties. However, not all the RDAP properties are suitable to be used in sort criteria, such as:

  • properties providing service information (e.g. links, notices, remarks, etc.);
  • multivalued properties (e.g. status, roles, variants, etc.);
  • properties modeling relationships to other objects (e.g. entities).

On the contrary, some properties expressed as values of other properties (e.g. registration date) could be used in such a context.

In the following, a list of the proposed properties for sort criteria is presented. The properties are divided in two groups, object common properties and object specific properties.

  • Object common properties. Object common properties are derived from the merge of the "eventAction" and the "eventDate" properties. The following values of sortby are defined:
    • registrationDate
    • reregistrationDate
    • lastChangedDate
    • expirationDate
    • deletionDate
    • reinstantiationDate
    • transferDate
    • lockedDate
    • unlockedDate

  • Object specific properties. With regard to the specific properties, some of them are already defined among the query paths. In the following the list of the proposed sorting properties, grouped by objects, is shown:
    • Domain: ldhName
    • Nameserver: ldhName, ipV4, ipV6.
    • Entity: fn, handle, org, email, tel, country, countryName, locality.

In the following, the correspondence between the values of sortby parameter and the RDAP object properties is shown (Table 1):

Sorting properties definition
Object class sortby value Object property Reference in RFC 7483 Reference in RFC 6350
Searchable objects Common properties eventAction values suffixed by "Date" 4.5.
Domain ldhName ldhName 5.3.
Nameserver ldhName ldhName 5.2.
ipV4 v4 ipAddress 5.2.
ipV6 v6 ipAddress 5.2.
Entity handle handle 5.1.
fn vcard fn 5.1. 6.2.1
org vcard org 5.1. 6.6.4
tel vcard tel with type="voice" 5.1. 6.4.1
email vcard email 5.1. 6.4.2
country country code (as given in ISO.3166.1988 [ISO.3166.1988]) of the country name in vcard adr 5.1. 6.3.1
countryNme country name in vcard adr 5.1. 6.3.1
locality locality in vcard adr 5.1. 6.3.1

With regard to the definitions in Table 1, some further considerations must be made to disambiguate cases where the RDAP object property is multivalued:

  • Even if a nameserver can have multiple IPv4 and IPv6 addresses, the most common configuration includes one address for each IP version. Therefore, the assumption of having a single IPv4 and/or IPv6 value for a nameserver cannot be considered too stringent.
  • With the exception of handle values, all the sorting properties defined for entity objects can be multivalued according to the definition of vCard as given in RFC6350 [RFC6350]. When more than a value is reported, sorting can be applied to the preferred value identified by the parameter pref="1".

Each RDAP provider MAY define other sorting properties than those shown in this document. (FOR DISCUSSION: how should those properties be defined? Is an IANA registry appropriate?)

Figure 3: Examples of RDAP query reporting the sortby parameter

2.3. "limit" and "offset" parameters

An RDAP query could return a response with hundreds of object return values, especially when partial matching is used. For that reason, two parameters addressing result pagination are defined to make responses easier to handle:

  • "limit": means that the server MUST return the first N objects of the result set in the response;
  • "offset": means that the server MUST skip the first N objects and MUST return objects starting from position N+1.

The ABNF syntax is the following:

  • EQ = "="
  • limit = "limit" EQ positive-number
  • offset = "offset" EQ positive-number
  • positive-number = non-zero-digit *digit
  • non-zero-digit = "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
  • digit = "0" / non-zero-digit

When limit and offset are used together, they allow implementation of result pagination. These examples illustrate requests to return the first 5 objects, the set of objects starting from position 6, and 5 objects starting from position 11 of the result set (Figure 4).

Figure 4: Examples of RDAP query reporting the limit and offset parameters

2.3.1. Use of "links" property

An RDAP server MAY use the "links" [RFC5988] property to provide a ready-made reference to the next page of the result set (Figure 5).

Examples of "rel" values are "first", "last", "prev".