idnits 2.17.1 draft-ietf-weirds-using-http-08.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 : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 4, 2014) is 3734 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 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Obsolete informational reference (is this intentional?): RFC 4627 (Obsoleted by RFC 7158, RFC 7159) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Newton 3 Internet-Draft ARIN 4 Intended status: Standards Track B. Ellacott 5 Expires: August 8, 2014 APNIC 6 N. Kong 7 CNNIC 8 February 4, 2014 10 HTTP usage in the Registration Data Access Protocol (RDAP) 11 draft-ietf-weirds-using-http-08 13 Abstract 15 This document is one of a collection that together describe the 16 Registration Data Access Protocol (RDAP). It describes how RDAP is 17 transported using the Hypertext Transfer Protocol (HTTP). 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on August 8, 2014. 36 Copyright Notice 38 Copyright (c) 2014 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 55 3. Design Intents . . . . . . . . . . . . . . . . . . . . . . . 4 56 4. Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 57 4.1. Accept Header . . . . . . . . . . . . . . . . . . . . . . 5 58 4.2. Query Parameters . . . . . . . . . . . . . . . . . . . . 5 59 5. Types of HTTP Response . . . . . . . . . . . . . . . . . . . 5 60 5.1. Positive Answers . . . . . . . . . . . . . . . . . . . . 5 61 5.2. Redirects . . . . . . . . . . . . . . . . . . . . . . . . 5 62 5.3. Negative Answers . . . . . . . . . . . . . . . . . . . . 6 63 5.4. Malformed Queries . . . . . . . . . . . . . . . . . . . . 6 64 5.5. Rate Limits . . . . . . . . . . . . . . . . . . . . . . . 6 65 5.6. Cross-Origin Resource Sharing . . . . . . . . . . . . . . 7 66 6. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 7 67 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 68 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 69 8.1. RDAP Extensions Registry . . . . . . . . . . . . . . . . 8 70 9. Internationalization Considerations . . . . . . . . . . . . . 9 71 9.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 9 72 9.2. Language Identifiers in Queries and Responses . . . . . . 9 73 9.3. Language Identifiers in HTTP Headers . . . . . . . . . . 9 74 10. Contributing Authors and Acknowledgements . . . . . . . . . . 9 75 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 76 11.1. Normative References . . . . . . . . . . . . . . . . . . 10 77 11.2. Informative References . . . . . . . . . . . . . . . . . 10 78 Appendix A. Protocol Example . . . . . . . . . . . . . . . . . . 11 79 Appendix B. Cache Busting . . . . . . . . . . . . . . . . . . . 11 80 Appendix C. Changelog . . . . . . . . . . . . . . . . . . . . . 12 81 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 83 1. Introduction 85 This document describes the usage of HTTP for Registration Data 86 Directory Services. The goal of this document is to tie together 87 usage patterns of HTTP into a common profile applicable to the 88 various types of Directory Services serving Registration Data using 89 RESTful practices. By giving the various Directory Services common 90 behavior, a single client is better able to retrieve data from 91 Directory Services adhering to this behavior. 93 The registration data expected to be presented by this service is 94 Internet resource registration data - registration of domain names 95 and Internet number resources. This data is typically provided by 96 WHOIS [RFC3912] services, but the WHOIS protocol is insufficient to 97 modern registration data service requirements. A replacement 98 protocol is expected to retain the simple transactional nature of 99 WHOIS, while providing a specification for queries and responses, 100 redirection to authoritative sources, support for Internationalized 101 Domain Names (IDNs, [RFC5890]), and support for localized 102 registration data such as addresses and organisation or person names. 104 In designing these common usage patterns, this document introduces 105 considerations for a simple use of HTTP. Where complexity may 106 reside, it is the goal of this document to place it upon the server 107 and to keep the client as simple as possible. A client 108 implementation should be possible using common operating system 109 scripting tools. 111 This is the basic usage pattern for this protocol: 113 1. A client issues an HTTP query using GET. As an example, a query 114 for the network registration 192.0.2.0 might be http:// 115 example.com/ip/192.0.2.0. 117 2. If the receiving server has the information for the query, it 118 examines the Accept header field of the query and returns a 200 119 response with a response entity appropriate for the requested 120 format. 122 3. If the receiving server does not have the information for the 123 query but does have knowledge of where the information can be 124 found, it will return a redirection response (3xx) with the 125 Location: header field containing an HTTP(S) URL (Uniform 126 Resource Locator) pointing to the information or another server 127 known to have knowledge of the location of the information. The 128 client is expected to re-query using that HTTP URL. 130 4. If the receiving server does not have the information being 131 requested and does not have knowledge of where the information 132 can be found, it returns a 404 response. 134 5. If the receiving server will not answer a request for policy 135 reasons, it will return an error response (4xx) indicating the 136 reason for giving no answer. 138 It is important to note that it is not the intent of this document to 139 redefine the meaning and semantics of HTTP. The purpose of this 140 document is to clarify the use of standard HTTP mechanisms for this 141 application. 143 2. Terminology 145 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 146 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 147 document are to be interpreted as described in RFC 2119 [RFC2119]. 149 As is noted in SSAC Report on WHOIS Terminology and Structure 150 [SAC-051], the term "WHOIS" is overloaded, often referring to a 151 protocol, a service and data. In accordance with [SAC-051], this 152 document describes the base behavior for a Registration Data Access 153 Protocol (RDAP). [SAC-051] describes a protocol profile of RDAP for 154 Domain Name Registries (DNRs), the Domain Name Registration Data 155 Access Protocol (DNRD-AP). 157 In this document, an RDAP client is an HTTP User Agent performing an 158 RDAP query, and an RDAP server is an HTTP server providing an RDAP 159 response. RDAP query and response formats are described in other 160 documents in the collection of RDAP specifications, while this 161 document describes how RDAP clients and servers use HTTP to exchange 162 queries and responses. 164 3. Design Intents 166 There are a few design criteria this document attempts to meet. 168 First, each query is meant to return either zero or one result. With 169 the maximum upper bound being set to one, the issuance of redirects 170 is simplified to the known query/response model used by HTTP 171 [RFC2616]. Should an entity contain more than one result, some of 172 which are better served by other servers, the redirection model 173 becomes much more complicated. 175 Second, the semantics of the request/response allow for future and/or 176 non-standard response formats. In this document, only a JSON 177 [RFC4627] response media type is noted, with the response contents to 178 be described separately. This document only describes how RDAP is 179 transported using HTTP with this format. 181 Third, this protocol is intended to be able to make use of the range 182 of mechanisms available for use with HTTP. HTTP offers a number of 183 mechanisms not described further in this document. Operators are 184 able to make use of these mechanisms according to their local policy, 185 including cache control, authorization, compression, and redirection. 186 HTTP also benefits from widespread investment in scalability, 187 reliability, and performance, and widespread programmer understanding 188 of client behaviours for RESTful web services, reducing the cost to 189 deploy Registration Data Directory Services and clients. 191 4. Queries 193 4.1. Accept Header 195 To indicate to servers that an RDAP response is desired, clients 196 include an Accept: header field with an RDAP specific JSON media 197 type, the generic JSON media type, or both. Servers receiving an 198 RDAP request return an entity with a Content-Type: header containing 199 the RDAP specific JSON media type. 201 This specification does not define the responses a server returns to 202 a request with any other media types in the Accept: header field, or 203 with no Accept: header field. One possibility would be to return a 204 response in a media type suitable for rendering in a web browser. 206 4.2. Query Parameters 208 Servers MUST ignore unknown query parameters. Use of unknown query 209 parameters for cache-busting is described in Appendix B. 211 5. Types of HTTP Response 213 This section describes the various types of responses a server may 214 send to a client. While no standard HTTP response code is forbidden 215 in usage, at a minimum clients SHOULD understand the response codes 216 described in this section as they will be in common use by servers. 217 It is expected that usage of response codes and types for this 218 application not defined here will be described in subsequent 219 documents. 221 5.1. Positive Answers 223 If a server has the information requested by the client and wishes to 224 respond to the client with the information according to its policies, 225 it returns that answer in the body of a 200 response. 227 5.2. Redirects 229 If a server wishes to inform a client that the answer to a given 230 query can be found elsewhere, it returns either a 301 response code 231 to indicate a permanent move, or a 302, 303 or 307 response code to 232 indicate a non-permanent redirection, and it includes an HTTP(s) URL 233 in the Location: header field. The client is expected to issue a 234 subsequent request to satisfy the original query using the given URL 235 without any processing of the URL. In other words, the server is to 236 hand back a complete URL and the client should not have to transform 237 the URL to follow it. 239 For this application, such an example of a permanent move might be a 240 Top Level Domain (TLD) operator informing a client the information 241 being sought can be found with another TLD operator (i.e. a query for 242 the domain bar in foo.example is found at http://foo.example/domain/ 243 bar). 245 For example, if the client sends http://serv1.example.com/weirds/ 246 domain/example.com, the server redirecting to https:// 247 serv2.example.net/weirds2/ would set the Location: field to the 248 value: https://serv2.example.net/weirds2/domain/example.com. 250 5.3. Negative Answers 252 If a server wishes to respond that it has no information regarding 253 the query, it returns a 404 response code. Optionally, it MAY 254 include additional information regarding the negative answer in the 255 HTTP entity body. 257 If a server wishes to inform the client that information about the 258 query is available, but cannot include the information in the 259 response to the client for policy reasons, the server MUST respond 260 with an appropriate response code out of HTTP's 4xx range. Clients 261 MAY retry the query based on the respective response code. 263 5.4. Malformed Queries 265 If a server receives a query which it cannot interpret as an RDAP 266 query, it returns a 400 response code. Optionally, it MAY include 267 additional information regarding this negative answer in the HTTP 268 entity body. 270 5.5. Rate Limits 272 Some servers apply rate limits to deter address scraping and other 273 abuses. When a server declines to answer a query due to rate limits, 274 it returns a 429 response code as described in [RFC6585]. A client 275 that receives a 429 response SHOULD decrease its query rate, and 276 honor the Retry-After header field if one is present. 278 Note that this is not a defense against denial-of-service attacks, 279 since a malicious client could ignore the code and continue to send 280 queries at a high rate. A server might use another response code if 281 it did not wish to reveal to a client that rate limiting is the 282 reason for the denial of a reply. 284 5.6. Cross-Origin Resource Sharing 286 When responding to queries, it is RECOMMENDED that servers use the 287 Access-Control-Allow-Origin header field, as specified by 288 [W3C.CR-cors-20130129]. 290 6. Extensibility 292 For extensibility purposes, this document defines an IANA registry 293 for prefixes used in JSON [RFC4627] data serialization and URI path 294 segments (see Section 8). 296 Prefixes and identifiers SHOULD only consist of the alphabetic ASCII 297 characters A through Z in both uppercase and lowercase, the numerical 298 digits 0 through 9, underscore characters, and SHOULD NOT begin with 299 an underscore character, numerical digit or the characters "xml". 300 The following describes the production of JSON names in ABNF 301 [RFC5234]. 303 ABNF for JSON names 305 name = ALPHA *( ALPHA / DIGIT / "_" ) 307 Figure 1 309 This restriction is a union of the Ruby programming language 310 identifier syntax and the XML element name syntax and has two 311 purposes. First, client implementers using modern programming 312 languages such as Ruby or Java can use libraries that automatically 313 promote JSON names to first order object attributes or members. 314 Second, a clean mapping between JSON and XML is easy to accomplish 315 using these rules. 317 7. Security Considerations 319 This document does not pose strong security requirements to the RDAP 320 protocol. However, it does not restrict against the use of security 321 mechanisms offered by the HTTP protocol. 323 This document made recommendations for server implementations against 324 denial-of-service (Section 5.5) and interoperability with existing 325 security mechanism in HTTP clients (Section 5.6). 327 Additional security considerations to the RDAP protocol will be 328 covered in future RFCs documenting specific security mechanisms and 329 schemes. 331 8. IANA Considerations 333 8.1. RDAP Extensions Registry 335 This specification proposes an IANA registry for RDAP extensions. 336 The purpose of this registry is to ensure uniqueness of extension 337 identifiers. The extension identifier is used as a prefix in JSON 338 names and as a prefix of path segments in RDAP URLs. 340 The production rule for these identifiers is specified in Section 6. 342 In accordance with RFC5226, the IANA policy for assigning new values 343 shall be Specification Required: values and their meanings must be 344 documented in an RFC or in some other permanent and readily available 345 reference, in sufficient detail that interoperability between 346 independent implementations is possible. 348 The following is a preliminary template for an RDAP extension 349 registration: 351 Extension identifier: the identifier of the extension 353 Registry operator: the name of the registry operator 355 Published specification: RFC number, bibliographical reference or 356 URL to a permanent and readily available specification 358 Person & email address to contact for further information: The 359 names and email addresses of individuals for contact regarding 360 this registry entry 362 Intended usage: brief reasons for this registry entry 364 The following is an example of a registration in the RDAP extension 365 registry: 367 Extension identifier: lunarNic 369 Registry operator: The Registry of the Moon, LLC 371 Published specification: http://www.example/moon_apis/rdap 373 Person & email address to contact for further information: 374 Professor Bernardo de la Paz 376 Intended usage: COMMON 378 9. Internationalization Considerations 380 9.1. URIs and IRIs 382 Clients can use IRIs [RFC3987] for internal use as they see fit, but 383 MUST transform them to URIs [RFC3986] for interaction with RDAP 384 servers. RDAP servers MUST use URIs in all responses, and again 385 clients can transform these URIs to IRIs for internal use as they see 386 fit. 388 9.2. Language Identifiers in Queries and Responses 390 Under most scenarios, clients requesting data will not signal that 391 the data be returned in a particular language or script. On the 392 other hand, when servers return data and have knowledge that the data 393 is in a language or script, the data SHOULD be annotated with 394 language identifiers whenever they are available, thus allowing 395 clients to process and display the data accordingly. 397 The mechanism for including a language identifier in a response will 398 be defined in subsequent documents describing specific response 399 formats. 401 9.3. Language Identifiers in HTTP Headers 403 Given the description of the use of language identifiers in 404 Section 9.2, unless otherwise specified servers SHOULD ignore the 405 HTTP [RFC2616] Accept-Language header field when formulating HTTP 406 entity responses, so that clients do not conflate the Accept-Language 407 header with the 'lang' values in the entity body. 409 However, servers MAY return language identifiers in the Content- 410 Language header field so as to inform clients of the intended 411 language of HTTP layer messages. 413 10. Contributing Authors and Acknowledgements 415 John Levine provided text to tighten up the Accept header field usage 416 and the text for the section on 429 responses. 418 Marc Blanchet provided some clarifying text regarding the use of URLs 419 with redirects, as well as very useful feedback during WGLC. 421 Normative language reviews were provided by Murray S. Kucherawy and 422 Andrew Sullivan. 424 Jean-Phillipe Dionne provided text for the Security Considerations 425 section. 427 11. References 429 11.1. Normative References 431 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 432 Requirement Levels", BCP 14, RFC 2119, March 1997. 434 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 435 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 436 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 438 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 439 Resource Identifier (URI): Generic Syntax", STD 66, RFC 440 3986, January 2005. 442 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 443 Identifiers (IRIs)", RFC 3987, January 2005. 445 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 446 Codes", RFC 6585, April 2012. 448 [W3C.CR-cors-20130129] 449 Kesteren, A., "Cross-Origin Resource Sharing", World Wide 450 Web Consortium Candidate Recommendation CR-cors-20130129, 451 January 2013, 452 . 454 11.2. Informative References 456 [RFC3912] Daigle, L., "WHOIS Protocol Specification", RFC 3912, 457 September 2004. 459 [RFC4627] Crockford, D., "The application/json Media Type for 460 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 462 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 463 Specifications: ABNF", STD 68, RFC 5234, January 2008. 465 [RFC5890] Klensin, J., "Internationalized Domain Names for 466 Applications (IDNA): Definitions and Document Framework", 467 RFC 5890, August 2010. 469 [SAC-051] Piscitello, D., Ed., "SSAC Report on Domain Name WHOIS 470 Terminology and Structure", September 2011. 472 Appendix A. Protocol Example 474 To demonstrate typical behaviour of an RDAP client and server, the 475 following is an example of an exchange, including a redirect. The 476 data in the response has been elided for brevity, as the data format 477 is not described in this document. 479 An example of an RDAP client and server exchange: 481 Client: 482 483 GET /ip/203.0.113.0/24 HTTP/1.1 484 Host: rdap.example.com 485 Accept: application/rdap+json 487 rdap.example.com: 488 HTTP 301 Moved Permanently 489 Location: http://rdap-ip.example.com/ip/203.0.113.0/24 490 Content-Length: 0 491 Content-Type: application/rdap+json; charset=UTF-8 492 494 Client: 495 496 GET /ip/203.0.113.0/24 HTTP/1.1 497 Host: rdap-ip.example.com 498 Accept: application/rdap+json 500 rdap-ip.example.com: 501 HTTP 200 OK 502 Content-Type: application/rdap+json; charset=UTF-8 503 Content-Length: 9001 505 { ... } 506 508 Appendix B. Cache Busting 510 Some HTTP [RFC2616] cache infrastructure does not adhere to caching 511 standards adequately, and could cache responses longer than is 512 intended by the server. To overcome these issues, clients can use an 513 adhoc and improbably used query parameter with a random value of 514 their choosing. As Section 4.2 instructs servers to ignore unknown 515 parameters, this is unlikely to have any known side effects. 517 An example of using an unknown query parameter to bust caches: 519 http://example.com/ip/192.0.2.0?__fuhgetaboutit=xyz123 521 Use of an unknown parameter to overcome misbehaving caches is not 522 part of any specification and is offered here for informational 523 purposes. 525 Appendix C. Changelog 527 RFC Editor: Please remove this section. 529 Initial WG -00: Updated to working group document 2012-September-20 531 -01 533 * Updated for the sections moved to the JSON responses draft. 535 * Simplified media type, removed "level" parameter. 537 * Updated 2119 language and added boilerplate. 539 * In section 1, noted that redirects can go to redirect servers 540 as well. 542 * Added Section 9.2 and Section 9.3. 544 -02 546 * Added a section on 429 response codes. 548 * Changed Accept header language in section 4.1 550 * Removed reference to the now dead requirements draft. 552 * Added contributing authors and acknowledgements section. 554 * Added some clarifying text regarding complete URLs in the 555 redirect section. 557 * Changed media type to application/rdap+json 559 * Added media type registration 561 -03 562 * Removed forward reference to draft-ietf-weirds-json-response. 564 * Added reference and recommended usage of CORS 566 -04 568 * Revised introduction and abstract. 570 * Added negative responses other than 404. 572 * Added security considerations. 574 * Added and corrected references: CORS, RFC3912, RFC3987, 575 RFC5890. 577 * Expanded on first use several acronyms. 579 * Updated 2119 language. 581 -05 583 * Update the media type registration. 585 * Further explained the SHOULD in section 5. 587 * Split the references into normative and informative. 589 * Other minor fixes. 591 -06 593 * Rewritten the third paragraph in Section 3 to avoid 594 contradictions 596 * Simplified the wording in Seciton 5.1. 598 * Removed some RFC 2119 words in Section 5.2, 5.3, 5.4 and 5.5. 600 * Corrected RFC 6839 as an informative reference. 602 * Replaced MAYs with cans in Seciton 9.1. 604 * Replaced MAY with can in Appendix B. 606 * Added a note in in Appendix C for the RFC Editor to remove this 607 section. 609 -07 610 * Dropped reference to MUST with application/rdap+json 612 * Dropped IANA registration of application/rdap+json 614 -08 616 * Keep alive version. 618 Authors' Addresses 620 Andrew Lee Newton 621 American Registry for Internet Numbers 622 3635 Concorde Parkway 623 Chantilly, VA 20151 624 US 626 Email: andy@arin.net 627 URI: http://www.arin.net 629 Byron J. Ellacott 630 Asia Pacific Network Information Center 631 6 Cordelia Street 632 South Brisbane QLD 4101 633 Australia 635 Email: bje@apnic.net 636 URI: http://www.apnic.net 638 Ning Kong 639 China Internet Network Information Center 640 4 South 4th Street, Zhongguancun, Haidian District 641 Beijing 100190 642 China 644 Phone: +86 10 5881 3147 645 Email: nkong@cnnic.cn