idnits 2.17.1 draft-nottingham-rfc7320bis-02.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 RFC7320, but the abstract doesn't seem to directly say this. It does mention RFC7320 though, so this could be OK. -- The draft header indicates that this document updates RFC3986, but the abstract doesn't seem to directly say this. It does mention RFC3986 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 RFC3986, updated by this document, for RFC5378 checks: 2002-11-01) -- 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 (October 7, 2019) is 1661 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (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 410 -- Looks like a reference, but probably isn't: '2' on line 412 -- Looks like a reference, but probably isn't: '3' on line 414 -- Looks like a reference, but probably isn't: '4' on line 416 -- Obsolete informational reference (is this intentional?): RFC 4395 (ref. 'BCP115') (Obsoleted by RFC 7595) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft October 7, 2019 4 Obsoletes: 7320 (if approved) 5 Updates: 3986 (if approved) 6 Intended status: Best Current Practice 7 Expires: April 9, 2020 9 URI Design and Ownership 10 draft-nottingham-rfc7320bis-02 12 Abstract 14 Section 1.1.1 of RFC 3986 defines URI syntax as "a federated and 15 extensible naming system wherein each scheme's specification may 16 further restrict the syntax and semantics of identifiers using that 17 scheme." In other words, the structure of a URI is defined by its 18 scheme. While it is common for schemes to further delegate their 19 substructure to the URI's owner, publishing independent standards 20 that mandate particular forms of substructure in URIs is often 21 problematic. 23 This document provides guidance on the specification of URI 24 substructure in standards. 26 Note to Readers 28 _RFC EDITOR: please remove this section before publication_ 30 This is a proposed revision of RFC7320, aka BCP190. The -00 draft is 31 a copy of the published RFC; subsequent revisions will update it. 33 The issues list for this draft can be found at 34 https://github.com/mnot/I-D/labels/rfc7320bis [1]. 36 The most recent (often, unpublished) draft is at 37 https://mnot.github.io/I-D/rfc7320bis/ [2]. 39 Recent changes are listed at https://github.com/mnot/I-D/commits/gh- 40 pages/rfc7320bis [3]. 42 See also the draft's current status in the IETF datatracker, at 43 https://datatracker.ietf.org/doc/draft-nottingham-rfc7320bis/ [4]. 45 Status of This Memo 47 This Internet-Draft is submitted in full conformance with the 48 provisions of BCP 78 and BCP 79. 50 Internet-Drafts are working documents of the Internet Engineering 51 Task Force (IETF). Note that other groups may also distribute 52 working documents as Internet-Drafts. The list of current Internet- 53 Drafts is at https://datatracker.ietf.org/drafts/current/. 55 Internet-Drafts are draft documents valid for a maximum of six months 56 and may be updated, replaced, or obsoleted by other documents at any 57 time. It is inappropriate to use Internet-Drafts as reference 58 material or to cite them other than as "work in progress." 60 This Internet-Draft will expire on April 9, 2020. 62 Copyright Notice 64 Copyright (c) 2019 IETF Trust and the persons identified as the 65 document authors. All rights reserved. 67 This document is subject to BCP 78 and the IETF Trust's Legal 68 Provisions Relating to IETF Documents 69 (https://trustee.ietf.org/license-info) in effect on the date of 70 publication of this document. Please review these documents 71 carefully, as they describe your rights and restrictions with respect 72 to this document. Code Components extracted from this document must 73 include Simplified BSD License text as described in Section 4.e of 74 the Trust Legal Provisions and are provided without warranty as 75 described in the Simplified BSD License. 77 Table of Contents 79 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 80 1.1. Intended Audience . . . . . . . . . . . . . . . . . . . . 4 81 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 5 82 2. Best Current Practices for Standardizing Structured URIs . . 5 83 2.1. URI Schemes . . . . . . . . . . . . . . . . . . . . . . . 5 84 2.2. URI Authorities . . . . . . . . . . . . . . . . . . . . . 5 85 2.3. URI Paths . . . . . . . . . . . . . . . . . . . . . . . . 6 86 2.4. URI Queries . . . . . . . . . . . . . . . . . . . . . . . 6 87 2.5. URI Fragment Identifiers . . . . . . . . . . . . . . . . 7 88 3. Alternatives to Specifying Structure in URIs . . . . . . . . 7 89 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 90 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 91 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 92 6.1. Normative References . . . . . . . . . . . . . . . . . . 8 93 6.2. Informative References . . . . . . . . . . . . . . . . . 8 94 6.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 95 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 9 96 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 98 1. Introduction 100 URIs [RFC3986] very often include structured application data. This 101 might include artifacts from filesystems (often occurring in the path 102 component) and user information (often in the query component). In 103 some cases, there can even be application-specific data in the 104 authority component (e.g., some applications are spread across 105 several hostnames to enable a form of partitioning or dispatch). 107 Implementations can impose further constraints upon the structure of 108 URIs; for example, many Web servers use the filename extension of the 109 last path segment to determine the media type of the response. 110 Likewise, prepackaged applications often have highly structured URIs 111 that can only be changed in limited ways (often, just the hostname 112 and port on which they are deployed). 114 Because the owner of the URI (as defined in [webarch] 115 Section 2.2.2.1) is choosing to use the server or the application, 116 this can be seen as reasonable delegation of authority. However, 117 when such conventions are mandated by a party other than the owner, 118 it can have several potentially detrimental effects: 120 o Collisions - As more ad hoc conventions for URI structure become 121 standardized, it becomes more likely that there will be collisions 122 between them (especially considering that servers, applications, 123 and individual deployments will have their own conventions). 125 o Dilution - When the information added to a URI is ephemeral, this 126 dilutes its utility by reducing its stability (see [webarch] 127 Section 3.5.1), and can cause several alternate forms of the URI 128 to exist (see [webarch] Section 2.3.1). 130 o Rigidity - Fixed URI syntax often interferes with desired 131 deployment patterns. For example, if an authority wishes to offer 132 several applications on a single hostname, it becomes difficult to 133 impossible to do if their URIs do not allow the required 134 flexibility. 136 o Operational Difficulty - Supporting some URI conventions can be 137 difficult in some implementations. For example, specifying that a 138 particular query parameter be used with "HTTP" URIs precludes the 139 use of Web servers that serve the response from a filesystem. 140 Likewise, an application that fixes a base path for its operation 141 (e.g., "/v1") makes it impossible to deploy other applications 142 with the same prefix on the same host. 144 o Client Assumptions - When conventions are standardized, some 145 clients will inevitably assume that the standards are in use when 146 those conventions are seen. This can lead to interoperability 147 problems; for example, if a specification documents that the "sig" 148 URI query parameter indicates that its payload is a cryptographic 149 signature for the URI, it can lead to undesirable behavior. 151 Publishing a standard that constrains an existing URI structure in 152 ways that aren't explicitly allowed by [RFC3986] (usually, by 153 updating the URI scheme definition) is therefore sometimes 154 problematic, both for these reasons, and because the structure of a 155 URI needs to be firmly under the control of its owner. 157 This document explains some best current practices for establishing 158 URI structures, conventions, and formats in standards. It also 159 offers strategies for specifications in Section 3. 161 1.1. Intended Audience 163 This document's guidelines and requirements target the authors of 164 specifications that constrain the syntax or structure of URIs or 165 parts of them. Two classes of such specifications are called out 166 specifically: 168 o Protocol Extensions ("Extensions") - specifications that offer new 169 capabilities that could apply to any identifier, or to a large 170 subset of possible identifiers; e.g., a new signature mechanism 171 for 'http' URIs, metadata for any URI, or a new format. 173 o Applications Using URIs ("Applications") - specifications that use 174 URIs to meet specific needs; e.g., an HTTP interface to particular 175 information on a host. 177 Requirements that target the generic class "Specifications" apply to 178 all specifications, including both those enumerated above and others. 180 Note that this specification ought not be interpreted as preventing 181 the allocation of control of URIs by parties that legitimately own 182 them, or have delegated that ownership; for example, a specification 183 might legitimately define the semantics of a URI on IANA's Web site 184 as part of the establishment of a registry. 186 There may be existing IETF specifications that already deviate from 187 the guidance in this document. In these cases, it is up to the 188 relevant communities (i.e., those of the URI scheme as well as that 189 which produced the specification in question) to determine an 190 appropriate outcome; e.g., updating the scheme definition, or 191 changing the specification. 193 1.2. Notational Conventions 195 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 196 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 197 "OPTIONAL" in this document are to be interpreted as described in BCP 198 14 [RFC2119] [RFC8174] when, and only when, they appear in all 199 capitals, as shown here. 201 2. Best Current Practices for Standardizing Structured URIs 203 This section updates [RFC3986] by advising Specifications how they 204 should define structure and semantics within URIs. Best practices 205 differ depending on the URI component, as described below. 207 2.1. URI Schemes 209 Applications and Extensions can require use of specific URI 210 scheme(s); for example, it is perfectly acceptable to require that an 211 Application support 'http' and 'https' URIs. However, Applications 212 ought not preclude the use of other URI schemes in the future, unless 213 they are clearly only usable with the nominated schemes. 215 A Specification that defines substructure for URI schemes overall 216 (e.g., a prefix or suffix for URI scheme names) MUST do so by 217 modifying [BCP115] (an exceptional circumstance). 219 2.2. URI Authorities 221 Scheme definitions define the presence, format and semantics of an 222 authority component in URIs; all other Specifications MUST NOT 223 constrain, or define the structure or the semantics for URI 224 authorities, unless they update the scheme registration itself, or 225 the structures it relies upon (e.g., DNS name syntax, defined in 226 Section 3.5 of [RFC1034]). 228 For example, an Extension or Application cannot say that the "foo" 229 prefix in "http://foo_app.example.com" is meaningful or triggers 230 special handling in URIs, unless they update either the HTTP URI 231 scheme, or the DNS hostname syntax. 233 Applications can nominate or constrain the port they use, when 234 applicable. For example, BarApp could run over port nnnn (provided 235 that it is properly registered). 237 2.3. URI Paths 239 Scheme definitions define the presence, format, and semantics of a 240 path component in URIs, although these are often delegated to the 241 application(s) in a given deployment. 243 To avoid collisions, rigidity, and erroneous client assumptions, 244 Specifications MUST NOT define a fixed prefix for their URI paths; 245 for example, "/myapp", unless allowed by the scheme definition. 247 One such exception to this requirement is registered "well-known" 248 URIs, as specified by [RFC8615]. See that document for a description 249 of the applicability of that mechanism. 251 Note that this does not apply to Applications defining a structure of 252 URIs paths "under" a resource under control of the server. Because 253 the prefix is under control of the party deploying the application, 254 collisions and rigidity are avoided, and the risk of erroneous client 255 assumptions is reduced. 257 For example, an Application might define "app_root" as a deployment- 258 controlled URI prefix. Application-defined resources might then be 259 assumed to be present at "{app_root}/foo" and "{app_root}/bar". 261 Extensions MUST NOT define a structure within individual URI 262 components (e.g., a prefix or suffix), again to avoid collisions and 263 erroneous client assumptions. 265 2.4. URI Queries 267 The presence, format and semantics of the query component of URIs is 268 dependent upon many factors, and can be constrained by a scheme 269 definition. Often, they are determined by the implementation of a 270 resource itself. 272 Applications can specify the syntax of queries for the resources 273 under their control. However, doing so can cause operational 274 difficulties for deployments that do not support a particular form of 275 a query. For example, a site may wish to support an Application 276 using "static" files that do not support query parameters. 278 Extensions MUST NOT constrain the format or semantics of queries, to 279 avoid collisions and erroneous client assumptions. For example, an 280 Extension that indicates that all query parameters with the name 281 "sig" indicate a cryptographic signature would collide with 282 potentially preexisting query parameters on sites and lead clients to 283 assume that any matching query parameter is a signature. 285 HTML [W3C.REC-html401-19991224] constrains the syntax of query 286 strings used in form submission. New form languages are encouraged 287 to allow creation of a broader variety of URIs (e.g., by allowing the 288 form to create new path components, and so forth). 290 2.5. URI Fragment Identifiers 292 Section 3.5 of [RFC3986] specifies fragment identiers' syntax and 293 semantics as being dependent upon the media type of a potentially 294 retrieved resource. As a result, other Specifications MUST NOT 295 define structure within the fragment identifier, unless they are 296 explicitly defining one for reuse by media types in their definitions 297 (for example, as JSON Pointer [RFC6901] does). 299 An Application that defines common fragment identifiers across media 300 types not controlled by it would engender interoperability problems 301 with handlers for those media types (because the new, non-standard 302 syntax is not expected). 304 3. Alternatives to Specifying Structure in URIs 306 Given the issues described in Section 1, the most successful strategy 307 for Applications and Extensions that wish to use URIs is to use them 308 in the fashion they were designed: as links that are exchanged as 309 part of the protocol, rather than statically specified syntax. 310 Several existing specifications can aid in this. 312 [RFC8288] specifies relation types for Web links. By providing a 313 framework for linking on the Web, where every link has a relation 314 type, context and target, it allows Applications to define a link's 315 semantics and connectivity. 317 [RFC6570] provides a standard syntax for URI Templates that can be 318 used to dynamically insert Application-specific variables into a URI 319 to enable such Applications while avoiding impinging upon URI owners' 320 control of them. 322 [RFC8615] allows specific paths to be 'reserved' for standard use on 323 URI schemes that opt into that mechanism ('http' and 'https' by 324 default). Note, however, that this is not a general "escape valve" 325 for applications that need structured URIs; see that specification 326 for more information. 328 Specifying more elaborate structures in an attempt to avoid 329 collisions is not an acceptable solution, and does not address the 330 issues in Section 1. For example, prefixing query parameters with 331 "myapp_" does not help, because the prefix itself is subject to the 332 risk of collision (since it is not "reserved"). 334 4. Security Considerations 336 This document does not introduce new protocol artifacts with security 337 considerations. It prohibits some practices that might lead to 338 vulnerabilities; for example, if a security-sensitive mechanism is 339 introduced by assuming that a URI path component or query string has 340 a particular meaning, false positives might be encountered (due to 341 sites that already use the chosen string). See also [RFC6943]. 343 5. IANA Considerations 345 There are no direct IANA actions specified in this document. 347 6. References 349 6.1. Normative References 351 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 352 Requirement Levels", BCP 14, RFC 2119, 353 DOI 10.17487/RFC2119, March 1997, 354 . 356 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 357 Resource Identifier (URI): Generic Syntax", STD 66, 358 RFC 3986, DOI 10.17487/RFC3986, January 2005, 359 . 361 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 362 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 363 May 2017, . 365 [webarch] Jacobs, I. and N. Walsh, "Architecture of the World Wide 366 Web, Volume One", December 2004, 367 . 369 6.2. Informative References 371 [BCP115] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and 372 Registration Procedures for New URI Schemes", BCP 115, 373 RFC 4395, February 2006, 374 . 376 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 377 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 378 . 380 [RFC6570] Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., 381 and D. Orchard, "URI Template", RFC 6570, 382 DOI 10.17487/RFC6570, March 2012, 383 . 385 [RFC6901] Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed., 386 "JavaScript Object Notation (JSON) Pointer", RFC 6901, 387 DOI 10.17487/RFC6901, April 2013, 388 . 390 [RFC6943] Thaler, D., Ed., "Issues in Identifier Comparison for 391 Security Purposes", RFC 6943, DOI 10.17487/RFC6943, May 392 2013, . 394 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 395 DOI 10.17487/RFC8288, October 2017, 396 . 398 [RFC8615] Nottingham, M., "Well-Known Uniform Resource Identifiers 399 (URIs)", RFC 8615, DOI 10.17487/RFC8615, May 2019, 400 . 402 [W3C.REC-html401-19991224] 403 Raggett, D., Hors, A., and I. Jacobs, "HTML 4.01 404 Specification", World Wide Web Consortium Recommendation 405 REC-html401-19991224, December 1999, 406 . 408 6.3. URIs 410 [1] https://github.com/mnot/I-D/labels/rfc7320bis 412 [2] https://mnot.github.io/I-D/rfc7320bis/ 414 [3] https://github.com/mnot/I-D/commits/gh-pages/rfc7320bis 416 [4] https://datatracker.ietf.org/doc/draft-nottingham-rfc7320bis/ 418 Appendix A. Acknowledgments 420 Thanks to David Booth, Dave Crocker, Tim Bray, Anne van Kesteren, 421 Martin Thomson, Erik Wilde, Dave Thaler and Barry Leiba for their 422 suggestions and feedback. 424 Author's Address 426 Mark Nottingham 428 Email: mnot@mnot.net 429 URI: https://www.mnot.net/