idnits 2.17.1 draft-ietf-weirds-using-http-07.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 (July 03, 2013) is 3950 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: January 04, 2014 APNIC 6 N. Kong 7 CNNIC 8 July 03, 2013 10 HTTP usage in the Registration Data Access Protocol (RDAP) 11 draft-ietf-weirds-using-http-07 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 January 04, 2014. 36 Copyright Notice 38 Copyright (c) 2013 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. 187 HTTP also benefits from widespread investment in scalability, 188 reliability, and performance, and widespread programmer understanding 189 of client behaviours for RESTful web services, reducing the cost to 190 deploy Registration Data Directory Services and clients. 192 4. Queries 194 4.1. Accept Header 196 To indicate to servers that an RDAP response is desired, clients 197 include an Accept: header field with an RDAP specific JSON media 198 type, the generic JSON media type, or both. Servers receiving an 199 RDAP request return an entity with a Content-Type: header containing 200 the RDAP specific JSON media type. 202 This specification does not define the responses a server returns to 203 a request with any other media types in the Accept: header field, or 204 with no Accept: header field. One possibility would be to return a 205 response in a media type suitable for rendering in a web browser. 207 4.2. Query Parameters 209 Servers MUST ignore unknown query parameters. Use of unknown query 210 parameters for cache-busting is described in Appendix B. 212 5. Types of HTTP Response 214 This section describes the various types of responses a server may 215 send to a client. While no standard HTTP response code is forbidden 216 in usage, at a minimum clients SHOULD understand the response codes 217 described in this section as they will be in common use by servers. 218 It is expected that usage of response codes and types for this 219 application not defined here will be described in subsequent 220 documents. 222 5.1. Positive Answers 224 If a server has the information requested by the client and wishes to 225 respond to the client with the information according to its policies, 226 it returns that answer in the body of a 200 response. 228 5.2. Redirects 230 If a server wishes to inform a client that the answer to a given 231 query can be found elsewhere, it returns either a 301 response code 232 to indicate a permanent move, or a 302, 303 or 307 response code to 233 indicate a non-permanent redirection, and it includes an HTTP(s) URL 234 in the Location: header field. The client is expected to issue a 235 subsequent request to satisfy the original query using the given URL 236 without any processing of the URL. In other words, the server is to 237 hand back a complete URL and the client should not have to transform 238 the URL to follow it. 240 For this application, such an example of a permanent move might be a 241 Top Level Domain (TLD) operator informing a client the information 242 being sought can be found with another TLD operator (i.e. a query for 243 the domain bar in foo.example is found at http://foo.example/domain/ 244 bar). 246 For example, if the client sends http://serv1.example.com/weirds/ 247 domain/example.com, the server redirecting to https:// 248 serv2.example.net/weirds2/ would set the Location: field to the 249 value: https://serv2.example.net/weirds2/domain/example.com. 251 5.3. Negative Answers 253 If a server wishes to respond that it has no information regarding 254 the query, it returns a 404 response code. Optionally, it MAY 255 include additional information regarding the negative answer in the 256 HTTP entity body. 258 If a server wishes to inform the client that information about the 259 query is available, but cannot include the information in the 260 response to the client for policy reasons, the server MUST respond 261 with an appropriate response code out of HTTP's 4xx range. Clients 262 MAY retry the query based on the respective response code. 264 5.4. Malformed Queries 266 If a server receives a query which it cannot interpret as an RDAP 267 query, it returns a 400 response code. Optionally, it MAY include 268 additional information regarding this negative answer in the HTTP 269 entity body. 271 5.5. Rate Limits 273 Some servers apply rate limits to deter address scraping and other 274 abuses. When a server declines to answer a query due to rate limits, 275 it returns a 429 response code as described in [RFC6585]. A client 276 that receives a 429 response SHOULD decrease its query rate, and 277 honor the Retry-After header field if one is present. 279 Note that this is not a defense against denial-of-service attacks, 280 since a malicious client could ignore the code and continue to send 281 queries at a high rate. A server might use another response code if 282 it did not wish to reveal to a client that rate limiting is the 283 reason for the denial of a reply. 285 5.6. Cross-Origin Resource Sharing 287 When responding to queries, it is RECOMMENDED that servers use the 288 Access-Control-Allow-Origin header field, as specified by 289 [W3C.CR-cors-20130129]. 291 6. Extensibility 293 For extensibility purposes, this document defines an IANA registry 294 for prefixes used in JSON [RFC4627] data serialization and URI path 295 segments (see Section 8). 297 Prefixes and identifiers SHOULD only consist of the alphabetic ASCII 298 characters A through Z in both uppercase and lowercase, the numerical 299 digits 0 through 9, underscore characters, and SHOULD NOT begin with 300 an underscore character, numerical digit or the characters "xml". 301 The following describes the production of JSON names in ABNF 302 [RFC5234]. 304 ABNF for JSON names 306 name = ALPHA *( ALPHA / DIGIT / "_" ) 308 Figure 1 310 This restriction is a union of the Ruby programming language 311 identifier syntax and the XML element name syntax and has two 312 purposes. First, client implementers using modern programming 313 languages such as Ruby or Java can use libraries that automatically 314 promote JSON names to first order object attributes or members. 315 Second, a clean mapping between JSON and XML is easy to accomplish 316 using these rules. 318 7. Security Considerations 320 This document does not pose strong security requirements to the RDAP 321 protocol. However, it does not restrict against the use of security 322 mechanisms offered by the HTTP protocol. 324 This document made recommendations for server implementations against 325 denial-of-service (Section 5.5) and interoperability with existing 326 security mechanism in HTTP clients (Section 5.6). 328 Additional security considerations to the RDAP protocol will be 329 covered in future RFCs documenting specific security mechanisms and 330 schemes. 332 8. IANA Considerations 334 8.1. RDAP Extensions Registry 336 This specification proposes an IANA registry for RDAP extensions. 337 The purpose of this registry is to ensure uniqueness of extension 338 identifiers. The extension identifier is used as a prefix in JSON 339 names and as a prefix of path segments in RDAP URLs. 341 The production rule for these identifiers is specified in Section 6. 343 In accordance with RFC5226, the IANA policy for assigning new values 344 shall be Specification Required: values and their meanings must be 345 documented in an RFC or in some other permanent and readily available 346 reference, in sufficient detail that interoperability between 347 independent implementations is possible. 349 The following is a preliminary template for an RDAP extension 350 registration: 352 Extension identifier: the identifier of the extension 354 Registry operator: the name of the registry operator 356 Published specification: RFC number, bibliographical reference or 357 URL to a permanent and readily available specification 359 Person & email address to contact for further information: The 360 names and email addresses of individuals for contact regarding 361 this registry entry 363 Intended usage: brief reasons for this registry entry 365 The following is an example of a registration in the RDAP extension 366 registry: 368 Extension identifier: lunarNic 370 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 509 Some HTTP [RFC2616] cache infrastructure does not adhere to caching 510 standards adequately, and could cache responses longer than is 511 intended by the server. To overcome these issues, clients can use an 512 adhoc and improbably used query parameter with a random value of 513 their choosing. As Section 4.2 instructs servers to ignore unknown 514 parameters, this is unlikely to have any known side effects. 516 An example of using an unknown query parameter to bust caches: 518 http://example.com/ip/192.0.2.0?__fuhgetaboutit=xyz123 520 Use of an unknown parameter to overcome misbehaving caches is not 521 part of any specification and is offered here for informational 522 purposes. 524 Appendix C. Changelog 526 RFC Editor: Please remove this section. 528 Initial WG -00: Updated to working group document 2012-September-20 530 -01 532 * Updated for the sections moved to the JSON responses draft. 534 * Simplified media type, removed "level" parameter. 536 * Updated 2119 language and added boilerplate. 538 * In section 1, noted that redirects can go to redirect servers 539 as well. 541 * Added Section 9.2 and Section 9.3. 543 -02 545 * Added a section on 429 response codes. 547 * Changed Accept header language in section 4.1 549 * Removed reference to the now dead requirements draft. 551 * Added contributing authors and acknowledgements section. 553 * Added some clarifying text regarding complete URLs in the 554 redirect section. 556 * Changed media type to application/rdap+json 558 * Added media type registration 560 -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 611 * Dropped reference to MUST with application/rdap+json 613 * Dropped IANA registration of application/rdap+json 615 Authors' Addresses 617 Andrew Lee Newton 618 American Registry for Internet Numbers 619 3635 Concorde Parkway 620 Chantilly, VA 20151 621 US 623 Email: andy@arin.net 624 URI: http://www.arin.net 626 Byron J. Ellacott 627 Asia Pacific Network Information Center 628 6 Cordelia Street 629 South Brisbane QLD 4101 630 Australia 632 Email: bje@apnic.net 633 URI: http://www.apnic.net 635 Ning Kong 636 China Internet Network Information Center 637 4 South 4th Street, Zhongguancun, Haidian District 638 Beijing 100190 639 China 641 Phone: +86 10 5881 3147 642 Email: nkong@cnnic.cn