idnits 2.17.1 draft-nottingham-how-did-that-get-into-the-repo-01.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. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 7, 2018) is 1968 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '1' on line 204 -- Looks like a reference, but probably isn't: '2' on line 206 -- Looks like a reference, but probably isn't: '3' on line 208 -- Looks like a reference, but probably isn't: '4' on line 211 Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft November 7, 2018 4 Intended status: Informational 5 Expires: May 11, 2019 7 The secret-token URI Scheme 8 draft-nottingham-how-did-that-get-into-the-repo-01 10 Abstract 12 This document registers the "secret-token" URI scheme, to aid in the 13 identification of authentication tokens. 15 Note to Readers 17 _RFC EDITOR: please remove this section before publication_ 19 The issues list for this draft can be found at 20 https://github.com/mnot/I-D/labels/how-did-that-get-into-the-repo 21 [1]. 23 The most recent (often, unpublished) draft is at 24 https://mnot.github.io/I-D/how-did-that-get-into-the-repo/ [2]. 26 Recent changes are listed at https://github.com/mnot/I-D/commits/gh- 27 pages/how-did-that-get-into-the-repo [3]. 29 See also the draft's current status in the IETF datatracker, at 30 https://datatracker.ietf.org/doc/draft-nottingham-how-did-that-get- 31 into-the-repo/ [4]. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on May 11, 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 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 69 2. The secret-token URI scheme . . . . . . . . . . . . . . . . . 3 70 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 71 4. Security Considerations . . . . . . . . . . . . . . . . . . . 4 72 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 73 5.1. Normative References . . . . . . . . . . . . . . . . . . 4 74 5.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 5 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 77 1. Introduction 79 It has become increasingly common to use bearer tokens as an 80 authentication mechanism. 82 Unfortunately, the number of security incidents involving accidental 83 disclosure of these tokens has also increased. For example, we now 84 regularly hear about a developer committing an access token to a 85 public source code repository, either because they didn't realise it 86 was included in the committed code, or because they didn't realise 87 the implications of its disclosure. 89 This specification registers the "secret-token" URI scheme to aid 90 prevention of such accidental disclosures. When tokens are easier to 91 unambiguously identify, they can trigger warnings in Continuous 92 Integration systems, or be used in source code repositories 93 themselves. They can also be scanned for separately. 95 For example, if cloud.example.net issues access tokens to its clients 96 for later use, and it does so by formatting them as secret-token 97 URIs, tokens that "leak" into places that they don't belong are 98 easier to identify. This could be through a variety of mechanisms; 99 for example, if repo.example.com can be configured to refuse commits 100 containing secret-token URIs, it helps its customers avoid accidental 101 disclosures. 103 secret-token URIs are intended to aid in identification of generated 104 secrets like API keys and similar tokens. They are not intended for 105 use in controlled situations where ephemeral tokens are used, such as 106 things ike CSRF tokens. 108 1.1. Notational Conventions 110 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 112 "OPTIONAL" in this document are to be interpreted as described in BCP 113 14 [RFC2119] [RFC8174] when, and only when, they appear in all 114 capitals, as shown here. 116 This document uses ABNF [RFC5234], including by reference the 117 following rules: ALPHA, DIGIT. It also uses the pchar rule from 118 [RFC3986]. 120 2. The secret-token URI scheme 122 The secret-token URI scheme identifies a token that is intended to be 123 a secret. 125 secret-token-URI = secret-token-scheme ":" token 126 secret-token-scheme = "secret-token" 127 token = 1*pchar 129 See [RFC3986], Section 3.3 for a definition of pchar. Disallowed 130 characters - including non-ASCII characters - MUST be encoded into 131 UTF-8 [RFC3629] and then percent-encoded ([RFC3986], Section 2.1). 133 When a token is both generated and presented for authentication, the 134 entire URI MUST be used, without changes. 136 For example, given the URI: 138 secret-token:E92FB7EB-D882-47A4-A265-A0B6135DC842%20foo 140 This string (character-for-character, case-sensitive) will both be 141 issued by the token authority, and required for later access. 143 3. IANA Considerations 145 This document registers the following value in the URI Scheme 146 registry: 148 o Scheme name: secret-token 150 o Status: provisional 152 o Applications / protocols that use this scheme: none yet 154 o Contact: iesg@iesg.org 156 o Change Controller: IESG 158 o References: [this document] 160 4. Security Considerations 162 The token ABNF rule allows tokens as small as one character. This is 163 not recommended practice; applications should evaluate their 164 requirements for entropy and issue tokens correspondingly. 166 This URI scheme is intended to prevent accidental disclosure; it 167 cannot prevent intentional disclosure. 169 If it is difficult to correctly handle secret material, or unclear as 170 to what the appropriate handling is, users might choose to obfuscate 171 their secret tokens in order to evade detection (for example, 172 removing the URI scheme for storage). Clear guidelines and helpful 173 tools are good mitigations here. 175 5. References 177 5.1. Normative References 179 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 180 Requirement Levels", BCP 14, RFC 2119, 181 DOI 10.17487/RFC2119, March 1997, 182 . 184 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 185 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 186 2003, . 188 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 189 Resource Identifier (URI): Generic Syntax", STD 66, 190 RFC 3986, DOI 10.17487/RFC3986, January 2005, 191 . 193 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 194 Specifications: ABNF", STD 68, RFC 5234, 195 DOI 10.17487/RFC5234, January 2008, 196 . 198 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 199 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 200 May 2017, . 202 5.2. URIs 204 [1] https://github.com/mnot/I-D/labels/how-did-that-get-into-the-repo 206 [2] https://mnot.github.io/I-D/how-did-that-get-into-the-repo/ 208 [3] https://github.com/mnot/I-D/commits/gh-pages/how-did-that-get- 209 into-the-repo 211 [4] https://datatracker.ietf.org/doc/draft-nottingham-how-did-that- 212 get-into-the-repo/ 214 Author's Address 216 Mark Nottingham 218 Email: mnot@mnot.net 219 URI: https://www.mnot.net/