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