Re: TLS over http2 frames
Ben Burkert <ben@benburkert.com> Fri, 15 August 2014 19:33 UTC
Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DC06C1A0339 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Aug 2014 12:33:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.569
X-Spam-Level:
X-Spam-Status: No, score=-7.569 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.668, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iJU_FDs6vBtq for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 15 Aug 2014 12:33:18 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA8231A0334 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 15 Aug 2014 12:33:17 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XIND4-0007cZ-KF for ietf-http-wg-dist@listhub.w3.org; Fri, 15 Aug 2014 19:30:46 +0000
Resent-Date: Fri, 15 Aug 2014 19:30:46 +0000
Resent-Message-Id: <E1XIND4-0007cZ-KF@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <ben@benburkert.com>) id 1XINCn-0007aE-5h for ietf-http-wg@listhub.w3.org; Fri, 15 Aug 2014 19:30:29 +0000
Received: from mail-pa0-f45.google.com ([209.85.220.45]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <ben@benburkert.com>) id 1XINCl-0007N5-7K for ietf-http-wg@w3.org; Fri, 15 Aug 2014 19:30:28 +0000
Received: by mail-pa0-f45.google.com with SMTP id eu11so3978724pac.4 for <ietf-http-wg@w3.org>; Fri, 15 Aug 2014 12:29:59 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-type; bh=F3/8VIBAVXD3qkNCWaEvWyGmitAA4VG2vAA0ul/gx+8=; b=cmv2sxHFIZDKbtvW1FhwTNc+LH3o8JRz+68vAK/VJY4vVJk6lxOfTuejtqMvqMu6Ed nOwIcb8LjX4GK2Rm6T+HUyBQQG9OKUMuXMgQqXtk2vIH7DXlTfY7QuyelImy2NVWdX7x gTIVnqbsSDw7d4611KydPwrXk3pQoGpasfR4Avj5tqszIMor/KC5fibYcREdOVF81BTM Ki4EMTb0w32Ck8I00erjNiQtDHZhEshdrhYKRsRfeo+Qddp3aYZtFLGugyca+DoE5NYA qu/SUB7XnoLWbzJBD7qrdZUYea2yOnV7CvkDV/e5+y74RMhsyMlGA/dMjz1GIOuM94gg 3p4Q==
X-Gm-Message-State: ALoCoQm+zxGwXPVdLQphrRO/CsRWEMhNhOXAWGlME2qNnmJZyVNd7n+/0dDYKiVY8rdhPhSw4k6I
X-Received: by 10.68.223.34 with SMTP id qr2mr14813701pbc.29.1408130999377; Fri, 15 Aug 2014 12:29:59 -0700 (PDT)
Received: from HackBook-Pro.local (142-254-29-54.dsl.dynamic.sonic.net. [142.254.29.54]) by mx.google.com with ESMTPSA id ui8sm8688291pbc.84.2014.08.15.12.29.46 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 12:29:47 -0700 (PDT)
Date: Fri, 15 Aug 2014 12:29:45 -0700
From: Ben Burkert <ben@benburkert.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <etPan.53ee5fa9.6b8b4567.50fc@HackBook-Pro.local>
In-Reply-To: <C422E65E-5A52-45BD-8066-88AA91AC5342@mnot.net>
References: <108A24ED-3EED-42C6-B01D-20331A3A0593@benburkert.com> <C422E65E-5A52-45BD-8066-88AA91AC5342@mnot.net>
X-Mailer: Airmail (247)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="53ee5fa9_327b23c6_50fc"
Received-SPF: pass client-ip=209.85.220.45; envelope-from=ben@benburkert.com; helo=mail-pa0-f45.google.com
X-W3C-Hub-Spam-Status: No, score=-0.7
X-W3C-Hub-Spam-Report: HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1XINCl-0007N5-7K 9145617a49ebd44d38ba7ddedc9ff80b
X-Original-To: ietf-http-wg@w3.org
Subject: Re: TLS over http2 frames
Archived-At: <http://www.w3.org/mid/etPan.53ee5fa9.6b8b4567.50fc@HackBook-Pro.local>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/26623
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Mark, thanks for the great response. Note that we already specify how to use CONNECT over HTTP/2: http://http2.github.io/http2-spec/#CONNECT ... which does allow tunnelling TLS over a HTTP/2 stream. That doesn't directly address your needs, however. Yes, that section on using CONNECT to start a TCP proxy over DATA frames was what got me thinking about the problem of end-to-end encryption through an intermediary. What I'm proposing is more akin to a two layer onion router where the outside layer is terminated and re-encrypted at every hop and the inside layer is an end-to-end circuit. * Encapsulating TLS (or something with similar properties) inside of HTTP doesn't imply that you can cache it (one of the biggest benefits of a CDN). TLS uses a session key that changes from client to client (and often between different connections of the same client); you can't replay a response from client A to client B, because it uses a different session key. I agree that the intermediary trying to replay encrypted responses is a bad idea. The abstraction I'm suggesting is to provide the server with two layers for sending a response on. If the server wants the intermediary to cache a response it would send that response over the outside layer with the appropriate caching headers. If the response has sensitive data that must be encrypted end-to-end then the server would send the response over the inside layer. * You could take alternative approaches, but any scheme that allows multiple people to read the same encrypted content potentially leaks individuals' activities to the intermediary, which has serious privacy consequences if you're aiming for end-to-end. e2e integrity, OTOH, is very possible, but it adds more key management (see below). Right, it would be the responsibility of the client & server to ensure that data is sent over the appropriate layer, which complicates their implementations. But an extension that provides end-to-end encryption through an intermediary may be worth the extra complexity. Especially if it allows CDNs to switch from sharding to an intermediary strategy without sacrafising end-to-end encryption between the client & server. * Adding another layer like this adds a considerable amount of complexity, and security folks get very concerned about the properties of the resulting protocol as a result; more complexity means more opportunities for a successful attack. That's not to say that it's impossible, just that there are some significant barriers to overcome, and we're not at a place where standardising something like this would do much good, because it's very likely we wouldn't see broad implementation in this round of work. Aboslutely. While the idea of layering TLS sessions has been shown to work in principle by the tor project, an extension like this would certainly complicate the security model for browsers & servers. Hopefully the extension mechanism makes it possible to iterate on these problems (mostly) independently from the main protocol specification. I proposed the extension because my take away from reading the spec is that for CDNs to take full advantage of http2 they should act as intermediaries, and I haven't seen any resources or discussion about the problems that intermediaries pose to end-to-end encryption. My premise might be completely wrong, perhaps CDNs stick to the out-of-band/sharding strategy with http2. I would still argue that providing a mechanism for smarter intermediaries without sacrafising end-to-end encryption would open the door to new types services for improving site performance. Cheers, -Ben On August 14, 2014 at 8:36:31 PM, Mark Nottingham (mnot@mnot.net) wrote: Hi Ben, On 15 Aug 2014, at 12:28 pm, Ben Burkert <ben@benburkert.com> wrote: > Hello, > > I believe that there is a need for an http2 extension that allows for TLS over http2 frames. An extension to support simultaneous encryption between the client & intermediary and end-to-end encryption between the client & server on the same connection. The use case is analogous to browsers that send HTTPS requests over an encrypted VPN connection. Note that we already specify how to use CONNECT over HTTP/2: http://http2.github.io/http2-spec/#CONNECT ... which does allow tunnelling TLS over a HTTP/2 stream. That doesn't directly address your needs, however. > The CDN industry has largely evolved around the constraints of the modern web protocols; especially wrt http1.1 and https. In a number of ways the proposed http2 protocol has been designed to address flaws & oversights in http1.1 that made CDNs a necessity. I don't know of anyone saying that HTTP/2 will get rid of CDNs; they're largely complementary. > A large amount design effort has been focused on reusing and optimizing a single client/server connection. This is at odds with the CDN practice of serving a website's assets through an out-of-band connection to the CDN's network. Common practice for CDNs today is to CNAME the hostname over to the CDN, so that all requests can be served through it. This isn't universal, of course, but it is very common. > As CDNs adapt to http2 their role may evolve into an intermediary layer that provide their service over the same http2 connection in between client and server. We are already seeing similar services offered by CDNs. For example, traffic to www.whitehouse.gov is served first through Akamai's network before requests reach the drupal backend servers. This type of service can benefit clients by providing high availability and expanded presence, but at a cost to security; end-to-end encryption is not possible. Encrypted traffic must be terminated by the intermediary and then re-encrypted on it's way to the server. This is the case for http1.1 as well as http2, which is at odds with http2's goal of improved security. Just to be clear -- while we have done some things to improve security in HTTP/2, it's not a chartered goal. > An extension to allow TLS over frames addresses this problem by providing for a second layer of encryption. The outside (existing) layer would be used for communication between the client/server and intermediary, while the inside layer would provide end-to-end encryption between the client and server. Requests and responses would also be layered: the outside request/response would contain headers shared (and actionable upon) by the intermediary and the other two parties. The inside request/response would be passed through blindly by the intermediary. To put it a different way, the outside request/response is there to help the intermediary route/cache/serve the inside request/response which it cannot see. This has been discussed a fair amount (albeit, mostly casually). There are a couple of big problems to address, though: * Encapsulating TLS (or something with similar properties) inside of HTTP doesn't imply that you can cache it (one of the biggest benefits of a CDN). TLS uses a session key that changes from client to client (and often between different connections of the same client); you can't replay a response from client A to client B, because it uses a different session key. * You could take alternative approaches, but any scheme that allows multiple people to read the same encrypted content potentially leaks individuals' activities to the intermediary, which has serious privacy consequences if you're aiming for end-to-end. e2e integrity, OTOH, is very possible, but it adds more key management (see below). * Adding another layer like this adds a considerable amount of complexity, and security folks get very concerned about the properties of the resulting protocol as a result; more complexity means more opportunities for a successful attack. That's not to say that it's impossible, just that there are some significant barriers to overcome, and we're not at a place where standardising something like this would do much good, because it's very likely we wouldn't see broad implementation in this round of work. Hope this helps, -- Mark Nottingham https://www.mnot.net/
- TLS over http2 frames Ben Burkert
- Re: TLS over http2 frames Mark Nottingham
- Re: TLS over http2 frames Ben Burkert