idnits 2.17.1 draft-bedford-app-importmap-media-reg-00.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 : ---------------------------------------------------------------------------- ** There is 1 instance of too long lines in the document, the longest one being 1 character in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (November 17, 2019) is 1623 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'RFCXXXX' is mentioned on line 156, but not defined == Unused Reference: 'RFC8259' is defined on line 178, but no explicit reference was found in the text == Unused Reference: 'WHATWG-fetch' is defined on line 188, but no explicit reference was found in the text Summary: 1 error (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group G. Bedford, Ed. 3 Internet-Draft Verve Interactive Pty Ltd 4 Intended status: Informational November 17, 2019 5 Expires: May 20, 2020 7 application/importmap+json MIME Type Registration 8 draft-bedford-app-importmap-media-reg-00 10 Abstract 12 Media type registration for JSON import map definitions that control 13 the behavior of JavaScript imports. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on May 20, 2020. 32 Copyright Notice 34 Copyright (c) 2019 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 52 3. Security Considerations . . . . . . . . . . . . . . . . . . . 3 53 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 54 4.1. The application/importmap+json Media Type . . . . . . . . 3 55 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 56 6. Normative References . . . . . . . . . . . . . . . . . . . . 5 57 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 59 1. Introduction 61 This memo defines a media type Section 4.1 for application/ 62 importmap+json. 64 1.1. Terminology 66 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 67 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 68 "OPTIONAL" in this document are to be interpreted as described in BCP 69 14 [RFC2119] [RFC8174] when, and only when, they appear in all 70 capitals, as shown here. 72 2. Example 74 An example application.importmap, following the import maps 75 specification (https://wicg.github.io/import-maps/) can be written: 77 { 78 "imports": { 79 "pkg": "/lib/pkg/main.js" 80 } 81 } 83 This would support the following workflow in browsers: 85 86 91 3. Security Considerations 93 The following security considerations apply when using application/ 94 importmap+json: Control of the import map should be considered to be 95 a form of execution-level application control. This is because 96 import maps have the ability to direct which module resolutions are 97 to be provided for all module import specifiers in a given JavaScript 98 environment, including for example the ability to map arbitrary 99 import specifiers into data: URLs. Integration with existing policy 100 systems, such as CORS and CSP, can be used to mitigate and restrict 101 unwanted target URLs from being executed. The import maps 102 specification states that only those import maps served to browsers 103 with the `application/importmap+json` MIME type will be executed 104 allowing for server-level control of import map deployment to 105 mitigate unintended usage in browsers. 107 4. IANA Considerations 109 This document defines a single action for IANA: 111 4.1. The application/importmap+json Media Type 113 The application/importmap+json Media Type is defined as follows: 115 Type name: application 117 Subtype name: importmap+json 119 Required parameters: none 121 Optional parameters: none 123 Encoding considerations: 8bit (always UTF-8) 125 Security considerations: discussed in Section 3 of [RFCXXXX]. 127 Interoperability considerations: none 129 Published specification: https://wicg.github.io/import-maps/ 130 Applications that use this media type: This is primarily a browser- 131 specific media type but may also be adopted in 132 other JavaScript environments. 134 Fragment identifier considerations: N/A 136 Additional information: 138 Deprecated alias names for this type: N/A 140 Magic number(s): none 142 File extension(s): .importmap 144 Macintosh file type code(s): Same as for 145 application/json 147 Person & email address to contact for further information: WICG 148 Mailing List or at import 149 maps GitHub repository https://github.com/WICG/ 150 import-maps 152 Intended usage: COMMON 154 Restrictions on usage: No restrictions apply. 156 Author: See the Authors' Addresses section of [RFCXXXX] 158 Change controller: WHATWG 160 Provisional registration? yes 162 5. Acknowledgements 164 Thanks to Domenic Denicola for their work in specifying import maps 165 and the browser integration of JavaScript modules. 167 6. Normative References 169 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 170 Requirement Levels", BCP 14, RFC 2119, 171 DOI 10.17487/RFC2119, March 1997, 172 . 174 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 175 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 176 May 2017, . 178 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 179 Interchange Format", STD 90, RFC 8259, 180 DOI 10.17487/RFC8259, December 2017, 181 . 183 [W3C.WD-CSP3] 184 Kesteren, A., "Content Security Policy Level 3", World 185 Wide Web Consortium CR WD-CSP3, February 2019, 186 . 188 [WHATWG-fetch] 189 Kesteren, A., "Fetch Standard - CORS Protocol", WHATWG 190 Living Standard WHATWG-fetch, October 2019, 191 . 193 Author's Address 195 Guy Bedford (editor) 196 Verve Interactive Pty Ltd 197 19 Garfield Road 198 Cape Town, Western Cape 7708 199 South Africa 201 Email: guybedford@gmail.com