RFC 8982
Registration Data Access Protocol (RDAP) Partial Response
RFC 8982: Registration Data Access Protocol (RDAP) Partial Response π
okay bestie, first the title block, because it's the important stuff π
- RFC number: 8982
- Title: Registration Data Access Protocol (RDAP) Partial Response
- Authors: M. Loffredo and M. Martinelli, both from IIT-CNR/Registro.it
- Category: Standards Track
- ISSN: 2070-1721
- Date: February 2021
- Obsoletes / Updates: nothing is listed in the header, so it doesn't obsolete or update anything
Abstract β¨
okay so RDAP doesn't have a way to ask for a partial response π Servers will only send back full responses, the ones with every bit of info a client is allowed to see. A partial response option that limits how much comes back, especially for search queries, could be a huge win for both clients and servers π This doc describes an RDAP query extension that lets clients say what kind of partial response they'd like π¦
Status of This Memo π
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Info about the current status of this document, any errata, and how to give feedback on it is at https://www.rfc-editor.org/info/rfc8982.
Copyright Notice π
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.
Legal stuff, but important! This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, since 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
1.1. Conventions Used in This Document
2. RDAP Path Segment Specification
2.1. Subsetting Metadata
2.1.1. RDAP Conformance
2.1.2. Representing Subsetting Links
3. Dealing with Relationships
4. Basic Field Sets
5. Negative Answers
6. IANA Considerations
7. Security Considerations
8. References
8.1. Normative References
8.2. Informative References
Appendix A. Approaches to Partial Response Implementation
A.1. Specific Issues Raised by RDAP
Acknowledgements
Authors' Addresses
1. Introduction π¦
The vibe: partial responses are super common in RESTful API [REST] design, and the logic is simple. Instead of sending back objects with every data field, you only send a subset of the fields in each result object π The benefit is obvious: less data over the network means less bandwidth used, faster server responses, less CPU time on both the server and the client, and less memory used on the client π§
Right now RDAP doesn't give a client any way to ask for a partial response. Servers can only give the client a full response [RFC7483]. Servers can't limit how much info comes back based on what a client prefers, and that creates inefficiencies π
The protocol in this spec extends RDAP search capabilities so partial responses are possible. It works by letting clients add a new query parameter that points at predefined sets of fields they can submit to an RDAP service β¨ The service uses the Hypertext Transfer Protocol (HTTP) [RFC7230] and the conventions described in [RFC7480].
1.1. Conventions Used in This Document π§
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. π
2. RDAP Path Segment Specification πΈ
The path segment in this section is an OPTIONAL extension of the search path segments defined in [RFC7482] π This document defines an RDAP query parameter called "fieldSet". Its value is a non-empty string that identifies a server-defined set of fields returned in place of the full response. Servers usually describe the field sets they support in out-of-band documents (for example, an RDAP profile) along with other features. This document also defines, in Section 2.1, an in-band mechanism that lets servers give clients basic info about the field sets they support π¦
Here's an example RDAP query with the "fieldSet" parameter:
https://example.com/rdap/domains?name=example*.com&fieldSet=afieldset
Why this approach? This solution is easier for RDAP providers to implement than field selection, and clients can request it really easily π The reasoning behind it is explained in more detail in Appendix A.
2.1. Subsetting Metadata π
So, HATEOAS! It's "Hypermedia as the Engine of Application State" [HATEOAS], and the big idea is that a client starting from an initial URI should use server-provided links to discover what actions are available and reach the resources it needs. That way the client doesn't need prior knowledge of the service or hard-coded URIs for each resource π«Ά It also lets the server change URIs as the API evolves without breaking clients. Basically, a REST service ought to be as self-descriptive as it can be β¨
So, servers implementing the query parameter described in this specification SHOULD provide extra info in their responses about the available field sets. That info goes in a new JSON data structure called "subsetting_metadata", which has these properties:
"currentFieldSet": "String"(REQUIRED): this is either the value of the "fieldSet" parameter from the query string, or the field set applied by default."availableFieldSets": "AvailableFieldSet[]"(OPTIONAL): an array of objects, with each element describing one available field set. The AvailableFieldSet object has these members:"name": "String"(REQUIRED): the field set name."default": "Boolean"(REQUIRED): tells you whether the field set is applied by default. An RDAP server MUST define only one default field set π"description": "String"(OPTIONAL): a human-readable description of the field set."links": "Link[]"(OPTIONAL): an array of links as described in [RFC8288], containing the query string that applies the field set (see Section 2.1.2).
2.1.1. RDAP Conformance π«Ά
Servers that return the "subsetting_metadata" section in their responses MUST include "subsetting" in the rdapConformance array. π
2.1.2. Representing Subsetting Links π
An RDAP server MAY use the "links" array of the "subsetting_metadata" element to provide ready-made references [RFC8288] to the available field sets (Figure 1). The target URI in each link is a reference to an alternative to the current view of results, identified by the context URI.
The "value", "rel", and "href" JSON values MUST be specified. All other JSON values are OPTIONAL. π§Ύ
Here's what that looks like (Figure 1):
{
"rdapConformance": [
"rdap_level_0",
"subsetting"
],
...
"subsetting_metadata": {
"currentFieldSet": "afieldset",
"availableFieldSets": [
{
"name": "anotherfieldset",
"description": "Contains some fields",
"default": false,
"links": [
{
"value": "https://example.com/rdap/domains?name=example*.com
&fieldSet=afieldset",
"rel": "alternate",
"href": "https://example.com/rdap/domains?name=example*.com
&fieldSet=anotherfieldset",
"title": "Result Subset Link",
"type": "application/rdap+json"
}
]
},
...
]
},
...
"domainSearchResults": [
...
]
}
Figure 1: Example of a "subsetting_metadata" Instance
3. Dealing with Relationships π
This one's a bit tricky, so stay with me π₯Ή Representing second-level objects inside a field set brings some extra things to think about. The topmost objects in a response change depending on which field set is in use, so the response might have no relationships (for example, with an abbreviated field set). Or it might include associated objects, just like a normal RDAP query response. Each field set can say what format the additional objects should come back in, the same way the field set controls the format of the topmost objects π
4. Basic Field Sets π
This section defines three basic field sets that servers MAY implement to make things easier for clients π§
"id": The server only gives back the key field. That's "handle" for entities, and "ldhName" for domains and nameservers. If a returned domain or nameserver is an Internationalized Domain Name (IDN) [RFC5890], then the "unicodeName" field MUST additionally be included in the response. This field set could be used when the client wants a collection of object identifiers (Figure 2)."brief": This field set has the fields that can be included in a "short" response. It could be used when the client wants a subset of the full response that gives only basic info about each object."full": This field set has all of the info the server can provide for a particular object.
The "objectClassName" field is implicitly included in each of the field sets above. RDAP providers SHOULD include a "links" field indicating the "self" link relationship. RDAP providers MAY also add any property that provides service info πΈ
Fields included in the "brief" and "full" field set responses MUST take into account the user's access and authorization levels π
Here's the "id" example (Figure 2):
{
"rdapConformance": [
"rdap_level_0",
"subsetting"
],
...
"domainSearchResults": [
{
"objectClassName": "domain",
"ldhName": "example1.com",
"links": [
{
"value": "https://example.com/rdap/domain/example1.com",
"rel": "self",
"href": "https://example.com/rdap/domain/example1.com",
"type": "application/rdap+json"
}
]
},
{
"objectClassName": "domain",
"ldhName": "example2.com",
"links": [
{
"value": "https://example.com/rdap/domain/example2.com",
"rel": "self",
"href": "https://example.com/rdap/domain/example2.com",
"type": "application/rdap+json"
}
]
},
...
]
}
Figure 2: Example of RDAP Response According to the "id" Field Set
5. Negative Answers π
okay so, every request with an empty or unsupported fieldSet value MUST get an HTTP 400 (Bad Request) response code π
ββοΈ no exceptions bestie. the server MAY also add some extra info about which field sets it does support in the HTTP entity body (Figure 3) π
{
"errorCode": 400,
"title": "Field set 'unknownfieldset' is not valid",
"description": [
"Supported field sets are: 'afieldset', 'anotherfieldset'."
]
}
Figure 3: Example of RDAP Error Response Due to an Invalid Field Set Included in the Request
6. IANA Considerations ποΈ
IANA has registered the following value in the "RDAP Extensions" registry π
Extension identifier: subsetting
Registry operator: Any
Published specification: RFC 8982
Contact: IETF <iesg@ietf.org>
Intended usage: This extension describes a best practice for partial
response provisioning.
7. Security Considerations π¨
okay this section is giving serious drama and i love it π a search query usually eats way more server resources (memory, CPU cycles, and network bandwidth) than a lookup query does. that makes server resource exhaustion and a denial of service way more likely π you can soften the risk by supporting partial responses together with other strategies, like restricting search functionality, limiting the rate of search requests, and truncating and paging results β¨
partial responses also let RDAP operators run data access control policies based on the HTTP authentication mechanisms described in [RFC7481] π operators can change what goes back in an RDAP response depending on the client's access and authorization levels. for example:
- the list of fields for each set can be different based on the client's access and authorization levels;
- the set of available field sets could be restricted based on the client's access and authorization levels.
servers can also set different result limits for each field set, which means a more flexible truncation strategy can be built π§ the new query parameter in this document gives RDAP operators a way to build a server that cuts down on inefficiency risks π
8. References π
8.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
https://www.rfc-editor.org/info/rfc2119. - [RFC5890] Klensin, J., "Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework", RFC 5890, DOI 10.17487/RFC5890, August 2010,
https://www.rfc-editor.org/info/rfc5890. - [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014,
https://www.rfc-editor.org/info/rfc7230. - [RFC7480] Newton, A., Ellacott, B., and N. Kong, "HTTP Usage in the Registration Data Access Protocol (RDAP)", RFC 7480, DOI 10.17487/RFC7480, March 2015,
https://www.rfc-editor.org/info/rfc7480. - [RFC7481] Hollenbeck, S. and N. Kong, "Security Services for the Registration Data Access Protocol (RDAP)", RFC 7481, DOI 10.17487/RFC7481, March 2015,
https://www.rfc-editor.org/info/rfc7481. - [RFC7482] Newton, A. and S. Hollenbeck, "Registration Data Access Protocol (RDAP) Query Format", RFC 7482, DOI 10.17487/RFC7482, March 2015,
https://www.rfc-editor.org/info/rfc7482. - [RFC7483] Newton, A. and S. Hollenbeck, "JSON Responses for the Registration Data Access Protocol (RDAP)", RFC 7483, DOI 10.17487/RFC7483, March 2015,
https://www.rfc-editor.org/info/rfc7483. - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
https://www.rfc-editor.org/info/rfc8174. - [RFC8288] Nottingham, M., "Web Linking", RFC 8288, DOI 10.17487/RFC8288, October 2017,
https://www.rfc-editor.org/info/rfc8288.
8.2. Informative References
- [CQL] Whitaker, G., "Catnap Query Language Reference", commit d4f402c, September 2017,
https://github.com/gregwhitaker/catnap/wiki/Catnap-Query-Language-Reference. - [HATEOAS] Jedrzejewski, B., "HATEOAS - a simple explanation", February 2018,
https://www.e4developer.com/2018/02/16/hateoas-simple-explanation/. - [REST] Fielding, R., "Architectural Styles and the Design of Network-based Software Architectures", Ph.D. Dissertation, University of California, Irvine, 2000,
https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf.
Appendix A. Approaches to Partial Response Implementation π¦
okay so if you look at how data providers on the web have actually done partial responses, two approaches show up π
- the client explicitly describes the data fields to be returned;
- the client describes a name identifying a server-defined set of data fields.
the first one is more flexible than the second, because clients can ask for exactly the fields they need π but it comes with some drawbacks, ngl:
- Fields have to be declared according to a given syntax. This is a simple task when the data structure of the object is flat, but it is much more difficult when the object has a tree structure like that of a JSON object. The presence of arrays and deep nested objects complicates both the syntax definition of the query and, consequently, the processing required on the server side.
- Clients need to recognize the returned data structure to avoid cases when the requested fields are invalid.
- The request of some fields might not match the client's access and authorization levels. Clients might request unauthorized fields, and servers have to define a strategy for responding such as always returning an error response or returning a response that ignores the unauthorized fields.
A.1. Specific Issues Raised by RDAP πΈ
on top of those, RDAP responses bring their own special issues π€
- Relevant entity object information is included in a jCard, but such information cannot be easily selected because it is split into the items of a jagged array.
- RDAP responses contain some properties providing service information (e.g., rdapConformance, links, notices, remarks, etc.), which are not normally selected but are just as important. They could be returned anyway but, in this case, the server would provide unrequested data.
these issues can be addressed, though π for example, the Catnap Query Language [CQL] is a comprehensive expression language that can be used to customize the JSON response of a RESTful web service. applying CQL to RDAP responses would explicitly identify the output fields that are acceptable when only a few fields are requested, but it gets very complicated once you process a larger number of fields. below are two CQL expressions for a domain search query (Figure 4). the first one only asks for objectClassName and ldhName. the second one lists the fields of a possible WHOIS-like response.
https://example.com/rdap/domains?name=example*.com
&fields=domainSearchResults(objectClassName,ldhName)
https://example.com/rdap/domains?name=example*.com
&fields=domainSearchResults(objectClassName,ldhName,
unicodeName,
status,
events(eventAction,eventDate),
entities(objectClassName,handle,roles),
nameservers(objectClassName,ldhName))
Figure 4: Examples of CQL Expressions for a Domain Search Query
the field set approach seems to make RDAP interoperability easier π§ servers can define basic field sets that, if clients know about them, can raise the odds of getting a valid response. using field sets also keeps the query string less complex. and predefining sets of fields makes it easier to set result limits π
finally, RDAP users don't really need maximum flexibility to define every possible set of logically connected fields. users interested in domains usually need the status, the creation date, and the expiry date of each domain, for example π so the field set approach is the one that's preferred π
Acknowledgements π«Ά
the authors want to give a huge thank you to Scott Hollenbeck, Tom Harrison, Karl Heinz Wolf, Jasdip Singh, Patrick Mevzek, Benjamin Kaduk, Roman Danyliw, Murray Kucherawy, Erik Kline, and Robert Wilton for their contribution to this document β¨π
Authors' Addresses ποΈ
Mario Loffredo
IIT-CNR/Registro.it
Via Moruzzi,1
56124 Pisa
Italy
Email: mario.loffredo@iit.cnr.it
URI: https://www.iit.cnr.it
Maurizio Martinelli
IIT-CNR/Registro.it
Via Moruzzi,1
56124 Pisa
Italy
Email: maurizio.martinelli@iit.cnr.it
URI: https://www.iit.cnr.it
π¦ where this page comes from
- ietf: rfc8982 2021-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms