idnits 2.17.00 (12 Aug 2021) /tmp/idnits10464/draft-ietf-httpbis-http2-encryption-11.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 17, 2017) is 1884 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'RFC7469' is defined on line 384, but no explicit reference was found in the text ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 5785 (Obsoleted by RFC 8615) ** Obsolete normative reference: RFC 7159 (Obsoleted by RFC 8259) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP Working Group M. Nottingham 3 Internet-Draft 4 Intended status: Experimental M. Thomson 5 Expires: September 18, 2017 Mozilla 6 March 17, 2017 8 Opportunistic Security for HTTP/2 9 draft-ietf-httpbis-http2-encryption-11 11 Abstract 13 This document describes how "http" URIs can be accessed using 14 Transport Layer Security (TLS) and HTTP/2 to mitigate pervasive 15 monitoring attacks. This mechanism not a replacement for "https" 16 URIs; it is vulnerable to active attacks. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on September 18, 2017. 35 Copyright Notice 37 Copyright (c) 2017 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Goals and Non-Goals . . . . . . . . . . . . . . . . . . . 2 54 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 3 55 2. Using HTTP URIs over TLS . . . . . . . . . . . . . . . . . . 3 56 2.1. Alternative Server Opt-In . . . . . . . . . . . . . . . . 4 57 2.2. Interaction with "https" URIs . . . . . . . . . . . . . . 5 58 2.3. The "http-opportunistic" well-known URI . . . . . . . . . 5 59 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 60 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 61 4.1. Security Indicators . . . . . . . . . . . . . . . . . . . 6 62 4.2. Downgrade Attacks . . . . . . . . . . . . . . . . . . . . 6 63 4.3. Privacy Considerations . . . . . . . . . . . . . . . . . 6 64 4.4. Confusion Regarding Request Scheme . . . . . . . . . . . 7 65 4.5. Server Controls . . . . . . . . . . . . . . . . . . . . . 7 66 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 5.1. Normative References . . . . . . . . . . . . . . . . . . 7 68 5.2. Informative References . . . . . . . . . . . . . . . . . 8 69 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 70 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 72 1. Introduction 74 This document describes a use of HTTP Alternative Services [RFC7838] 75 to decouple the URI scheme from the use and configuration of 76 underlying encryption. It allows an "http" URI to be accessed using 77 HTTP/2 [RFC7230] and Transport Layer Security (TLS) [RFC5246] with 78 Opportunistic Security [RFC7435]. 80 This document describes a usage model whereby sites can serve "http" 81 URIs over TLS, thereby avoiding the problem of serving Mixed Content 82 (described in [W3C.CR-mixed-content-20160802]) while still providing 83 protection against passive attacks. 85 Opportunistic Security does not provide the same guarantees as using 86 TLS with "https" URIs, because it is vulnerable to active attacks, 87 and does not change the security context of the connection. 88 Normally, users will not be able to tell that it is in use (i.e., 89 there will be no "lock icon"). 91 1.1. Goals and Non-Goals 93 The immediate goal is to make the use of HTTP more robust in the face 94 of pervasive passive monitoring [RFC7258]. 96 A secondary (but significant) goal is to provide for ease of 97 implementation, deployment and operation. This mechanism is expected 98 to have a minimal impact upon performance, and require a trivial 99 administrative effort to configure. 101 Preventing active attacks (such as a Man-in-the-Middle) is a non-goal 102 for this specification. Furthermore, this specification is not 103 intended to replace or offer an alternative to "https", since "https" 104 both prevents active attacks and invokes a more stringent security 105 model in most clients. 107 1.2. Notational Conventions 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 111 document are to be interpreted as described in [RFC2119]. 113 2. Using HTTP URIs over TLS 115 An origin server that supports the resolution of "http" URIs can 116 indicate support for this specification by providing an alternative 117 service advertisement [RFC7838] for a protocol identifier that uses 118 TLS, such as "h2" [RFC7540]. Such a protocol MUST include an 119 explicit indication of the scheme of the resource. This excludes 120 HTTP/1.1; HTTP/1.1 clients are forbidden from including the absolute 121 form of a URI in requests to origin servers (see Section 5.3.1 of 122 [RFC7230]). 124 A client that receives such an advertisement MAY make future requests 125 intended for the associated origin [RFC6454] to the identified 126 service (as specified by [RFC7838]), provided that the alternative 127 service opts in as described in Section 2.1. 129 A client that places the importance of protection against passive 130 attacks over performance might choose to withhold requests until an 131 encrypted connection is available. However, if such a connection 132 cannot be successfully established, the client can resume its use of 133 the cleartext connection. 135 A client can also explicitly probe for an alternative service 136 advertisement by sending a request that bears little or no sensitive 137 information, such as one with the OPTIONS method. Likewise, clients 138 with existing alternative services information could make such a 139 request before they expire, in order minimize the delays that might 140 be incurred. 142 Client certificates are not meaningful for URLs with the "http" 143 scheme, and therefore clients creating new TLS connections to 144 alternative services for the purposes of this specification MUST NOT 145 present them. A server that also provides "https" resources on the 146 same port can request a certificate during the TLS handshake, but it 147 MUST NOT abort the handshake if the client does not provide one. 149 2.1. Alternative Server Opt-In 151 It is possible that the server might become confused about whether 152 requests' URLs have a "http" or "https" scheme, for various reasons; 153 see Section 4.4. To ensure that the alternative service has opted 154 into serving "http" URLs over TLS, clients are required to perform 155 additional checks before directing "http" requests to it. 157 Clients MUST NOT send "http" requests over a secured connection, 158 unless the chosen alternative service presents a certificate that is 159 valid for the origin as defined in [RFC2818]. Using an authenticated 160 alternative service establishes "reasonable assurances" for the 161 purposes of [RFC7838]. In addition to authenticating the server, the 162 client MUST have obtained a valid http-opportunistic response for an 163 origin (as per Section 2.3) using the authenticated connection. An 164 exception to the latter restriction is made for requests for the 165 "http-opportunistic" well-known URI. 167 For example, assuming the following request is made over a TLS 168 connection that is successfully authenticated for those origins, the 169 following request/response pair would allow requests for the origins 170 "http://www.example.com" or "http://example.com" to be sent using a 171 secured connection: 173 HEADERS 174 + END_STREAM 175 + END_HEADERS 176 :method = GET 177 :scheme = http 178 :authority = example.com 179 :path = /.well-known/http-opportunistic 181 HEADERS 182 :status = 200 183 content-type = application/json 184 DATA 185 + END_STREAM 186 [ "http://www.example.com", "http://example.com" ] 188 Though this document describes multiple origins, this is only for 189 operational convenience. Only a request made to an origin (over an 190 authenticated connection) can be used to acquire this resource for 191 that origin. Thus in the example, the request to 192 "http://example.com" cannot be assumed to also provide an http- 193 opportunistic response for "http://www.example.com". 195 2.2. Interaction with "https" URIs 197 Clients MUST NOT send "http" requests and "https" requests on the 198 same connection. Similarly, clients MUST NOT send "http" requests 199 for multiple origins on the same connection. 201 2.3. The "http-opportunistic" well-known URI 203 This specification defines the "http-opportunistic" well-known URI 204 [RFC5785]. A client is said to have a valid http-opportunistic 205 response for a given origin when: 207 o The client has requested the well-known URI from the origin over 208 an authenticated connection and a 200 (OK) response was provided, 209 and 211 o That response is fresh [RFC7234] (potentially through revalidation 212 [RFC7232]), and 214 o That response has the media type "application/json", and 216 o That response's payload, when parsed as JSON [RFC7159], contains 217 an array as the root, and 219 o The array contains a string that is a case-insensitive character- 220 for-character match for the origin in question, serialised into 221 Unicode as per Section 6.1 of [RFC6454]. 223 A client MAY treat an "http-opportunistic" resource as invalid if 224 values it contains are not strings. 226 This document does not define semantics for "http-opportunistic" 227 resources on an "https" origin, nor does it define semantics if the 228 resource includes "https" origins. 230 Allowing clients to cache the http-opportunistic resource means that 231 all alternative services need to be able to respond to requests for 232 "http" resources. A client is permitted to use an alternative 233 service without acquiring the http-opportunistic resource from that 234 service. 236 A client MUST NOT use any cached copies of an http-opportunistic 237 resource that was acquired (or revalidated) over an unauthenticated 238 connection. To avoid potential errors, a client can request or 239 revalidate the http-opportunistic resource before using any 240 connection to an alternative service. 242 Clients that use cached http-opportunistic responses MUST ensure that 243 their cache is cleared of any responses that were acquired over an 244 unauthenticated connection. Revalidating an unauthenticated response 245 using an authenticated connection does not ensure the integrity of 246 the response. 248 3. IANA Considerations 250 This specification registers a Well-Known URI [RFC5785]: 252 o URI Suffix: http-opportunistic 254 o Change Controller: IETF 256 o Specification Document(s): Section 2.3 of [this specification] 258 o Related Information: 260 4. Security Considerations 262 4.1. Security Indicators 264 User Agents MUST NOT provide any special security indicators when an 265 "http" resource is acquired using TLS. In particular, indicators 266 that might suggest the same level of security as "https" MUST NOT be 267 used (e.g., a "lock device"). 269 4.2. Downgrade Attacks 271 A downgrade attack against the negotiation for TLS is possible. 273 For example, because the "Alt-Svc" header field [RFC7838] likely 274 appears in an unauthenticated and unencrypted channel, it is subject 275 to downgrade by network attackers. In its simplest form, an attacker 276 that wants the connection to remain in the clear need only strip the 277 "Alt-Svc" header field from responses. 279 4.3. Privacy Considerations 281 Cached alternative services can be used to track clients over time; 282 e.g., using a user-specific hostname. Clearing the cache reduces the 283 ability of servers to track clients; therefore clients MUST clear 284 cached alternative service information when clearing other origin- 285 based state (i.e., cookies). 287 4.4. Confusion Regarding Request Scheme 289 HTTP implementations and applications sometimes use ambient signals 290 to determine if a request is for an "https" resource; for example, 291 they might look for TLS on the stack, or a server port number of 443. 293 This might be due to expected limitations in the protocol (the most 294 common HTTP/1.1 request form does not carry an explicit indication of 295 the URI scheme and the resource might have been developed assuming 296 HTTP/1.1), or it may be because how the server and application are 297 implemented (often, they are two separate entities, with a variety of 298 possible interfaces between them). 300 Any security decisions based upon this information could be misled by 301 the deployment of this specification, because it violates the 302 assumption that the use of TLS (or port 443) means that the client is 303 accessing a HTTPS URI, and operating in the security context implied 304 by HTTPS. 306 Therefore, server implementers and administrators need to carefully 307 examine the use of such signals before deploying this specification. 309 4.5. Server Controls 311 This specification requires that a server send both an Alternative 312 Service advertisement and host content in a well-known location to 313 send HTTP requests over TLS. Servers SHOULD take suitable measures 314 to ensure that the content of the well-known resource remains under 315 their control. Likewise, because the Alt-Svc header field is used to 316 describe policies across an entire origin, servers SHOULD NOT permit 317 user content to set or modify the value of this header. 319 5. References 321 5.1. Normative References 323 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 324 Requirement Levels", BCP 14, RFC 2119, 325 DOI 10.17487/RFC2119, March 1997, 326 . 328 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 329 DOI 10.17487/RFC2818, May 2000, 330 . 332 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 333 (TLS) Protocol Version 1.2", RFC 5246, 334 DOI 10.17487/RFC5246, August 2008, 335 . 337 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 338 Uniform Resource Identifiers (URIs)", RFC 5785, 339 DOI 10.17487/RFC5785, April 2010, 340 . 342 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 343 DOI 10.17487/RFC6454, December 2011, 344 . 346 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 347 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 348 2014, . 350 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 351 Protocol (HTTP/1.1): Message Syntax and Routing", 352 RFC 7230, DOI 10.17487/RFC7230, June 2014, 353 . 355 [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 356 Protocol (HTTP/1.1): Conditional Requests", RFC 7232, 357 DOI 10.17487/RFC7232, June 2014, 358 . 360 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 361 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 362 RFC 7234, DOI 10.17487/RFC7234, June 2014, 363 . 365 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 366 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 367 DOI 10.17487/RFC7540, May 2015, 368 . 370 [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP 371 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 372 April 2016, . 374 5.2. Informative References 376 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 377 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 378 2014, . 380 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 381 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 382 December 2014, . 384 [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning 385 Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April 386 2015, . 388 [W3C.CR-mixed-content-20160802] 389 West, M., "Mixed Content", World Wide Web Consortium CR 390 CR-mixed-content-20160802, August 2016, 391 . 393 Appendix A. Acknowledgements 395 Mike Bishop contributed significant text to this document. 397 Thanks to Patrick McManus, Stefan Eissing, Eliot Lear, Stephen 398 Farrell, Guy Podjarny, Stephen Ludin, Erik Nygren, Paul Hoffman, Adam 399 Langley, Eric Rescorla, Julian Reschke, Kari Hurtta, and Richard 400 Barnes for their feedback and suggestions. 402 Authors' Addresses 404 Mark Nottingham 406 Email: mnot@mnot.net 407 URI: https://www.mnot.net/ 409 Martin Thomson 410 Mozilla 412 Email: martin.thomson@gmail.com