idnits 2.17.00 (12 Aug 2021) /tmp/idnits51700/draft-ietf-httpbis-http2-encryption-04.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, 2016) is 2255 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Outdated reference: draft-ietf-httpbis-alt-svc has been published as RFC 7838 ** 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, 2016 Mozilla 6 March 17, 2016 8 Opportunistic Security for HTTP 9 draft-ietf-httpbis-http2-encryption-04 11 Abstract 13 This document describes how "http" URIs can be accessed using 14 Transport Layer Security (TLS) to mitigate pervasive monitoring 15 attacks. 17 Note to Readers 19 Discussion of this draft takes place on the HTTP working group 20 mailing list (ietf-http-wg@w3.org), which is archived at 21 https://lists.w3.org/Archives/Public/ietf-http-wg/ . 23 Working Group information can be found at http://httpwg.github.io/ ; 24 source code and issues list for this draft can be found at 25 https://github.com/httpwg/http-extensions/labels/opp-sec . 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on September 18, 2016. 44 Copyright Notice 46 Copyright (c) 2016 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 62 1.1. Goals and Non-Goals . . . . . . . . . . . . . . . . . . . 3 63 1.2. Notational Conventions . . . . . . . . . . . . . . . . . 3 64 2. Using HTTP URIs over TLS . . . . . . . . . . . . . . . . . . 3 65 3. Server Authentication . . . . . . . . . . . . . . . . . . . . 4 66 4. Interaction with "https" URIs . . . . . . . . . . . . . . . . 5 67 5. Requiring Use of TLS . . . . . . . . . . . . . . . . . . . . 5 68 5.1. Opportunistic Commitment . . . . . . . . . . . . . . . . 6 69 5.2. Client Handling of A Commitment . . . . . . . . . . . . . 6 70 5.3. Operational Considerations . . . . . . . . . . . . . . . 7 71 6. The "http-opportunistic" well-known URI . . . . . . . . . . . 7 72 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 73 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 74 8.1. Security Indicators . . . . . . . . . . . . . . . . . . . 8 75 8.2. Downgrade Attacks . . . . . . . . . . . . . . . . . . . . 8 76 8.3. Privacy Considerations . . . . . . . . . . . . . . . . . 9 77 8.4. Confusion Regarding Request Scheme . . . . . . . . . . . 9 78 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 79 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 80 9.2. Informative References . . . . . . . . . . . . . . . . . 10 81 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 84 1. Introduction 86 This document describes a use of HTTP Alternative Services 87 [I-D.ietf-httpbis-alt-svc] to decouple the URI scheme from the use 88 and configuration of underlying encryption, allowing a "http" URI 89 [RFC7230] to be accessed using TLS [RFC5246] opportunistically. 91 Serving "https" URIs require acquiring and configuring a valid 92 certificate, which means that some deployments find supporting TLS 93 difficult. This document describes a usage model whereby sites can 94 serve "http" URIs over TLS without being required to support strong 95 server authentication. 97 Opportunistic Security [RFC7435] does not provide the same guarantees 98 as using TLS with "https" URIs; it is vulnerable to active attacks, 99 and does not change the security context of the connection. 100 Normally, users will not be able to tell that it is in use (i.e., 101 there will be no "lock icon"). 103 By its nature, this technique is vulnerable to active attacks. A 104 mechanism for partially mitigating them is described in Section 5. 106 1.1. Goals and Non-Goals 108 The immediate goal is to make the use of HTTP more robust in the face 109 of pervasive passive monitoring [RFC7258]. 111 A secondary goal is to limit the potential for active attacks. It is 112 not intended to offer the same level of protection as afforded to 113 "https" URIs, but instead to increase the likelihood that an active 114 attack can be detected. 116 A final (but significant) goal is to provide for ease of 117 implementation, deployment and operation. This mechanism is expected 118 to have a minimal impact upon performance, and require a trivial 119 administrative effort to configure. 121 1.2. Notational Conventions 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in [RFC2119]. 127 2. Using HTTP URIs over TLS 129 An origin server that supports the resolution of "http" URIs can 130 indicate support for this specification by providing an alternative 131 service advertisement [I-D.ietf-httpbis-alt-svc] for a protocol 132 identifier that uses TLS, such as "h2" [RFC7540]. 134 A client that receives such an advertisement MAY make future requests 135 intended for the associated origin ([RFC6454]) to the identified 136 service (as specified by [I-D.ietf-httpbis-alt-svc]). 138 A client that places the importance of protection against passive 139 attacks over performance might choose to withhold requests until an 140 encrypted connection is available. However, if such a connection 141 cannot be successfully established, the client can resume its use of 142 the cleartext connection. 144 A client can also explicitly probe for an alternative service 145 advertisement by sending a request that bears little or no sensitive 146 information, such as one with the OPTIONS method. Likewise, clients 147 with existing alternative services information could make such a 148 request before they expire, in order minimize the delays that might 149 be incurred. 151 3. Server Authentication 153 [I-D.ietf-httpbis-alt-svc] requires that an alternative service only 154 be used when there are "reasonable assurances" that it is under 155 control of and valid for the whole origin. 157 As defined in that specification, one way of establishing this is 158 using a TLS-based protocol with the certificate checks defined in 159 [RFC2818]. Clients MAY impose additional criteria for establishing 160 reasonable assurances. 162 For the purposes of this specification, an additional way of 163 establishing reasonable assurances is available when the alternative 164 is on the same host as the origin, using the "http-opportunistic" 165 well-known URI defined in Section 6. 167 This allows deployment without the use of valid certificates, to 168 encourage deployment of opportunistic security. When it is in use, 169 the alternative service can provide any certificate, or even select 170 TLS cipher suites that do not include authentication. 172 When the client has a valid http-opportunistic response for an 173 origin, it MAY consider there to be reasonable assurances when: 175 o The origin and alternative service's hostnames are the same when 176 compared in a case-insensitive fashion, and 178 o The chosen alternative service returns the same response as above. 180 For example, this request/response pair would constitute reasonable 181 assurances for the origin "http://www.example.com" for any 182 alternative service also on "www.example.com": 184 GET /.well-known/http-opportunistic HTTP/1.1 185 Host: www.example.com 187 HTTP/1.1 200 OK 188 Content-Type: application/json 189 Connection: close 191 { 192 "origins": ["http://example.com", "http://www.example.com:81"] 193 } 195 Note that this mechanism is only defined to establish reasonable 196 assurances for the purposes of this specification; it does not apply 197 to other uses of alternative services unless they explicitly invoke 198 it. 200 4. Interaction with "https" URIs 202 When using alternative services, requests for resources identified by 203 both "http" and "https" URIs might use the same connection, because 204 HTTP/2 permits requests for multiple origins on the same connection. 206 Since "https" URIs rely on server authentication, a connection that 207 is initially created for "http" URIs without authenticating the 208 server cannot be used for "https" URIs until the server certificate 209 is successfully authenticated. Section 3.1 of [RFC2818] describes 210 the basic mechanism, though the authentication considerations in 211 [I-D.ietf-httpbis-alt-svc] also apply. 213 Connections that are established without any means of server 214 authentication (for instance, the purely anonymous TLS cipher 215 suites), cannot be used for "https" URIs. 217 5. Requiring Use of TLS 219 Even when the alternative service is strongly authenticated, 220 opportunistically upgrading cleartext HTTP connections to use TLS is 221 subject to active attacks. In particular: 223 o Because the original HTTP connection is in cleartext, it is 224 vulnerable to man-in-the-middle attacks, and 226 o By default, if clients cannot reach the alternative service, they 227 will fall back to using the original cleartext origin. 229 Given that the primary goal of this specification is to prevent 230 passive attacks, these are not critical failings (especially 231 considering the alternative - HTTP over cleartext). However, a 232 modest form of protection against active attacks can be provided for 233 clients on subsequent connections. 235 When an origin is able to commit to providing service for a 236 particular origin over TLS for a bounded period of time, clients can 237 choose to rely upon its availability, failing when it cannot be 238 contacted. Effectively, this makes the choice to use a secured 239 protocol "sticky". 241 5.1. Opportunistic Commitment 243 An origin can reduce the risk of attacks on opportunistically secured 244 connections by committing to provide an secured, authenticated 245 alternative service. This is done by including the optional "commit" 246 member in the http-opportunistic well-known resource (see Section 6). 247 This feature is optional due to the requirement for server 248 authentication and the potential risk entailed (see Section 5.3). 250 The value of the "commit" member is a number ([RFC7159], Section 6) 251 indicating the duration of the commitment interval in seconds. 253 { 254 "origins": ["http://example.com", "http://www.example.com:81"], 255 "commit": 86400 256 } 258 Including "commit" creates a commitment to provide a secured 259 alternative service for the advertised period. Clients that receive 260 this commitment can assume that a secured alternative service will be 261 available for the indicated period. Clients might however choose to 262 limit this time (see Section 5.3). 264 5.2. Client Handling of A Commitment 266 The value of the "commit" member MUST be ignored unless the 267 alternative service can be strongly authenticated. The same 268 authentication requirements that apply to "https://" resources SHOULD 269 be applied to authenticating the alternative. Minimum authentication 270 requirements for HTTP over TLS are described in Section 2.1 of 271 [I-D.ietf-httpbis-alt-svc] and Section 3.1 of [RFC2818]. As noted in 272 [I-D.ietf-httpbis-alt-svc], clients can impose other checks in 273 addition to this minimum set. For instance, a client might choose to 274 apply key pinning [RFC7469]. 276 A client that receives a commitment and that successfully 277 authenticates the alternative service can assume that a secured 278 alternative will remain available for the commitment interval. The 279 commitment interval starts when the commitment is received and 280 authenticated and runs for a number of seconds equal to value of the 281 "commit" member, less the current age of the http-opportunistic 282 response (as defined in Section 4.2.3 of [RFC7234]). A client SHOULD 283 avoid sending requests via cleartext protocols or to unauthenticated 284 alternative services for the duration of the commitment interval, 285 except to discover new potential alternatives. 287 A commitment only applies to the origin of the http-opportunistic 288 well-known resource that was retrieved; other origins listed in the 289 "origins" member MUST be independently discovered and authenticated. 291 A commitment is not bound to a particular alternative service. 292 Clients are able to use alternative services that they become aware 293 of. However, once a valid and authenticated commitment has been 294 received, clients SHOULD NOT use an unauthenticated alternative 295 service. Where there is an active commitment, clients SHOULD ignore 296 advertisements for unsecured alternative services. A client MAY send 297 requests to an unauthenticated origin in an attempt to discover 298 potential alternative services, but these requests SHOULD be entirely 299 generic and avoid including credentials. 301 5.3. Operational Considerations 303 Errors in configuration of commitments has the potential to render 304 even the unsecured origin inaccessible for the duration of a 305 commitment. Initial deployments are encouraged to use short duration 306 commitments so that errors can be detected without causing the origin 307 to become inaccessible to clients for extended periods. 309 To avoid situations where a commitment causes errors, clients MAY 310 limit the time over which a commitment is respected for a given 311 origin. A lower limit might be appropriate for initial commitments; 312 the certainty that a site has set a correct value - and the 313 corresponding limit on persistence - might increase as a commitment 314 is renewed multiple times. 316 6. The "http-opportunistic" well-known URI 318 This specification defines the "http-opportunistic" well-known URI 319 [RFC5785]. An origin is said to have a valid http-opportunistic 320 resource when: 322 o The client has obtained a 200 (OK) response for the well-known URI 323 from the origin, or refreshed one in cache [RFC7234], and 325 o That response has the media type "application/json", and 326 o That response's payload, when parsed as JSON [RFC7159], contains 327 an object as the root. 329 o The "origins" member of the root object has a value of an array of 330 strings, one of which is a case-insensitive character-for- 331 character match for the origin in question, serialised into 332 Unicode as per [RFC6454], Section 6.1, and 334 This specification defines one additional, optional member of the 335 root object, "commit" in Section 5. Unrecognised members MUST be 336 ignored. 338 7. IANA Considerations 340 This specification registers a Well-known URI [RFC5785]: 342 o URI Suffix: http-opportunistic 344 o Change Controller: IETF 346 o Specification Document(s): [this specification] 348 o Related Information: 350 8. Security Considerations 352 8.1. Security Indicators 354 User Agents MUST NOT provide any special security indicia when an 355 "http" resource is acquired using TLS. In particular, indicators 356 that might suggest the same level of security as "https" MUST NOT be 357 used (e.g., a "lock device"). 359 8.2. Downgrade Attacks 361 A downgrade attack against the negotiation for TLS is possible. With 362 commitment Section 5, this is limited to occasions where clients have 363 no prior information (see Section 8.3), or when persisted commitments 364 have expired. 366 For example, because the "Alt-Svc" header field 367 [I-D.ietf-httpbis-alt-svc] likely appears in an unauthenticated and 368 unencrypted channel, it is subject to downgrade by network attackers. 369 In its simplest form, an attacker that wants the connection to remain 370 in the clear need only strip the "Alt-Svc" header field from 371 responses. 373 Downgrade attacks can be partially mitigated using the "commit" 374 member of the http-opportunistic well-known resource, because when it 375 is used, a client can avoid using cleartext to contact a supporting 376 server. However, this only works when a previous connection has been 377 established without an active attacker present; a continuously 378 present active attacker can either prevent the client from ever using 379 TLS, or offer its own certificate. 381 8.3. Privacy Considerations 383 Cached alternative services can be used to track clients over time; 384 e.g., using a user-specific hostname. Clearing the cache reduces the 385 ability of servers to track clients; therefore clients MUST clear 386 cached alternative service information when clearing other origin- 387 based state (i.e., cookies). 389 8.4. Confusion Regarding Request Scheme 391 Many existing HTTP/1.1 implementations use the presence or absence of 392 TLS in the stack to determine whether requests are for "http" or 393 "https" resources. This is necessary in many cases because the most 394 common form of an HTTP/1.1 request does not carry an explicit 395 indication of the URI scheme. 397 HTTP/1.1 MUST NOT be used for opportunistically secured requests. 399 Some HTTP/1.1 implementations use ambient signals to determine if a 400 request is for an "https" resource. For example, implementations 401 might look for TLS on the stack or a port number of 443. An 402 implementation that supports opportunistically secured requests 403 SHOULD suppress these signals if there is any potential for 404 confusion. 406 9. References 408 9.1. Normative References 410 [I-D.ietf-httpbis-alt-svc] 411 mnot, m., McManus, P., and J. Reschke, "HTTP Alternative 412 Services", draft-ietf-httpbis-alt-svc-14 (work in 413 progress), March 2016. 415 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 416 Requirement Levels", BCP 14, RFC 2119, 417 DOI 10.17487/RFC2119, March 1997, 418 . 420 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 421 DOI 10.17487/RFC2818, May 2000, 422 . 424 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 425 (TLS) Protocol Version 1.2", RFC 5246, 426 DOI 10.17487/RFC5246, August 2008, 427 . 429 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 430 Uniform Resource Identifiers (URIs)", RFC 5785, 431 DOI 10.17487/RFC5785, April 2010, 432 . 434 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 435 DOI 10.17487/RFC6454, December 2011, 436 . 438 [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 439 Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 440 2014, . 442 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 443 Protocol (HTTP/1.1): Message Syntax and Routing", 444 RFC 7230, DOI 10.17487/RFC7230, June 2014, 445 . 447 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 448 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 449 RFC 7234, DOI 10.17487/RFC7234, June 2014, 450 . 452 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 453 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 454 DOI 10.17487/RFC7540, May 2015, 455 . 457 9.2. Informative References 459 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 460 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 461 2014, . 463 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 464 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 465 December 2014, . 467 [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning 468 Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April 469 2015, . 471 Appendix A. Acknowledgements 473 Thanks to Patrick McManus, Eliot Lear, Stephen Farrell, Guy Podjarny, 474 Stephen Ludin, Erik Nygren, Paul Hoffman, Adam Langley, Eric Rescorla 475 and Richard Barnes for their feedback and suggestions. 477 Authors' Addresses 479 Mark Nottingham 481 Email: mnot@mnot.net 482 URI: http://www.mnot.net/ 484 Martin Thomson 485 Mozilla 487 Email: martin.thomson@gmail.com