idnits 2.17.1 draft-loffredo-regext-rdap-partial-response-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 3, 2017) is 2395 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7482 (Obsoleted by RFC 9082) ** Obsolete normative reference: RFC 7483 (Obsoleted by RFC 9083) == Outdated reference: A later version (-10) exists of draft-hollenbeck-regext-rdap-openid-04 == Outdated reference: A later version (-05) exists of draft-loffredo-regext-rdap-sorting-and-paging-00 Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Registration Protocols Extensions M. Loffredo 3 Internet-Draft M. Martinelli 4 Intended status: Standards Track IIT-CNR/Registro.it 5 Expires: April 6, 2018 October 3, 2017 7 Registration Data Access Protocol (RDAP) Partial Response 8 draft-loffredo-regext-rdap-partial-response-00 10 Abstract 12 The Registration Data Access Protocol (RDAP) does not include 13 capabilities to request partial responses. In fact, according to the 14 user authorization, the server can only return full responses. 15 Partial responses capability, especially in the case of search 16 queries, could bring benefits to both clients and servers. This 17 document describes a RDAP query extension that allows clients to 18 specify their preference for obtaining a partial response. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on April 6, 2018. 37 Copyright Notice 39 Copyright (c) 2017 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Conventions Used in This Document . . . . . . . . . . . . 3 56 2. Approaches to partial response implementation . . . . . . . . 3 57 3. RDAP Path Segment Specification . . . . . . . . . . . . . . . 4 58 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 5 59 4.1. IIT-CNR/Registro.it . . . . . . . . . . . . . . . . . . . 6 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 61 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 62 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 63 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 64 8.1. Normative References . . . . . . . . . . . . . . . . . . 7 65 8.2. Informative References . . . . . . . . . . . . . . . . . 8 66 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 68 1. Introduction 70 The use of partial response in RESTful API [REST] design is very 71 common. The rationale is quite simple: instead of returning objects 72 in API responses with all data fields, only a subset is returned. 73 The benefit is obvious: less data transferred over the network mean 74 less bandwidth usage, faster server response, less CPU time spent 75 both on the server and the client, as well as less memory usage on 76 the client. 78 Several leading APIs providers (e.g. LinkedIn [LINKEDIN], Facebook 79 [FACEBOOK], Google [GOOGLE]) implement the partial response feature 80 by providing an optional query parameter by which users require the 81 fields they wish to receive. Partial response is also considered a 82 leading principle by many best practices guidelines in REST APIs 83 implementation ([REST-API1], [REST-API2]) in order to improve 84 performance, save on bandwidth and possibly accelerate the overall 85 interaction. In other contexts, for example in digital libraries and 86 bibliographic catalogues, servers can provide responses according to 87 different element sets (i.e. "brief" to get back a short response and 88 "full" to get back the complete response) 90 Currently, RDAP does not provide a client with any way to request a 91 partial response: the server can only provide the client with the 92 full response ([RFC7483]). Furthermore, servers cannot define the 93 limits of the results according to partial responses and this causes 94 strong inefficiencies. 96 The protocol described in this specification extends RDAP search 97 capabilities to enable partial responses, by adding a new query 98 parameter and using a RESTful web service. The service is 99 implemented using the Hypertext Transfer Protocol (HTTP) [RFC7230] 100 and the conventions described in RFC 7480 [RFC7480]. 102 Impact on the current state of RDAP implementation is low. 104 1.1. Conventions Used in This Document 106 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 107 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 108 document are to be interpreted as described in [RFC2119]. 110 2. Approaches to partial response implementation 112 Looking at the implementation experiences described above, two 113 approaches to the implementation of partial response can be detected: 115 o the client declares explicitly the data fields to get back; 117 o the client declares a name identifying a server pre-defined set of 118 data fields. 120 The former is more flexible than the latter, because clients can 121 specify all the data fields they need. Anyway, it has some 122 drawbacks: 124 o Fields have to be declared according to a given syntax. This is a 125 simple task when the data structure of the object is flat, but it 126 is much more difficult when the object has a tree structure like 127 the one of a JSON object. The presence of arrays and deep nested 128 objects contribute to complicate both the syntax definition of the 129 query and, consequently, the processing phase on the server side. 131 o Clients should perfectly know the returned object to avoid cases 132 when the required fields are not compliant with the object data 133 structure. 135 o The request of some fields cannot match the user access levels. 136 Clients could put unauthorized fields in their requests and 137 servers should define a strategy for providing a response: to 138 return always an error response or to return a response ignoring 139 the unauthorized fields. 141 The latter approach seems to facilitate RDAP interoperability. In 142 fact, servers can define some basic field sets which, if known to the 143 clients, can increase the probability to get a valid response. In 144 addition, the definition of pre-defined sets of fields makes easier 145 to establish the results limits. 147 Considering that there is not a real need for RDAP users to have the 148 maximum flexibility in defining all the possible sets of logically 149 connected fields (for example, users interested in domains usually 150 need to know the status, the creation date, the expire date of each 151 domain), the latter approach is preferred. 153 3. RDAP Path Segment Specification 155 The new query parameter is an OPTIONAL extension of search path 156 segments defined in RFC 7482 [RFC7482]. The query parameter is 157 "fieldSet" whose value is a string identifying a server pre-defined 158 set of fields (Figure 1). Values REQUIRED to be implemented are: 160 o id: the server provides only the "objectClassName" field and the 161 field identifying the object ("handle" for entities, "ldhName" for 162 domains and nameservers). This field set can be used when the 163 client wants to obtain a collection of object identifiers 164 (Figure 2); 166 o brief: it contains the fields that can be included in a "short" 167 response. This field set can be used when the client is asking 168 for a subset of the full response which gives a basic knowledge of 169 each object; 171 o full: it contains all the information the server can provide for a 172 particular object. 174 Fields belonging to brief and full field sets should be provided 175 according to users access levels. Servers MAY implement additional 176 field sets not included in the list above. Servers SHOULD also 177 define a "default" field set. 179 https://example.com/rdap/domains?name=example*.com&fieldSet=id 181 Figure 1: Example of RDAP search query reporting the fieldSet 182 parameter 184 { 185 "rdapConformance": [ 186 "rdap_level_0", 187 ], 188 ... 189 "domainSearchResults": [ 190 { 191 "objectClassName": "domain", 192 "ldhName": "example1.com" 193 }, 194 { 195 "objectClassName": "domain", 196 "ldhName": "example2.com" 197 }, 198 ... 199 ] 200 } 202 Figure 2: Example of RDAP response according to the "id" field set 204 4. Implementation Status 206 NOTE: Please remove this section and the reference to RFC 7942 prior 207 to publication as an RFC. 209 This section records the status of known implementations of the 210 protocol defined by this specification at the time of posting of this 211 Internet-Draft, and is based on a proposal described in RFC 7942 212 [RFC7942]. The description of implementations in this section is 213 intended to assist the IETF in its decision processes in progressing 214 drafts to RFCs. Please note that the listing of any individual 215 implementation here does not imply endorsement by the IETF. 216 Furthermore, no effort has been spent to verify the information 217 presented here that was supplied by IETF contributors. This is not 218 intended as, and must not be construed to be, a catalog of available 219 implementations or their features. Readers are advised to note that 220 other implementations may exist. 222 According to RFC 7942, "this will allow reviewers and working groups 223 to assign due consideration to documents that have the benefit of 224 running code, which may serve as evidence of valuable experimentation 225 and feedback that have made the implemented protocols more mature. 226 It is up to the individual working groups to use this information as 227 they see fit". 229 4.1. IIT-CNR/Registro.it 231 Responsible Organization: Institute of Informatics and Telematics 232 of National Research Council (IIT-CNR)/Registro.it 234 Location: https://rdap.pubtest.nic.it/ 236 Description: This implementation includes support for RDAP queries 237 using data from the public test environment of .it ccTLD. The 238 RDAP server does not implement any security policy because data 239 returned by this server are only for experimental testing 240 purposes. 242 Level of Maturity: This is a "proof of concept" research 243 implementation. 245 Coverage: This implementation includes all of the features 246 described in this specification. 248 Contact Information: Mario Loffredo, mario.loffredo@iit.cnr.it 250 5. Security Considerations 252 Search query typically requires more server resources (such as 253 memory, CPU cycles, and network bandwidth) when compared to lookup 254 query. This increases the risk of server resource exhaustion and 255 subsequent denial of service due to abuse. Partial response can 256 contribute together with other strategies (e.g. restricting search 257 functionality, limiting the rate of search requests, truncating and 258 paging results) to mitigate this risk. 260 Furthermore, partial response can help RDAP operators to regulate 261 access control based on client identification, implemented by HTTP 262 basic or digest authentication as described in RFC 7481 [RFC7481] or 263 by a federated authentication system 264 ([I-D.hollenbeck-regext-rdap-openid]). In fact, RDAP operators can 265 follow different, not alternative, approaches to the building of 266 responses according to the user access levels: 268 o the list of fields for each set (except "id") can be different 269 according to the user access levels. At present, this is already 270 implemented for the full response, but it could be done also for 271 the other defined field sets. In some cases, it might happen that 272 brief and full field sets are exactly the same; 274 o some field sets could be available only to some users. In this 275 case, servers could define additional field sets to those 276 indicated above ("id", "brief", "full"), making them available 277 only to users with specific access levels. 279 Servers can also define different results limits according to the 280 available field sets, so a more flexible truncation strategy can be 281 realized and users can take advantage of a more efficient results 282 paging implementation 283 ([I-D.loffredo-regext-rdap-sorting-and-paging]). 285 Therefore, the new parameter presented in this document provide the 286 RDAP operators with a way to implement a secure server without 287 penalizing its efficiency. 289 6. IANA Considerations 291 This document has no actions for IANA. 293 7. Acknowledgements 295 The authors would like to acknowledge Scott Hollenbeck for his 296 contribution to this document. 298 8. References 300 8.1. Normative References 302 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 303 Requirement Levels", BCP 14, RFC 2119, 304 DOI 10.17487/RFC2119, March 1997, 305 . 307 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 308 Protocol (HTTP/1.1): Message Syntax and Routing", 309 RFC 7230, DOI 10.17487/RFC7230, June 2014, 310 . 312 [RFC7480] Newton, A., Ellacott, B., and N. Kong, "HTTP Usage in the 313 Registration Data Access Protocol (RDAP)", RFC 7480, 314 DOI 10.17487/RFC7480, March 2015, 315 . 317 [RFC7481] Hollenbeck, S. and N. Kong, "Security Services for the 318 Registration Data Access Protocol (RDAP)", RFC 7481, 319 DOI 10.17487/RFC7481, March 2015, 320 . 322 [RFC7482] Newton, A. and S. Hollenbeck, "Registration Data Access 323 Protocol (RDAP) Query Format", RFC 7482, 324 DOI 10.17487/RFC7482, March 2015, 325 . 327 [RFC7483] Newton, A. and S. Hollenbeck, "JSON Responses for the 328 Registration Data Access Protocol (RDAP)", RFC 7483, 329 DOI 10.17487/RFC7483, March 2015, 330 . 332 8.2. Informative References 334 [FACEBOOK] 335 facebook.com, "facebook for developers - Using the Graph 336 API", July 2017. 338 [GOOGLE] google.com, "Making APIs Faster: Introducing Partial 339 Response and Partial Update", March 2010. 341 [I-D.hollenbeck-regext-rdap-openid] 342 Hollenbeck, S., "Federated Authentication for the 343 Registration Data Access Protocol (RDAP) using OpenID 344 Connect", draft-hollenbeck-regext-rdap-openid-04 (work in 345 progress), August 2017. 347 [I-D.loffredo-regext-rdap-sorting-and-paging] 348 Loffredo, M., Martinelli, M., and S. Hollenbeck, 349 "Registration Data Access Protocol (RDAP) Query Parameters 350 for Result Sorting and Paging", draft-loffredo-regext- 351 rdap-sorting-and-paging-00 (work in progress), May 2017. 353 [LINKEDIN] 354 linkedin.com, "Java One 2009: Building Consistent RESTful 355 APIs in a High Performance Environment", July 2009. 357 [REST] Fielding, R., "Architectural Styles and the Design of 358 Network-based Software Architectures", 2000. 360 [REST-API1] 361 Jobinesh, P., "RESTful Java Web Services - Second 362 Edition", September 2015. 364 [REST-API2] 365 Masse, M., "REST API Design Rulebook", October 2011. 367 [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running 368 Code: The Implementation Status Section", BCP 205, 369 RFC 7942, DOI 10.17487/RFC7942, July 2016, 370 . 372 Authors' Addresses 374 Mario Loffredo 375 IIT-CNR/Registro.it 376 Via Moruzzi,1 377 Pisa 56124 378 IT 380 Email: mario.loffredo@iit.cnr.it 381 URI: http://www.iit.cnr.it 383 Maurizio Martinelli 384 IIT-CNR/Registro.it 385 Via Moruzzi,1 386 Pisa 56124 387 IT 389 Email: maurizio.martinelli@iit.cnr.it 390 URI: http://www.iit.cnr.it