idnits 2.17.1 draft-schinazi-masque-obfuscation-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 : ---------------------------------------------------------------------------- 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 (8 January 2020) is 1564 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'I-D.schwartz-httpbis-helium' is defined on line 404, but no explicit reference was found in the text == Unused Reference: 'I-D.pardue-httpbis-http-network-tunnelling' is defined on line 405, but no explicit reference was found in the text == Unused Reference: 'RFC8441' is defined on line 407, but no explicit reference was found in the text == Unused Reference: 'RFC8471' is defined on line 446, but no explicit reference was found in the text == Unused Reference: 'I-D.sullivan-tls-post-handshake-auth' is defined on line 452, but no explicit reference was found in the text == Outdated reference: A later version (-02) exists of draft-schinazi-masque-01 == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-24 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-24 ** Obsolete normative reference: RFC 7540 (ref. 'HTTP2') (Obsoleted by RFC 9113) == Outdated reference: A later version (-08) exists of draft-schinazi-httpbis-transport-auth-00 == Outdated reference: A later version (-03) exists of draft-ietf-dnsop-svcb-httpssvc-01 == Outdated reference: A later version (-06) exists of draft-ietf-httpbis-http2-secondary-certs-05 Summary: 1 error (**), 0 flaws (~~), 12 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group D. Schinazi 3 Internet-Draft Google LLC 4 Intended status: Experimental 8 January 2020 5 Expires: 11 July 2020 7 MASQUE Obfuscation 8 draft-schinazi-masque-obfuscation-00 10 Abstract 12 This document describes MASQUE Obfuscation. MASQUE Obfuscation is a 13 mechanism that allows co-locating and obfuscating networking 14 applications behind an HTTPS web server. The currently prevalent 15 use-case is to allow running a proxy or VPN server that is 16 indistinguishable from an HTTPS server to any unauthenticated 17 observer. We do not expect major providers and CDNs to deploy this 18 behind their main TLS certificate, as they are not willing to take 19 the risk of getting blocked, as shown when domain fronting was 20 blocked. An expected use would be for individuals to enable this 21 behind their personal websites via easy to configure open-source 22 software. 24 This document is a straw-man proposal. It does not contain enough 25 details to implement the protocol, and is currently intended to spark 26 discussions on the approach it is taking. Discussion of this work is 27 encouraged to happen on the MASQUE IETF mailing list masque@ietf.org 28 (mailto:masque@ietf.org) or on the GitHub repository which contains 29 the draft: https://github.com/DavidSchinazi/masque-drafts 30 (https://github.com/DavidSchinazi/masque-drafts). 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at https://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on 11 July 2020. 49 Copyright Notice 51 Copyright (c) 2020 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 56 license-info) in effect on the date of publication of this document. 57 Please review these documents carefully, as they describe your rights 58 and restrictions with respect to this document. Code Components 59 extracted from this document must include Simplified BSD License text 60 as described in Section 4.e of the Trust Legal Provisions and are 61 provided without warranty as described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 66 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3 67 2. Usage Scenarios . . . . . . . . . . . . . . . . . . . . . . . 3 68 2.1. Protection from Network Providers . . . . . . . . . . . . 3 69 2.2. Protection from Web Servers . . . . . . . . . . . . . . . 3 70 2.3. Onion Routing . . . . . . . . . . . . . . . . . . . . . . 4 71 3. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 4 72 3.1. Invisibility of Usage . . . . . . . . . . . . . . . . . . 4 73 3.2. Invisibility of the Server . . . . . . . . . . . . . . . 4 74 3.3. Fallback to HTTP/2 over TLS over TCP . . . . . . . . . . 4 75 4. Overview of the Mechanism . . . . . . . . . . . . . . . . . . 5 76 5. Connection Resumption . . . . . . . . . . . . . . . . . . . . 5 77 6. Path MTU Discovery . . . . . . . . . . . . . . . . . . . . . 5 78 7. Operation over HTTP/2 . . . . . . . . . . . . . . . . . . . . 5 79 8. Security Considerations . . . . . . . . . . . . . . . . . . . 6 80 8.1. Traffic Analysis . . . . . . . . . . . . . . . . . . . . 6 81 8.2. Untrusted Servers . . . . . . . . . . . . . . . . . . . . 7 82 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 83 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 84 10.1. Normative References . . . . . . . . . . . . . . . . . . 7 85 10.2. Informative References . . . . . . . . . . . . . . . . . 8 86 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 9 87 Design Justifications . . . . . . . . . . . . . . . . . . . . . . 9 88 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11 90 1. Introduction 92 This document describes MASQUE Obfuscation. MASQUE Obfuscation is a 93 mechanism that allows co-locating and obfuscating networking 94 applications behind an HTTPS web server. The currently prevalent 95 use-case is to allow running a proxy or VPN server that is 96 indistinguishable from an HTTPS server to any unauthenticated 97 observer. We do not expect major providers and CDNs to deploy this 98 behind their main TLS certificate, as they are not willing to take 99 the risk of getting blocked, as shown when domain fronting was 100 blocked. An expected use would be for individuals to enable this 101 behind their personal websites via easy to configure open-source 102 software. 104 This document is a straw-man proposal. It does not contain enough 105 details to implement the protocol, and is currently intended to spark 106 discussions on the approach it is taking. Discussion of this work is 107 encouraged to happen on the MASQUE IETF mailing list masque@ietf.org 108 (mailto:masque@ietf.org) or on the GitHub repository which contains 109 the draft: https://github.com/DavidSchinazi/masque-drafts 110 (https://github.com/DavidSchinazi/masque-drafts). 112 MASQUE Obfuscation is built upon the MASQUE protocol [MASQUE]. 113 MASQUE Obfuscation leverages the efficient head-of-line blocking 114 prevention features of the QUIC transport protocol [QUIC] when MASQUE 115 Obfuscation is used in an HTTP/3 [HTTP3] server. MASQUE Obfuscation 116 can also run in an HTTP/2 server [HTTP2] but at a performance cost. 118 1.1. Conventions and Definitions 120 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 121 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 122 "OPTIONAL" in this document are to be interpreted as described in BCP 123 14 [RFC2119] [RFC8174] when, and only when, they appear in all 124 capitals, as shown here. 126 2. Usage Scenarios 128 There are currently multiple usage scenarios that can benefit from 129 MASQUE Obfuscation. 131 2.1. Protection from Network Providers 133 Some users may wish to obfuscate the destination of their network 134 traffic from their network provider. This prevents network providers 135 from using data harvested from this network traffic in ways the user 136 did not intend. 138 2.2. Protection from Web Servers 140 There are many clients who would rather not establish a direct 141 connection to web servers, for example to avoid location tracking. 142 The clients can do that by running their traffic through a MASQUE 143 Obfuscation server. The web server will only see the IP address of 144 the MASQUE Obfuscation server, not that of the client. 146 2.3. Onion Routing 148 Routing traffic through a MASQUE Obfuscation server only provides 149 partial protection against tracking, because the MASQUE Obfuscation 150 server knows the address of the client. Onion routing as it exists 151 today mitigates this issue for TCP/TLS. A MASQUE Obfuscation server 152 could allow onion routing over QUIC. 154 In this scenario, the client establishes a connection to the MASQUE 155 Obfuscation server, then through that to another MASQUE Obfuscation 156 server, etc. This creates a tree of MASQUE servers rooted at the 157 client. QUIC connections are mapped to a specific branch of the 158 tree. The first MASQUE Obfuscation server knows the actual address 159 of the client, but the other MASQUE Obfuscation servers only know the 160 address of the previous server. To assure reasonable privacy, the 161 path should include at least 3 MASQUE Obfuscation servers. 163 3. Requirements 165 This section describes the goals and requirements chosen for MASQUE 166 Obfuscation. 168 3.1. Invisibility of Usage 170 An authenticated client using MASQUE Obfuscation appears to observers 171 as a regular HTTPS client. Observers only see that HTTP/3 or HTTP/2 172 is being used over an encrypted channel. No part of the exchanges 173 between client and server may stick out. Note that traffic analysis 174 is discussed in Section 8.1. 176 3.2. Invisibility of the Server 178 To anyone without private keys, the server is indistinguishable from 179 a regular web server. It is impossible to send an unauthenticated 180 probe that the server would reply to differently than if it were a 181 normal web server. 183 3.3. Fallback to HTTP/2 over TLS over TCP 185 When QUIC is blocked, MASQUE Obfuscation can run over TCP and still 186 satisfy previous requirements. Note that in this scenario 187 performance may be negatively impacted. 189 4. Overview of the Mechanism 191 The server runs an HTTPS server on port 443, and has a valid TLS 192 certificate for its domain. The client has a public/private key 193 pair, and the server maintains a list of authorized MASQUE 194 Obfuscation clients, and their public key. (Alternatively, clients 195 can also be authenticated using a shared secret.) The client starts 196 by establishing a regular HTTPS connection to the server (HTTP/3 over 197 QUIC or HTTP/2 over TLS 1.3 [TLS13] over TCP), and validates the 198 server's TLS certificate as it normally would for HTTPS. If 199 validation fails, the connection is aborted. At this point the 200 client can send regular unauthenticated HTTP requests to the server. 201 When it wishes to start MASQUE Obfuscation, the client uses HTTP 202 Transport Authentication [TRANSPORT-AUTH] to prove its possession of 203 its associated key. The client sends the Transport-Authentication 204 header alongside its MASQUE Negotiation request. 206 When the server receives the MASQUE Negotiation request, it 207 authenticates the client and if that fails responds with code "404 208 Not Found", making sure its response is the same as what it would 209 return for any unexpected POST request. If authentication succeeds, 210 the server sends its list of supported MASQUE applications and the 211 client can start using them. 213 5. Connection Resumption 215 Clients MUST NOT attempt to "resume" MASQUE Obfuscation state 216 similarly to how TLS sessions can be resumed. Every new QUIC or TLS 217 connection requires fully authenticating the client and server. QUIC 218 0-RTT and TLS early data MUST NOT be used with MASQUE Obfuscation as 219 they are not forward secure. 221 6. Path MTU Discovery 223 In the main deployment of this mechanism, QUIC will be used between 224 client and server, and that will most likely be the smallest MTU link 225 in the path due to QUIC header and authentication tag overhead. The 226 client is responsible for not sending overly large UDP packets and 227 notifying the server of the low MTU. Therefore PMTUD is currently 228 seen as out of scope of this document. 230 7. Operation over HTTP/2 232 We will need to define the details of how to run MASQUE over HTTP/2. 233 When running over HTTP/2, MASQUE uses the Extended CONNECT method to 234 negotiate the use of datagrams over an HTTP/2 stream 235 [HTTP2-TRANSPORT]. 237 MASQUE Obfuscation implementations SHOULD discover that HTTP/3 is 238 available (as opposed to only HTTP/2) using the same mechanism as 239 regular HTTP traffic. This current standardized mechanism for this 240 is HTTP Alternative Services [ALT-SVC], but future mechanisms such as 241 [HTTPSSVC] can be used if they become widespread. 243 MASQUE Obfuscation implementations using HTTP/3 MUST support the 244 fallback to HTTP/2 to avoid incentivizing censors to block HTTP/3 or 245 QUIC. 247 When the client wishes to use the "UDP Proxying" MASQUE application 248 over HTTP/2, the client opens a new stream with a CONNECT request to 249 the "masque-udp-proxy" protocol and then sends datagrams encapsulated 250 inside the stream with a two-byte length prefix in network byte 251 order. The target IP and port are sent as part of the URL query. 252 Resetting that stream instructs the server to release any associated 253 resources. 255 When the client wishes to use the "IP Proxying" MASQUE application 256 over HTTP/2, the client opens a new stream with a CONNECT request to 257 the "masque-ip-proxy" protocol and then sends IP datagrams with a two 258 byte length prefix. The server can inspect the IP datagram to look 259 for the destination address in the IP header. 261 8. Security Considerations 263 Here be dragons. TODO: slay the dragons. 265 8.1. Traffic Analysis 267 While MASQUE Obfuscation ensures that proxied traffic appears similar 268 to regular HTTP traffic, it doesn't inherently defeat traffic 269 analysis. However, the fact that MASQUE leverages QUIC allows it to 270 segment STREAM frames over multiple packets and add PADDING frames to 271 change the observable characteristics of its encrypted traffic. The 272 exact details of how to change traffic patterns to defeat traffic 273 analysis is considered an open research question and is out of scope 274 for this document. 276 When multiple MASQUE Obfuscation servers are available, a client can 277 leverage QUIC connection migration to seamlessly transition its end- 278 to-end QUIC connections by treating separate MASQUE Obfuscation 279 servers as different paths. This could afford an additional level of 280 obfuscation in hopes of rendering traffic analysis less effective. 282 8.2. Untrusted Servers 284 As with any proxy or VPN technology, MASQUE Obfuscation hides some of 285 the client's private information (such as who they are communicating 286 with) from their network provider by transferring that information to 287 the MASQUE server. It is paramount that clients only use MASQUE 288 Obfuscation servers that they trust, as a malicious actor could 289 easily setup a MASQUE Obfuscation server and advertise it as a 290 privacy solution in hopes of attracting users to send it their 291 traffic. 293 9. IANA Considerations 295 We will need to register the "masque-udp-proxy" and "masque-ip-proxy" 296 extended HTTP CONNECT protocols. 298 10. References 300 10.1. Normative References 302 [MASQUE] Schinazi, D., "The MASQUE Protocol", Work in Progress, 303 Internet-Draft, draft-schinazi-masque-01, 8 July 2019, 304 . 307 [QUIC] Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 308 and Secure Transport", Work in Progress, Internet-Draft, 309 draft-ietf-quic-transport-24, 3 November 2019, 310 . 313 [HTTP3] Bishop, M., "Hypertext Transfer Protocol Version 3 314 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- 315 quic-http-24, 4 November 2019, . 318 [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 319 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 320 DOI 10.17487/RFC7540, May 2015, 321 . 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 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 329 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 330 May 2017, . 332 [TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol 333 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 334 . 336 [TRANSPORT-AUTH] 337 Schinazi, D., "HTTP Transport Authentication", Work in 338 Progress, Internet-Draft, draft-schinazi-httpbis- 339 transport-auth-00, 8 July 2019, . 343 [HTTP2-TRANSPORT] 344 Kinnear, E. and T. Pauly, "Using HTTP/2 as a Transport for 345 Arbitrary Bytestreams", Work in Progress, Internet-Draft, 346 draft-kinnear-httpbis-http2-transport-02, 4 November 2019, 347 . 350 [ALT-SVC] Nottingham, M., McManus, P., and J. Reschke, "HTTP 351 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 352 April 2016, . 354 10.2. Informative References 356 [HTTPSSVC] Schwartz, B., Bishop, M., and E. Nygren, "Service binding 357 and parameter specification via the DNS (DNS SVCB and 358 HTTPSSVC)", Work in Progress, Internet-Draft, draft-ietf- 359 dnsop-svcb-httpssvc-01, 4 November 2019, 360 . 363 [I-D.schwartz-httpbis-helium] 364 Schwartz, B., "Hybrid Encapsulation Layer for IP and UDP 365 Messages (HELIUM)", Work in Progress, Internet-Draft, 366 draft-schwartz-httpbis-helium-00, 25 June 2018, 367 . 370 [I-D.pardue-httpbis-http-network-tunnelling] 371 Pardue, L., "HTTP-initiated Network Tunnelling (HiNT)", 372 Work in Progress, Internet-Draft, draft-pardue-httpbis- 373 http-network-tunnelling-01, 18 October 2018, 374 . 377 [RFC8441] McManus, P., "Bootstrapping WebSockets with HTTP/2", 378 RFC 8441, DOI 10.17487/RFC8441, September 2018, 379 . 381 [RFC8471] Popov, A., Ed., Nystroem, M., Balfanz, D., and J. Hodges, 382 "The Token Binding Protocol Version 1.0", RFC 8471, 383 DOI 10.17487/RFC8471, October 2018, 384 . 386 [I-D.sullivan-tls-post-handshake-auth] 387 Sullivan, N., Thomson, M., and M. Bishop, "Post-Handshake 388 Authentication in TLS", Work in Progress, Internet-Draft, 389 draft-sullivan-tls-post-handshake-auth-00, 5 August 2016, 390 . 393 [I-D.ietf-httpbis-http2-secondary-certs] 394 Bishop, M., Sullivan, N., and M. Thomson, "Secondary 395 Certificate Authentication in HTTP/2", Work in Progress, 396 Internet-Draft, draft-ietf-httpbis-http2-secondary-certs- 397 05, 1 November 2019, . 400 Acknowledgments 402 This proposal was inspired directly or indirectly by prior work from 403 many people. In particular, this work is related to 404 [I-D.schwartz-httpbis-helium] and 405 [I-D.pardue-httpbis-http-network-tunnelling]. The mechanism used to 406 run the MASQUE protocol over HTTP/2 streams was inspired by 407 [RFC8441]. Brendan Moran is to thank for the idea of leveraging 408 connection migration across MASQUE servers. The author would also 409 like to thank Nick Harper, Christian Huitema, Marcus Ihlar, Eric 410 Kinnear, Mirja Kuehlewind, Lucas Pardue, Tommy Pauly, Zaheduzzaman 411 Sarker, Ben Schwartz, and Christopher A. Wood for their input. 413 The author would like to express immense gratitude to Christophe A., 414 an inspiration and true leader of VPNs. 416 Design Justifications 418 Using an exported key as a nonce allows us to prevent replay attacks 419 (since it depends on randomness from both endpoints of the TLS 420 connection) without requiring the server to send an explicit nonce 421 before it has authenticated the client. Adding an explicit nonce 422 mechanism would expose the server as it would need to send these 423 nonces to clients that have not been authenticated yet. 425 The rationale for a separate MASQUE protocol stream is to allow 426 server-initiated messages. If we were to use HTTP semantics, we 427 would only be able to support the client-initiated request-response 428 model. We could have used WebSocket for this purpose but that would 429 have added wire overhead and dependencies without providing useful 430 features. 432 There are many other ways to authenticate HTTP, however the 433 authentication used here needs to work in a single client-initiated 434 message to meet the requirement of not exposing the server. 436 The current proposal would also work with TLS 1.2, but in that case 437 TLS false start and renegotiation must be disabled, and the extended 438 master secret and renegotiation indication TLS extensions must be 439 enabled. 441 If the server or client want to hide that HTTP/2 is used, the client 442 can set its ALPN to an older version of HTTP and then use the Upgrade 443 header to upgrade to HTTP/2 inside the TLS encryption. 445 The client authentication used here is similar to how Token Binding 446 [RFC8471] operates, but it has very different goals. MASQUE does not 447 use token binding directly because using token binding requires 448 sending the token_binding TLS extension in the TLS ClientHello, and 449 that would stick out compared to a regular TLS connection. 451 TLS post-handshake authentication 452 [I-D.sullivan-tls-post-handshake-auth] is not used by this proposal 453 because that requires sending the "post_handshake_auth" extension in 454 the TLS ClientHello, and that would stick out from a regular HTTPS 455 connection. 457 Client authentication could have benefited from Secondary Certificate 458 Authentication in HTTP/2 [I-D.ietf-httpbis-http2-secondary-certs], 459 however that has two downsides: it requires the server advertising 460 that it supports it in its SETTINGS, and it cannot be sent unprompted 461 by the client, so the server would have to request authentication. 462 Both of these would make the server stick out from regular HTTP/2 463 servers. 465 MASQUE proposes a new client authentication method (as opposed to 466 reusing something like HTTP basic authentication) because HTTP 467 authentication methods are conceptually per-request (they need to be 468 repeated on each request) whereas the new method is bound to the 469 underlying connection (be it QUIC or TLS). In particular, this 470 allows sending QUIC DATAGRAM frames without authenticating every 471 frame individually. Additionally, HMAC and asymmetric keying are 472 preferred to sending a password for client authentication since they 473 have a tighter security bound. Going into the design rationale, 474 HMACs (and signatures) need some data to sign, and to avoid replay 475 attacks that should be a fresh nonce provided by the remote peer. 476 Having the server provide an explicit nonce would leak the existence 477 of the server so we use TLS keying material exporters as they provide 478 us with a nonce that contains entropy from the server without 479 requiring explicit communication. 481 Author's Address 483 David Schinazi 484 Google LLC 485 1600 Amphitheatre Parkway 486 Mountain View, California 94043, 487 United States of America 489 Email: dschinazi.ietf@gmail.com