idnits 2.17.1 draft-nottingham-rfc5785bis-06.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 RFC5785, but the abstract doesn't seem to directly say this. It does mention RFC5785 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 -- The document date (May 24, 2018) is 2163 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 418 -- Looks like a reference, but probably isn't: '2' on line 420 -- Looks like a reference, but probably isn't: '3' on line 422 -- Looks like a reference, but probably isn't: '4' on line 424 -- Looks like a reference, but probably isn't: '5' on line 426 -- 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: 1 error (**), 0 flaws (~~), 1 warning (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft May 24, 2018 4 Obsoletes: 5785 (if approved) 5 Intended status: Standards Track 6 Expires: November 25, 2018 8 Well-Known Uniform Resource Identifiers (URIs) 9 draft-nottingham-rfc5785bis-06 11 Abstract 13 This memo defines a path prefix for "well-known locations", "/.well- 14 known/", in selected Uniform Resource Identifier (URI) schemes. 16 Note to Readers 18 _RFC EDITOR: please remove this section before publication_ 20 This draft is a proposed revision of RFC5875. 22 The issues list for this draft can be found at 23 https://github.com/mnot/I-D/labels/rfc5785bis [1]. 25 The most recent (often, unpublished) draft is at 26 https://mnot.github.io/I-D/rfc5785bis/ [2]. 28 Recent changes are listed at https://github.com/mnot/I-D/commits/gh- 29 pages/rfc5785bis [3]. 31 See also the draft's current status in the IETF datatracker, at 32 https://datatracker.ietf.org/doc/draft-nottingham-rfc5785bis/ [4]. 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at https://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on November 25, 2018. 50 Copyright Notice 52 Copyright (c) 2018 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (https://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 68 2. Notational Conventions . . . . . . . . . . . . . . . . . . . 3 69 3. Well-Known URIs . . . . . . . . . . . . . . . . . . . . . . . 3 70 3.1. Registering Well-Known URIs . . . . . . . . . . . . . . . 4 71 4. Security Considerations . . . . . . . . . . . . . . . . . . . 5 72 4.1. Interaction with Web Browsing . . . . . . . . . . . . . . 5 73 4.2. Scoping Applications . . . . . . . . . . . . . . . . . . 6 74 4.3. Hidden Capabilities . . . . . . . . . . . . . . . . . . . 7 75 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 76 5.1. The Well-Known URI Registry . . . . . . . . . . . . . . . 7 77 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 79 6.2. Informative References . . . . . . . . . . . . . . . . . 8 80 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 81 Appendix A. Frequently Asked Questions . . . . . . . . . . . . . 10 82 Appendix B. Changes from RFC5785 . . . . . . . . . . . . . . . . 10 83 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 85 1. Introduction 87 Some applications on the Web require the discovery of information 88 about an origin [RFC6454] (sometimes called "site-wide metadata") 89 before making a request. For example, the Robots Exclusion Protocol 90 (http://www.robotstxt.org/ [5]) specifies a way for automated 91 processes to obtain permission to access resources; likewise, the 92 Platform for Privacy Preferences [P3P] tells user-agents how to 93 discover privacy policy before interacting with an origin server. 95 While there are several ways to access per-resource metadata (e.g., 96 HTTP headers, WebDAV's PROPFIND [RFC4918]), the perceived overhead 97 (either in terms of client-perceived latency and/or deployment 98 difficulties) associated with them often precludes their use in these 99 scenarios. 101 At the same time, it has become more popular to use HTTP as a 102 substrate for non-Web protocols. Sometimes, such protocols need a 103 way to locate one or more resources on a given host. 105 When this happens, one solution is designating a "well-known 106 location" for data or services related to the origin overall, so that 107 it can be easily located. However, this approach has the drawback of 108 risking collisions, both with other such designated "well-known 109 locations" and with resources that the origin has created (or wishes 110 to create). Furthermore, defining well-known locations usurp's the 111 origin's control over its own URI space [RFC7320]. 113 To address these uses, this memo defines a path prefix in HTTP(S) 114 URIs for these "well-known locations", "/.well-known/". Future 115 specifications that need to define a resource for such metadata can 116 register their use to avoid collisions and minimise impingement upon 117 origins' URI space. 119 Well-known URIs can also be used with other URI schemes, but only 120 when those schemes' definitions explicitly allow it. 122 2. Notational Conventions 124 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 125 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 126 document are to be interpreted as described in RFC 2119 [RFC2119]. 128 3. Well-Known URIs 130 A well-known URI is a URI [RFC3986] whose path component begins with 131 the characters "/.well-known/", and whose scheme is "HTTP", "HTTPS", 132 or another scheme that has explicitly been specified to use well- 133 known URIs. 135 Applications that wish to mint new well-known URIs MUST register 136 them, following the procedures in Section 5.1. 138 For example, if an application registers the name 'example', the 139 corresponding well-known URI on 'http://www.example.com/' would be 140 'http://www.example.com/.well-known/example'. 142 Registered names MUST conform to the segment-nz production in 143 [RFC3986]. This means they cannot contain the "/" character. 145 Registered names for a specific application SHOULD be correspondingly 146 precise; "squatting" on generic terms is not encouraged. For 147 example, if the Example application wants a well-known location for 148 metadata, an appropriate registered name might be "example-metadata" 149 or even "example.com-metadata", not "metadata". 151 At a minimum, a registration will reference a specification that 152 defines the format and associated media type(s) to be obtained by 153 dereferencing the well-known URI, along with the URI scheme(s) that 154 the well-known URI can be used with. If no URI schemes are 155 explicitly specified, "HTTP" and "HTTPS" are assumed. 157 It MAY also contain additional information, such as the syntax of 158 additional path components, query strings and/or fragment identifiers 159 to be appended to the well-known URI, or protocol-specific details 160 (e.g., HTTP [RFC7231] method handling). 162 Note that this specification defines neither how to determine the 163 hostname to use to find the well-known URI for a particular 164 application, nor the scope of the metadata discovered by 165 dereferencing the well-known URI; both should be defined by the 166 application itself. 168 Also, this specification does not define a format or media-type for 169 the resource located at "/.well-known/" and clients should not expect 170 a resource to exist at that location. 172 Well-known URIs are only valid when rooted in the top of the path's 173 hierarchy; they MUST NOT be used in other parts of the path. For 174 example, "/.well-known/example" is a valid use, but "/foo/.well- 175 known/example" is not. 177 See also Section 4 for Security Considerations regarding well-known 178 locations. 180 3.1. Registering Well-Known URIs 182 The "Well-Known URIs" registry is located at 183 "https://www.iana.org/assignments/well-known-uris/". Registration 184 requests can be made by following the instructions located there or 185 by sending an email to the "wellknown-uri-review@ietf.org" mailing 186 list. 188 Registration requests consist of at least the following information: 190 URI suffix: The name requested for the well-known URI, relative to 191 "/.well-known/"; e.g., "example". 193 Change controller: For Standards-Track RFCs, state "IETF". For 194 others, give the name of the responsible party. Other details 195 (e.g., postal address, e-mail address, home page URI) may also be 196 included. 198 Specification document(s): Reference to the document that specifies 199 the field, preferably including a URI that can be used to retrieve 200 a copy of the document. An indication of the relevant sections 201 may also be included, but is not required. 203 Related information: Optionally, citations to additional documents 204 containing further relevant information. 206 General requirements for registered relation types are described in 207 Section 3. 209 Note that well-known URIs can be registered by third parties 210 (including the expert(s)), if the expert(s) determines that an 211 unregistered well-known URI is widely deployed and not likely to be 212 registered in a timely manner otherwise. Such registrations still 213 are subject to the requirements defined, including the need to 214 reference a specification. 216 4. Security Considerations 218 Applications minting new well-known URIs, as well as administrators 219 deploying them, will need to consider several security-related 220 issues, including (but not limited to) exposure of sensitive data, 221 denial-of-service attacks (in addition to normal load issues), server 222 and client authentication, vulnerability to DNS rebinding attacks, 223 and attacks where limited access to a server grants the ability to 224 affect how well-known URIs are served. 226 4.1. Interaction with Web Browsing 228 Applications using well-known URIs for HTTP or HTTPS URLs need to be 229 aware that well-known resources will be accessible to Web browsers, 230 and therefore are able to be manipulated by content obtained from 231 other parts of that origin. If an attacker is able to inject content 232 (e.g., through a Cross-Site Scripting vulnerability), they will be 233 able to make potentially arbitrary requests to the well-known 234 resource. 236 HTTP and HTTPS also use origins as a security boundary for many other 237 mechanisms, including (but not limited to) Cookies [RFC6265], Web 238 Storage [WEBSTORAGE] and many capabilities. 240 Applications defining well-known locations should not assume that 241 they have sole access to these mechanisms, or that they are the only 242 application using the origin. Depending on the nature of the 243 application, mitigations can include: 245 o Encrypting sensitive information 247 o Allowing flexibility in the use of identifiers (e.g., Cookie 248 names) to avoid collisions with other applications 250 o Using the 'HttpOnly' flag on Cookies to assure that cookies are 251 not exposed to browser scripting languages [RFC6265] 253 o Using the 'Path' parameter on Cookies to assure that they are not 254 available to other parts of the origin [RFC6265] 256 o Using X-Content-Type-Options: nosniff [FETCH] to assure that 257 content under attacker control can't be coaxed into a form that is 258 interpreted as active content by a Web browser 260 Other good practices include: 262 o Using an application-specific media type in the Content-Type 263 header, and requiring clients to fail if it is not used 265 o Using Content-Security-Policy [CSP] to constrain the capabilities 266 of active content (such as HTML [HTML5]), thereby mitigating 267 Cross-Site Scripting attacks 269 o Using Referrer-Policy [REFERRER-POLICY] to prevent sensitive data 270 in URLs from being leaked in the Referer request header 272 o Avoiding use of compression on any sensitive information (e.g., 273 authentication tokens, passwords), as the scripting environment 274 offered by Web browsers allows an attacker to repeatedly probe the 275 compression space; if the attacker has access to the path of the 276 communication, they can use this capability to recover that 277 information. 279 4.2. Scoping Applications 281 This memo does not specify the scope of applicability for the 282 information obtained from a well-known URI, and does not specify how 283 to discover a well-known URI for a particular application. 285 Individual applications using this mechanism must define both 286 aspects; if this is not specified, security issues can arise from 287 implementation deviations and confusion about boundaries between 288 applications. 290 Applying metadata discovered in a well-known URI to resources other 291 than those co-located on the same origin risks administrative as well 292 as security issues. For example, allowing 293 "https://example.com/.well-known/example" to apply policy to 294 "https://department.example.com", "https://www.example.com" or even 295 "https://www.example.com:8000" assumes a relationship between hosts 296 where there might be none, giving control to a potential attacker. 298 Likewise, specifying that a well-known URI on a particular hostname 299 is to be used to bootstrap a protocol can cause a large number of 300 undesired requests. For example, if a well-known HTTPS URI is used 301 to find policy about a separate service such as e-mail, it can result 302 in a flood of requests to Web servers, even if they don't implement 303 the well-known URI. Such undesired requests can resemble a denial- 304 of-services attack. 306 4.3. Hidden Capabilities 308 Applications using well-known locations should consider that some 309 server administrators might be unaware of its existence (especially 310 on operating systems that hide directories whose names begin with 311 "."). This means that if an attacker has write access to the .well- 312 known directory, they would be able to control its contents, possibly 313 without the administrator realising it. 315 5. IANA Considerations 317 5.1. The Well-Known URI Registry 319 This specification updates the registration procedures for the "Well- 320 Known URI" registry, first defined in [RFC5785]; see Section 3.1. 322 Well-known URIs are registered on the advice of one or more experts 323 (appointed by the IESG or their delegate), with a Specification 324 Required (using terminology from [RFC8126]). 326 The Experts' primary considerations in evaluating registration 327 requests are: 329 o Conformance to the requirements in Section 3 331 o The availability and stability of the specifying document 332 o The considerations outlined in Section 4 334 IANA will direct any incoming requests regarding the registry to this 335 document and, if defined, the processes established by the expert(s); 336 typically, this will mean referring them to the registry Web page. 338 IANA should replace all references to RFC 5988 in that registry have 339 been replaced with references to this document. 341 6. References 343 6.1. Normative References 345 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 346 Requirement Levels", BCP 14, RFC 2119, 347 DOI 10.17487/RFC2119, March 1997, 348 . 350 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 351 Resource Identifier (URI): Generic Syntax", STD 66, 352 RFC 3986, DOI 10.17487/RFC3986, January 2005, 353 . 355 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 356 DOI 10.17487/RFC6454, December 2011, 357 . 359 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 360 Writing an IANA Considerations Section in RFCs", BCP 26, 361 RFC 8126, DOI 10.17487/RFC8126, June 2017, 362 . 364 6.2. Informative References 366 [CSP] West, M., "Content Security Policy Level 3", World Wide 367 Web Consortium WD WD-CSP3-20160913, September 2016, 368 . 370 [FETCH] WHATWG, "Fetch - Living Standard", n.d., 371 . 373 [HTML5] WHATWG, "HTML - Living Standard", n.d., 374 . 376 [P3P] Marchiori, M., "The Platform for Privacy Preferences 1.0 377 (P3P1.0) Specification", World Wide Web Consortium 378 Recommendation REC-P3P-20020416, April 2002, 379 . 381 [REFERRER-POLICY] 382 Eisinger, J. and E. Stark, "Referrer Policy", World Wide 383 Web Consortium CR CR-referrer-policy-20170126, January 384 2017, 385 . 387 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 388 Authoring and Versioning (WebDAV)", RFC 4918, 389 DOI 10.17487/RFC4918, June 2007, 390 . 392 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 393 Uniform Resource Identifiers (URIs)", RFC 5785, 394 DOI 10.17487/RFC5785, April 2010, 395 . 397 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 398 DOI 10.17487/RFC6265, April 2011, 399 . 401 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 402 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 403 DOI 10.17487/RFC7231, June 2014, 404 . 406 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 407 RFC 7320, DOI 10.17487/RFC7320, July 2014, 408 . 410 [WEBSTORAGE] 411 Hickson, I., "Web Storage (Second Edition)", World Wide 412 Web Consortium Recommendation REC-webstorage-20160419, 413 April 2016, 414 . 416 6.3. URIs 418 [1] https://github.com/mnot/I-D/labels/rfc5785bis 420 [2] https://mnot.github.io/I-D/rfc5785bis/ 422 [3] https://github.com/mnot/I-D/commits/gh-pages/rfc5785bis 424 [4] https://datatracker.ietf.org/doc/draft-nottingham-rfc5785bis/ 426 [5] http://www.robotstxt.org/ 428 Appendix A. Frequently Asked Questions 430 Aren't well-known locations bad for the Web? They are, but for 431 various reasons - both technical and social - they are sometimes 432 necessary. This memo defines a "sandbox" for them, to reduce the 433 risks of collision and to minimise the impact upon pre-existing 434 URIs on sites. 436 Why /.well-known? It's short, descriptive, and according to search 437 indices, not widely used. 439 What impact does this have on existing mechanisms, such as P3P and 440 robots.txt? 441 None, until they choose to use this mechanism. 443 Why aren't per-directory well-known locations defined? Allowing 444 every URI path segment to have a well-known location (e.g., 445 "/images/.well-known/") would increase the risks of colliding with 446 a pre-existing URI on a site, and generally these solutions are 447 found not to scale well, because they're too "chatty". 449 Appendix B. Changes from RFC5785 451 o Allow non-Web well-known locations 453 o Adjust IANA instructions 455 o Update references 457 o Various other clarifications 459 Author's Address 461 Mark Nottingham 463 Email: mnot@mnot.net 464 URI: https://www.mnot.net/