idnits 2.17.1 draft-nottingham-rfc5785bis-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 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 mention this, which it should. -- 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 (August 1, 2018) is 2093 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 423 -- Looks like a reference, but probably isn't: '2' on line 425 -- Looks like a reference, but probably isn't: '3' on line 427 -- Looks like a reference, but probably isn't: '4' on line 429 -- Looks like a reference, but probably isn't: '5' on line 431 -- 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 (==), 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 August 1, 2018 4 Obsoletes: 5785, 8307 (if approved) 5 Intended status: Standards Track 6 Expires: February 2, 2019 8 Well-Known Uniform Resource Identifiers (URIs) 9 draft-nottingham-rfc5785bis-07 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 February 2, 2019. 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 . . . . . . . . . . . . . . . . . . 7 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 "ws", "wss", or another scheme that has explicitly been specified to 133 use well-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 Typically, applications will use the default port for the given 158 scheme; if an alternative port is used, it MUST be explicitly 159 specified by the application in question. 161 It MAY also contain additional information, such as the syntax of 162 additional path components, query strings and/or fragment identifiers 163 to be appended to the well-known URI, or protocol-specific details 164 (e.g., HTTP [RFC7231] method handling). 166 Note that this specification defines neither how to determine the 167 hostname to use to find the well-known URI for a particular 168 application, nor the scope of the metadata discovered by 169 dereferencing the well-known URI; both should be defined by the 170 application itself. 172 Also, this specification does not define a format or media-type for 173 the resource located at "/.well-known/" and clients should not expect 174 a resource to exist at that location. 176 Well-known URIs are rooted in the top of the path's hierarchy; they 177 are not well-known by definition in other parts of the path. For 178 example, "/.well-known/example" is a well-known URI, whereas 179 "/foo/.well-known/example" is not. 181 See also Section 4 for Security Considerations regarding well-known 182 locations. 184 3.1. Registering Well-Known URIs 186 The "Well-Known URIs" registry is located at 187 "https://www.iana.org/assignments/well-known-uris/". Registration 188 requests can be made by following the instructions located there or 189 by sending an email to the "wellknown-uri-review@ietf.org" mailing 190 list. 192 Registration requests consist of at least the following information: 194 URI suffix: The name requested for the well-known URI, relative to 195 "/.well-known/"; e.g., "example". 197 Change controller: For Standards-Track RFCs, state "IETF". For 198 others, give the name of the responsible party. Other details 199 (e.g., postal address, e-mail address, home page URI) may also be 200 included. 202 Specification document(s): Reference to the document that specifies 203 the field, preferably including a URI that can be used to retrieve 204 a copy of the document. An indication of the relevant sections 205 may also be included, but is not required. 207 Related information: Optionally, citations to additional documents 208 containing further relevant information. 210 General requirements for registered relation types are described in 211 Section 3. 213 Note that well-known URIs can be registered by third parties 214 (including the expert(s)), if the expert(s) determines that an 215 unregistered well-known URI is widely deployed and not likely to be 216 registered in a timely manner otherwise. Such registrations still 217 are subject to the requirements defined, including the need to 218 reference a specification. 220 4. Security Considerations 222 Applications minting new well-known URIs, as well as administrators 223 deploying them, will need to consider several security-related 224 issues, including (but not limited to) exposure of sensitive data, 225 denial-of-service attacks (in addition to normal load issues), server 226 and client authentication, vulnerability to DNS rebinding attacks, 227 and attacks where limited access to a server grants the ability to 228 affect how well-known URIs are served. 230 4.1. Interaction with Web Browsing 232 Applications using well-known URIs for "http" or "https" URLs need to 233 be aware that well-known resources will be accessible to Web 234 browsers, and therefore are able to be manipulated by content 235 obtained from other parts of that origin. If an attacker is able to 236 inject content (e.g., through a Cross-Site Scripting vulnerability), 237 they will be able to make potentially arbitrary requests to the well- 238 known resource. 240 HTTP and HTTPS also use origins as a security boundary for many other 241 mechanisms, including (but not limited to) Cookies [RFC6265], Web 242 Storage [WEBSTORAGE] and many capabilities. 244 Applications defining well-known locations should not assume that 245 they have sole access to these mechanisms, or that they are the only 246 application using the origin. Depending on the nature of the 247 application, mitigations can include: 249 o Encrypting sensitive information 251 o Allowing flexibility in the use of identifiers (e.g., Cookie 252 names) to avoid collisions with other applications 254 o Using the 'HttpOnly' flag on Cookies to assure that cookies are 255 not exposed to browser scripting languages [RFC6265] 257 o Using the 'Path' parameter on Cookies to assure that they are not 258 available to other parts of the origin [RFC6265] 260 o Using X-Content-Type-Options: nosniff [FETCH] to assure that 261 content under attacker control can't be coaxed into a form that is 262 interpreted as active content by a Web browser 264 Other good practices include: 266 o Using an application-specific media type in the Content-Type 267 header, and requiring clients to fail if it is not used 269 o Using Content-Security-Policy [CSP] to constrain the capabilities 270 of active content (such as HTML [HTML5]), thereby mitigating 271 Cross-Site Scripting attacks 273 o Using Referrer-Policy [REFERRER-POLICY] to prevent sensitive data 274 in URLs from being leaked in the Referer request header 276 o Avoiding use of compression on any sensitive information (e.g., 277 authentication tokens, passwords), as the scripting environment 278 offered by Web browsers allows an attacker to repeatedly probe the 279 compression space; if the attacker has access to the path of the 280 communication, they can use this capability to recover that 281 information. 283 4.2. Scoping Applications 285 This memo does not specify the scope of applicability for the 286 information obtained from a well-known URI, and does not specify how 287 to discover a well-known URI for a particular application. 289 Individual applications using this mechanism must define both 290 aspects; if this is not specified, security issues can arise from 291 implementation deviations and confusion about boundaries between 292 applications. 294 Applying metadata discovered in a well-known URI to resources other 295 than those co-located on the same origin risks administrative as well 296 as security issues. For example, allowing 297 "https://example.com/.well-known/example" to apply policy to 298 "https://department.example.com", "https://www.example.com" or even 299 "https://www.example.com:8000" assumes a relationship between hosts 300 where there might be none, giving control to a potential attacker. 302 Likewise, specifying that a well-known URI on a particular hostname 303 is to be used to bootstrap a protocol can cause a large number of 304 undesired requests. For example, if a well-known HTTPS URI is used 305 to find policy about a separate service such as e-mail, it can result 306 in a flood of requests to Web servers, even if they don't implement 307 the well-known URI. Such undesired requests can resemble a denial- 308 of-services attack. 310 4.3. Hidden Capabilities 312 Applications using well-known locations should consider that some 313 server administrators might be unaware of its existence (especially 314 on operating systems that hide directories whose names begin with 315 "."). This means that if an attacker has write access to the .well- 316 known directory, they would be able to control its contents, possibly 317 without the administrator realising it. 319 5. IANA Considerations 321 5.1. The Well-Known URI Registry 323 This specification updates the registration procedures for the "Well- 324 Known URI" registry, first defined in [RFC5785]; see Section 3.1. 326 Well-known URIs are registered on the advice of one or more experts 327 (appointed by the IESG or their delegate), with a Specification 328 Required (using terminology from [RFC8126]). 330 The Experts' primary considerations in evaluating registration 331 requests are: 333 o Conformance to the requirements in Section 3 335 o The availability and stability of the specifying document 337 o The considerations outlined in Section 4 339 IANA will direct any incoming requests regarding the registry to this 340 document and, if defined, the processes established by the expert(s); 341 typically, this will mean referring them to the registry Web page. 343 IANA should replace all references to RFC 5988 in that registry have 344 been replaced with references to this document. 346 6. References 348 6.1. Normative References 350 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 351 Requirement Levels", BCP 14, RFC 2119, 352 DOI 10.17487/RFC2119, March 1997, 353 . 355 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 356 Resource Identifier (URI): Generic Syntax", STD 66, 357 RFC 3986, DOI 10.17487/RFC3986, January 2005, 358 . 360 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 361 DOI 10.17487/RFC6454, December 2011, 362 . 364 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 365 Writing an IANA Considerations Section in RFCs", BCP 26, 366 RFC 8126, DOI 10.17487/RFC8126, June 2017, 367 . 369 6.2. Informative References 371 [CSP] West, M., "Content Security Policy Level 3", World Wide 372 Web Consortium WD WD-CSP3-20160913, September 2016, 373 . 375 [FETCH] WHATWG, "Fetch - Living Standard", n.d., 376 . 378 [HTML5] WHATWG, "HTML - Living Standard", n.d., 379 . 381 [P3P] Marchiori, M., "The Platform for Privacy Preferences 1.0 382 (P3P1.0) Specification", World Wide Web Consortium 383 Recommendation REC-P3P-20020416, April 2002, 384 . 386 [REFERRER-POLICY] 387 Eisinger, J. and E. Stark, "Referrer Policy", World Wide 388 Web Consortium CR CR-referrer-policy-20170126, January 389 2017, 390 . 392 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 393 Authoring and Versioning (WebDAV)", RFC 4918, 394 DOI 10.17487/RFC4918, June 2007, 395 . 397 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 398 Uniform Resource Identifiers (URIs)", RFC 5785, 399 DOI 10.17487/RFC5785, April 2010, 400 . 402 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 403 DOI 10.17487/RFC6265, April 2011, 404 . 406 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 407 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 408 DOI 10.17487/RFC7231, June 2014, 409 . 411 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 412 RFC 7320, DOI 10.17487/RFC7320, July 2014, 413 . 415 [WEBSTORAGE] 416 Hickson, I., "Web Storage (Second Edition)", World Wide 417 Web Consortium Recommendation REC-webstorage-20160419, 418 April 2016, 419 . 421 6.3. URIs 423 [1] https://github.com/mnot/I-D/labels/rfc5785bis 425 [2] https://mnot.github.io/I-D/rfc5785bis/ 427 [3] https://github.com/mnot/I-D/commits/gh-pages/rfc5785bis 429 [4] https://datatracker.ietf.org/doc/draft-nottingham-rfc5785bis/ 431 [5] http://www.robotstxt.org/ 433 Appendix A. Frequently Asked Questions 435 Aren't well-known locations bad for the Web? They are, but for 436 various reasons - both technical and social - they are sometimes 437 necessary. This memo defines a "sandbox" for them, to reduce the 438 risks of collision and to minimise the impact upon pre-existing 439 URIs on sites. 441 Why /.well-known? It's short, descriptive, and according to search 442 indices, not widely used. 444 What impact does this have on existing mechanisms, such as P3P and 445 robots.txt? 446 None, until they choose to use this mechanism. 448 Why aren't per-directory well-known locations defined? Allowing 449 every URI path segment to have a well-known location (e.g., 450 "/images/.well-known/") would increase the risks of colliding with 451 a pre-existing URI on a site, and generally these solutions are 452 found not to scale well, because they're too "chatty". 454 Appendix B. Changes from RFC5785 456 o Allow non-Web well-known locations 458 o Adjust IANA instructions 460 o Update references 462 o Various other clarifications 464 o Add "ws" and "wss" schemes 466 Author's Address 468 Mark Nottingham 470 Email: mnot@mnot.net 471 URI: https://www.mnot.net/