idnits 2.17.1 draft-nottingham-how-did-that-get-into-the-repo-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 : ---------------------------------------------------------------------------- ** There is 1 instance of too long lines in the document, the longest one being 5 characters 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 date (19 October 2020) is 1278 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft 19 October 2020 4 Intended status: Informational 5 Expires: 22 April 2021 7 The secret-token URI Scheme 8 draft-nottingham-how-did-that-get-into-the-repo-02 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 (https://github.com/mnot/I-D/labels/how-did-that-get-into-the-repo). 23 The most recent (often, unpublished) draft is at 24 https://mnot.github.io/I-D/how-did-that-get-into-the-repo/ 25 (https://mnot.github.io/I-D/how-did-that-get-into-the-repo/). 27 Recent changes are listed at https://github.com/mnot/I-D/commits/gh- 28 pages/how-did-that-get-into-the-repo (https://github.com/mnot/I- 29 D/commits/gh-pages/how-did-that-get-into-the-repo). 31 See also the draft's current status in the IETF datatracker, at 32 https://datatracker.ietf.org/doc/draft-nottingham-how-did-that-get- 33 into-the-repo/ (https://datatracker.ietf.org/doc/draft-nottingham- 34 how-did-that-get-into-the-repo/). 36 Status of This Memo 38 This Internet-Draft is submitted in full conformance with the 39 provisions of BCP 78 and BCP 79. 41 Internet-Drafts are working documents of the Internet Engineering 42 Task Force (IETF). Note that other groups may also distribute 43 working documents as Internet-Drafts. The list of current Internet- 44 Drafts is at https://datatracker.ietf.org/drafts/current/. 46 Internet-Drafts are draft documents valid for a maximum of six months 47 and may be updated, replaced, or obsoleted by other documents at any 48 time. It is inappropriate to use Internet-Drafts as reference 49 material or to cite them other than as "work in progress." 51 This Internet-Draft will expire on 22 April 2021. 53 Copyright Notice 55 Copyright (c) 2020 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 60 license-info) in effect on the date of publication of this document. 61 Please review these documents carefully, as they describe your rights 62 and restrictions with respect to this document. Code Components 63 extracted from this document must include Simplified BSD License text 64 as described in Section 4.e of the Trust Legal Provisions and are 65 provided without warranty as described in the Simplified BSD License. 67 Table of Contents 69 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 70 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 71 2. The secret-token URI scheme . . . . . . . . . . . . . . . . . 3 72 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 4 74 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 75 5.1. Normative References . . . . . . . . . . . . . . . . . . 5 76 5.2. Informative References . . . . . . . . . . . . . . . . . 5 77 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 6 78 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 80 1. Introduction 82 It has become increasingly common to use bearer tokens as an 83 authentication mechanism in various protocols. 85 A bearer token is a security token with the property that any party 86 in possession of the token (a "bearer") can use the token in any way 87 that any other party in possession of it can. Using a bearer token 88 does not require a bearer to prove possession of cryptographic key 89 material (proof-of-possession). 91 Unfortunately, the number of security incidents involving accidental 92 disclosure of these tokens has also increased. For example, we now 93 regularly hear about a developer committing an access token to a 94 public source code repository, either because they didn't realise it 95 was included in the committed code, or because they didn't realise 96 the implications of its disclosure. 98 This specification registers the "secret-token" URI scheme to aid 99 prevention of such accidental disclosures. When tokens are easier to 100 unambiguously identify, they can trigger warnings in Continuous 101 Integration systems, or be used in source code repositories 102 themselves. They can also be scanned for separately. 104 For example, if cloud.example.net issues access tokens to its clients 105 for later use, and it does so by formatting them as secret-token 106 URIs, tokens that "leak" into places that they don't belong are 107 easier to identify. This could be through a variety of mechanisms; 108 for example, if repo.example.com can be configured to refuse commits 109 containing secret-token URIs, it helps its customers avoid accidental 110 disclosures. 112 secret-token URIs are intended to aid in identification of generated 113 secrets like API keys and similar tokens. They are not intended for 114 use in controlled situations where ephemeral tokens are used, such as 115 things like Cross-Site Request Forgery (CSRF) tokens. 117 1.1. Notational Conventions 119 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 120 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 121 "OPTIONAL" in this document are to be interpreted as described in BCP 122 14 [RFC2119] [RFC8174] when, and only when, they appear in all 123 capitals, as shown here. 125 This document uses ABNF [RFC5234]. It also uses the pchar rule from 126 [RFC3986]. 128 2. The secret-token URI scheme 130 The secret-token URI scheme identifies a token that is intended to be 131 a secret. 133 secret-token-URI = secret-token-scheme ":" token 134 secret-token-scheme = "secret-token" 135 token = 1*pchar 137 See [RFC3986], Section 3.3 for a definition of pchar. Disallowed 138 characters - including non-ASCII characters - MUST be encoded into 139 UTF-8 [RFC3629] and then percent-encoded ([RFC3986], Section 2.1). 141 When a token is both generated and presented for authentication, the 142 entire URI MUST be used, without changes. 144 For example, given the URI: 146 secret-token:E92FB7EB-D882-47A4-A265-A0B6135DC842%20foo 148 This string (character-for-character, case-sensitive) will both be 149 issued by the token authority, and required for later access. 150 Therefore, if the example above were used as a bearer token in 151 [RFC6750], a client might send: 153 GET /authenticated/stuff HTTP/1.1 154 Host: www.example.com 155 Authorization: Bearer secret-token:E92FB7EB-D882-47A4-A265-A0B6135DC842%20foo 157 3. IANA Considerations 159 This document registers the following value in the URI Scheme 160 registry: 162 * Scheme name: secret-token 164 * Status: provisional 166 * Applications / protocols that use this scheme: none yet 168 * Contact: iesg@iesg.org 170 * Change Controller: IESG 172 * References: (this document) 174 4. Security Considerations 176 The token ABNF rule allows tokens as small as one character. This is 177 not recommended practice; applications should evaluate their 178 requirements for entropy and issue tokens correspondingly. See 179 [RFC4086] for more information. 181 This URI scheme is intended to reduce the incidence of accidental 182 disclosure; it cannot prevent intentional disclosure. 184 If it is difficult to correctly handle secret material, or unclear as 185 to what the appropriate handling is, users might choose to obfuscate 186 their secret tokens in order to evade detection (for example, 187 removing the URI scheme for storage). Mitigating this risk is often 188 beyond the reach of the system using the secret-token URI, but they 189 can caution users against such practices, and provide tools to help. 191 5. References 193 5.1. Normative References 195 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 196 Requirement Levels", BCP 14, RFC 2119, 197 DOI 10.17487/RFC2119, March 1997, 198 . 200 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 201 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 202 2003, . 204 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 205 Resource Identifier (URI): Generic Syntax", STD 66, 206 RFC 3986, DOI 10.17487/RFC3986, January 2005, 207 . 209 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 210 Specifications: ABNF", STD 68, RFC 5234, 211 DOI 10.17487/RFC5234, January 2008, 212 . 214 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 215 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 216 May 2017, . 218 5.2. Informative References 220 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 221 "Randomness Requirements for Security", BCP 106, RFC 4086, 222 DOI 10.17487/RFC4086, June 2005, 223 . 225 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 226 Framework: Bearer Token Usage", RFC 6750, 227 DOI 10.17487/RFC6750, October 2012, 228 . 230 Appendix A. Acknowledgements 232 The definition of bearer tokens is from [RFC6750]. 234 Author's Address 236 Mark Nottingham 237 Prahran VIC 238 Australia 240 Email: mnot@mnot.net 241 URI: https://www.mnot.net/