idnits 2.17.1 draft-nottingham-rfc5785bis-11.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 abstract seems to contain references ([2], [3], [4], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document updates RFC7230, but the abstract doesn't seem to directly say this. It does mention RFC7230 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC7230, updated by this document, for RFC5378 checks: 2007-12-21) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 8, 2019) is 1846 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) -- Looks like a reference, but probably isn't: '1' on line 522 -- Looks like a reference, but probably isn't: '2' on line 524 -- Looks like a reference, but probably isn't: '3' on line 526 -- Looks like a reference, but probably isn't: '4' on line 528 -- Looks like a reference, but probably isn't: '5' on line 530 == Missing Reference: 'RFC7252' is mentioned on line 412, but not defined == Missing Reference: 'RFC8323' is mentioned on line 414, but not defined ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) -- Obsolete informational reference (is this intentional?): RFC 5785 (Obsoleted by RFC 8615) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7320 (Obsoleted by RFC 8820) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft April 8, 2019 4 Obsoletes: 5785 (if approved) 5 Updates: 7595, 7230 (if approved) 6 Intended status: Standards Track 7 Expires: October 10, 2019 9 Well-Known Uniform Resource Identifiers (URIs) 10 draft-nottingham-rfc5785bis-11 12 Abstract 14 This memo defines a path prefix for "well-known locations", "/.well- 15 known/", in selected Uniform Resource Identifier (URI) schemes. 17 In doing so, it obsoletes RFC 5785, and updates the URI schemes 18 defined in RFC 7230 to reserve that space. It also updates RFC 7595 19 to track URI schemes that support well-known URIs in their registry. 21 Note to Readers 23 _RFC EDITOR: please remove this section before publication_ 25 This draft is a proposed revision of RFC5875. 27 The issues list for this draft can be found at 28 https://github.com/mnot/I-D/labels/rfc5785bis [1]. 30 The most recent (often, unpublished) draft is at 31 https://mnot.github.io/I-D/rfc5785bis/ [2]. 33 Recent changes are listed at https://github.com/mnot/I-D/commits/gh- 34 pages/rfc5785bis [3]. 36 See also the draft's current status in the IETF datatracker, at 37 https://datatracker.ietf.org/doc/draft-nottingham-rfc5785bis/ [4]. 39 Status of This Memo 41 This Internet-Draft is submitted in full conformance with the 42 provisions of BCP 78 and BCP 79. 44 Internet-Drafts are working documents of the Internet Engineering 45 Task Force (IETF). Note that other groups may also distribute 46 working documents as Internet-Drafts. The list of current Internet- 47 Drafts is at https://datatracker.ietf.org/drafts/current/. 49 Internet-Drafts are draft documents valid for a maximum of six months 50 and may be updated, replaced, or obsoleted by other documents at any 51 time. It is inappropriate to use Internet-Drafts as reference 52 material or to cite them other than as "work in progress." 54 This Internet-Draft will expire on October 10, 2019. 56 Copyright Notice 58 Copyright (c) 2019 IETF Trust and the persons identified as the 59 document authors. All rights reserved. 61 This document is subject to BCP 78 and the IETF Trust's Legal 62 Provisions Relating to IETF Documents 63 (https://trustee.ietf.org/license-info) in effect on the date of 64 publication of this document. Please review these documents 65 carefully, as they describe your rights and restrictions with respect 66 to this document. Code Components extracted from this document must 67 include Simplified BSD License text as described in Section 4.e of 68 the Trust Legal Provisions and are provided without warranty as 69 described in the Simplified BSD License. 71 Table of Contents 73 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 74 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 75 3. Well-Known URIs . . . . . . . . . . . . . . . . . . . . . . . 4 76 3.1. Registering Well-Known URIs . . . . . . . . . . . . . . . 5 77 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 78 4.1. Protecting Well-Known Resources . . . . . . . . . . . . . 6 79 4.2. Interaction with Web Browsing . . . . . . . . . . . . . . 7 80 4.3. Scoping Applications . . . . . . . . . . . . . . . . . . 8 81 4.4. Hidden Capabilities . . . . . . . . . . . . . . . . . . . 8 82 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 83 5.1. The Well-Known URI Registry . . . . . . . . . . . . . . . 8 84 5.2. The Uniform Resource Identifier (URI) Schemes Registry . 9 85 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 86 6.1. Normative References . . . . . . . . . . . . . . . . . . 10 87 6.2. Informative References . . . . . . . . . . . . . . . . . 10 88 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 12 89 Appendix A. Frequently Asked Questions . . . . . . . . . . . . . 12 90 Appendix B. Changes from RFC5785 . . . . . . . . . . . . . . . . 12 91 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13 93 1. Introduction 95 Some applications on the Web require the discovery of information 96 about an origin [RFC6454] (sometimes called "site-wide metadata") 97 before making a request. For example, the Robots Exclusion Protocol 98 (http://www.robotstxt.org/ [5]) specifies a way for automated 99 processes to obtain permission to access resources; likewise, the 100 Platform for Privacy Preferences [P3P] tells user-agents how to 101 discover privacy policy before interacting with an origin server. 103 While there are several ways to access per-resource metadata (e.g., 104 HTTP header fields, WebDAV's PROPFIND [RFC4918]), the perceived 105 overhead (either in terms of client-perceived latency and/or 106 deployment difficulties) associated with them often precludes their 107 use in these scenarios. 109 At the same time, it has become more popular to use HTTP as a 110 substrate for non-Web protocols. Sometimes, such protocols need a 111 way to locate one or more resources on a given host. 113 When this happens, one solution is to designate a "well-known 114 location" for data or services related to the origin overall, so that 115 it can be easily located. However, this approach has the drawback of 116 risking collisions, both with other such designated "well-known 117 locations" and with resources that the origin has created (or wishes 118 to create). Furthermore, defining well-known locations usurp's the 119 origin's control over its own URI space [RFC7320]. 121 To address these uses, this memo reserves a path prefix in HTTP, 122 HTTPS, WS and WSS URIs for these "well-known locations", "/.well- 123 known/". Future specifications that need to define a resource for 124 such metadata can register their use to avoid collisions and minimise 125 impingement upon origins' URI space. 127 Well-known URIs can also be used with other URI schemes, but only 128 when those schemes' definitions explicitly allow it. 130 2. Notational Conventions 132 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 133 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 134 "OPTIONAL" in this document are to be interpreted as described in BCP 135 14 [RFC2119] [RFC8174] when, and only when, they appear in all 136 capitals, as shown here. 138 3. Well-Known URIs 140 A well-known URI is a URI [RFC3986] whose path component begins with 141 the characters "/.well-known/", provided that the scheme is 142 explicitly defined to support well-known URIs. 144 For example, if an application registers the name 'example', the 145 corresponding well-known URI on 'http://www.example.com/' would be 146 'http://www.example.com/.well-known/example'. 148 This specification updates the "http" [RFC7230] and "https" [RFC7230] 149 schemes to support well-known URIs. Other existing schemes can use 150 the appropriate process for updating their definitions; for example, 151 [RFC8307] does so for the "ws" and "wss" schemes. The Uniform 152 Resource Identifier (URI) Schemes Registry tracks which schemes 153 support well-known URIs; see Section 5.2. 155 Applications that wish to mint new well-known URIs MUST register 156 them, following the procedures in Section 5.1, subject to the 157 following requirements. 159 Registered names MUST conform to the segment-nz production in 160 [RFC3986]. This means they cannot contain the "/" character. 162 Registered names for a specific application SHOULD be correspondingly 163 precise; "squatting" on generic terms is not encouraged. For 164 example, if the Example application wants a well-known location for 165 metadata, an appropriate registered name might be "example-metadata" 166 or even "example.com-metadata", not "metadata". 168 At a minimum, a registration will reference a specification that 169 defines the format and associated media type(s) to be obtained by 170 dereferencing the well-known URI, along with the URI scheme(s) that 171 the well-known URI can be used with. If no URI schemes are 172 explicitly specified, "http" and "https" are assumed. 174 Typically, applications will use the default port for the given 175 scheme; if an alternative port is used, it MUST be explicitly 176 specified by the application in question. 178 Registrations MAY also contain additional information, such as the 179 syntax of additional path components, query strings and/or fragment 180 identifiers to be appended to the well-known URI, or protocol- 181 specific details (e.g., HTTP [RFC7231] method handling). 183 Note that this specification defines neither how to determine the 184 hostname to use to find the well-known URI for a particular 185 application, nor the scope of the metadata discovered by 186 dereferencing the well-known URI; both should be defined by the 187 application itself. 189 Also, this specification does not define a format or media-type for 190 the resource located at "/.well-known/" and clients should not expect 191 a resource to exist at that location. 193 Well-known URIs are rooted in the top of the path's hierarchy; they 194 are not well-known by definition in other parts of the path. For 195 example, "/.well-known/example" is a well-known URI, whereas 196 "/foo/.well-known/example" is not. 198 See also Section 4 for Security Considerations regarding well-known 199 locations. 201 3.1. Registering Well-Known URIs 203 The "Well-Known URIs" registry is located at 204 "https://www.iana.org/assignments/well-known-uris/". Registration 205 requests can be made by following the instructions located there or 206 by sending an email to the "wellknown-uri-review@ietf.org" mailing 207 list. 209 Registration requests consist of at least the following information: 211 URI suffix: The name requested for the well-known URI, relative to 212 "/.well-known/"; e.g., "example". 214 Change controller: For Standards-Track RFCs, state "IETF". For 215 others, give the name of the responsible party. Other details 216 (e.g., e-mail address, home page URI) may also be included. 218 Specification document(s): Reference to the document that specifies 219 the field, preferably including a URI that can be used to retrieve 220 a copy of the document. An indication of the relevant sections 221 may also be included, but is not required. 223 Status: One of "permanent" or "provisional". See guidance below. 225 Related information: Optionally, citations to additional documents 226 containing further relevant information. 228 General requirements for registered values are described in 229 Section 3. 231 Values defined by standards-track RFCs and other open standards (in 232 the sense of [RFC2026], Section 7.1.1) have a status of "permanent". 233 Other values can also be registered as permanent, if the Experts find 234 that they are in use, in consultation with the community. Other 235 values should be registered as "provisional". 237 Provisional entries can be removed by the Experts if - in 238 consultation with the community - the Experts find that they are not 239 in use. The Experts can change a provisional entry's status to 240 permanent; in doing so, the Experts should consider how widely used a 241 value is, and consult the community beforehand. 243 Note that "consult with the community" above refers to those 244 responsible for the URI scheme(s) in question. Generally, this would 245 take place on the mailing list(s) of the appropriate Working Group(s) 246 (possibly historical), or on art@ietf.org if no such list exists. 248 Well-known URIs can be registered by third parties (including the 249 expert(s)), if the expert(s) determine that an unregistered well- 250 known URI is widely deployed and not likely to be registered in a 251 timely manner otherwise. Such registrations still are subject to the 252 requirements defined, including the need to reference a 253 specification. 255 4. Security Considerations 257 Applications minting new well-known URIs, as well as administrators 258 deploying them, will need to consider several security-related 259 issues, including (but not limited to) exposure of sensitive data, 260 denial-of-service attacks (in addition to normal load issues), server 261 and client authentication, vulnerability to DNS rebinding attacks, 262 and attacks where limited access to a server grants the ability to 263 affect how well-known URIs are served. 265 [RFC3552] contains some examples of potential security considerations 266 that may be relevant to application protocols and administrators 267 deploying them. 269 4.1. Protecting Well-Known Resources 271 Because well-known locations effectively represent the entire origin, 272 server operators should appropriately control the ability to write to 273 them. This is especially true when more than one entity is co- 274 located on the same origin. Even for origins that are controlled by 275 and represent a single entity, due care should be taken to assure 276 that write access to well-known locations is not granted unwittingly, 277 either externally through server configuration, or locally through 278 implementation permissions (e.g., on a filesystem). 280 4.2. Interaction with Web Browsing 282 Applications using well-known URIs for "http" or "https" URLs need to 283 be aware that well-known resources will be accessible to Web 284 browsers, and therefore are able to be manipulated by content 285 obtained from other parts of that origin. If an attacker is able to 286 inject content (e.g., through a Cross-Site Scripting vulnerability), 287 they will be able to make potentially arbitrary requests to the well- 288 known resource. 290 HTTP and HTTPS also use origins as a security boundary for many other 291 mechanisms, including (but not limited to) Cookies [RFC6265], Web 292 Storage [WEBSTORAGE] and many capabilities. 294 Applications defining well-known locations should not assume that 295 they have sole access to these mechanisms, or that they are the only 296 application using the origin. Depending on the nature of the 297 application, mitigations can include: 299 o Encrypting sensitive information 301 o Allowing flexibility in the use of identifiers (e.g., Cookie 302 names) to avoid collisions with other applications 304 o Using the 'HttpOnly' flag on Cookies to assure that cookies are 305 not exposed to browser scripting languages [RFC6265] 307 o Using the 'Path' parameter on Cookies to assure that they are not 308 available to other parts of the origin [RFC6265] 310 o Using X-Content-Type-Options: nosniff [FETCH] to assure that 311 content under attacker control can't be coaxed into a form that is 312 interpreted as active content by a Web browser 314 Other good practices include: 316 o Using an application-specific media type in the Content-Type 317 header field, and requiring clients to fail if it is not used 319 o Using Content-Security-Policy [CSP] to constrain the capabilities 320 of active content (such as HTML [HTML5]), thereby mitigating 321 Cross-Site Scripting attacks 323 o Using Referrer-Policy [REFERRER-POLICY] to prevent sensitive data 324 in URLs from being leaked in the Referer request header field 326 o Avoiding use of compression on any sensitive information (e.g., 327 authentication tokens, passwords), as the scripting environment 328 offered by Web browsers allows an attacker to repeatedly probe the 329 compression space; if the attacker has access to the path of the 330 communication, they can use this capability to recover that 331 information. 333 4.3. Scoping Applications 335 This memo does not specify the scope of applicability for the 336 information obtained from a well-known URI, and does not specify how 337 to discover a well-known URI for a particular application. 339 Individual applications using this mechanism must define both 340 aspects; if this is not specified, security issues can arise from 341 implementation deviations and confusion about boundaries between 342 applications. 344 Applying metadata discovered in a well-known URI to resources other 345 than those co-located on the same origin risks administrative as well 346 as security issues. For example, allowing 347 "https://example.com/.well-known/example" to apply policy to 348 "https://department.example.com", "https://www.example.com" or even 349 "https://www.example.com:8000" assumes a relationship between hosts 350 where there might be none, giving control to a potential attacker. 352 Likewise, specifying that a well-known URI on a particular hostname 353 is to be used to bootstrap a protocol can cause a large number of 354 undesired requests. For example, if a well-known HTTPS URI is used 355 to find policy about a separate service such as e-mail, it can result 356 in a flood of requests to Web servers, even if they don't implement 357 the well-known URI. Such undesired requests can resemble a denial- 358 of-services attack. 360 4.4. Hidden Capabilities 362 Applications using well-known locations should consider that some 363 server administrators might be unaware of its existence (especially 364 on operating systems that hide directories whose names begin with 365 "."). This means that if an attacker has write access to the .well- 366 known directory, they would be able to control its contents, possibly 367 without the administrator realising it. 369 5. IANA Considerations 371 5.1. The Well-Known URI Registry 373 This specification updates the registration procedures for the "Well- 374 Known URI" registry, first defined in [RFC5785]; see Section 3.1. 376 Well-known URIs are registered on the advice of one or more Experts, 377 with a Specification Required (using terminology from [RFC8126]). 379 The Experts' primary considerations in evaluating registration 380 requests are: 382 o Conformance to the requirements in Section 3 384 o The availability and stability of the specifying document 386 o The considerations outlined in Section 4 388 IANA will direct any incoming requests regarding the registry to this 389 document and, if defined, the processes established by the expert(s); 390 typically, this will mean referring them to the registry Web page. 392 Upon publication, IANA should: 394 o Update the status of all existing registrations to "permanent". 396 5.2. The Uniform Resource Identifier (URI) Schemes Registry 398 This specification adds a field to the registration template of the 399 Uniform Resource Identifier (URI) Schemes Registry, with the name 400 "Well-Known URI Support" and a default value of "-". 402 If a URI scheme explicitly has been specified to use well-known URIs 403 as per Section 3, the value changes to a reference to that 404 specification. Initial values not equal to "-" are given in Table 1. 406 +------------+------------------------+ 407 | URI Scheme | Well-Known URI Support | 408 +------------+------------------------+ 409 | coap | [RFC7252] | 410 | coap+tcp | [RFC8323] | 411 | coap+ws | [RFC8323] | 412 | coaps | [RFC7252] | 413 | coaps+tcp | [RFC8323] | 414 | coaps+ws | [RFC8323] | 415 | http | [this document] | 416 | https | [this document] | 417 | ws | [RFC8307] | 418 | wss | [RFC8307] | 419 +------------+------------------------+ 421 Table 1: Rows in URI scheme registry with nonempty new column 423 6. References 425 6.1. Normative References 427 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 428 Requirement Levels", BCP 14, RFC 2119, 429 DOI 10.17487/RFC2119, March 1997, 430 . 432 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 433 Resource Identifier (URI): Generic Syntax", STD 66, 434 RFC 3986, DOI 10.17487/RFC3986, January 2005, 435 . 437 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 438 DOI 10.17487/RFC6454, December 2011, 439 . 441 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 442 Protocol (HTTP/1.1): Message Syntax and Routing", 443 RFC 7230, DOI 10.17487/RFC7230, June 2014, 444 . 446 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 447 Writing an IANA Considerations Section in RFCs", BCP 26, 448 RFC 8126, DOI 10.17487/RFC8126, June 2017, 449 . 451 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 452 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 453 May 2017, . 455 6.2. Informative References 457 [CSP] West, M., "Content Security Policy Level 3", World Wide 458 Web Consortium WD WD-CSP3-20160913, September 2016, 459 . 461 [FETCH] WHATWG, "Fetch - Living Standard", n.d., 462 . 464 [HTML5] WHATWG, "HTML - Living Standard", n.d., 465 . 467 [P3P] Marchiori, M., "The Platform for Privacy Preferences 1.0 468 (P3P1.0) Specification", World Wide Web Consortium 469 Recommendation REC-P3P-20020416, April 2002, 470 . 472 [REFERRER-POLICY] 473 Eisinger, J. and E. Stark, "Referrer Policy", World Wide 474 Web Consortium CR CR-referrer-policy-20170126, January 475 2017, 476 . 478 [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 479 3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996, 480 . 482 [RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC 483 Text on Security Considerations", BCP 72, RFC 3552, 484 DOI 10.17487/RFC3552, July 2003, 485 . 487 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 488 Authoring and Versioning (WebDAV)", RFC 4918, 489 DOI 10.17487/RFC4918, June 2007, 490 . 492 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 493 Uniform Resource Identifiers (URIs)", RFC 5785, 494 DOI 10.17487/RFC5785, April 2010, 495 . 497 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 498 DOI 10.17487/RFC6265, April 2011, 499 . 501 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 502 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 503 DOI 10.17487/RFC7231, June 2014, 504 . 506 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 507 RFC 7320, DOI 10.17487/RFC7320, July 2014, 508 . 510 [RFC8307] Bormann, C., "Well-Known URIs for the WebSocket Protocol", 511 RFC 8307, DOI 10.17487/RFC8307, January 2018, 512 . 514 [WEBSTORAGE] 515 Hickson, I., "Web Storage (Second Edition)", World Wide 516 Web Consortium Recommendation REC-webstorage-20160419, 517 April 2016, 518 . 520 6.3. URIs 522 [1] https://github.com/mnot/I-D/labels/rfc5785bis 524 [2] https://mnot.github.io/I-D/rfc5785bis/ 526 [3] https://github.com/mnot/I-D/commits/gh-pages/rfc5785bis 528 [4] https://datatracker.ietf.org/doc/draft-nottingham-rfc5785bis/ 530 [5] http://www.robotstxt.org/ 532 Appendix A. Frequently Asked Questions 534 Aren't well-known locations bad for the Web? They are, but for 535 various reasons - both technical and social - they are sometimes 536 necessary. This memo defines a "sandbox" for them, to reduce the 537 risks of collision and to minimise the impact upon pre-existing 538 URIs on sites. 540 Why /.well-known? It's short, descriptive, and according to search 541 indices, not widely used. 543 What impact does this have on existing mechanisms, such as P3P and 544 robots.txt? 545 None, until they choose to use this mechanism. 547 Why aren't per-directory well-known locations defined? Allowing 548 every URI path segment to have a well-known location (e.g., 549 "/images/.well-known/") would increase the risks of colliding with 550 a pre-existing URI on a site, and generally these solutions are 551 found not to scale well, because they're too "chatty". 553 Appendix B. Changes from RFC5785 555 o Allow non-Web well-known locations 557 o Adjust IANA instructions 559 o Update references 561 o Various other clarifications 563 o Track supporting schemes in the URI Scheme registry 565 Author's Address 567 Mark Nottingham 569 Email: mnot@mnot.net 570 URI: https://www.mnot.net/