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