Re: [TLS] TLS-in-TLS tunneling use cases (was: SNI Encryption)

Martin Thomson <martin.thomson@gmail.com> Thu, 10 August 2017 09:23 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B2A44128AA1 for <tls@ietfa.amsl.com>; Thu, 10 Aug 2017 02:23:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 eNxiOc9RKX7I for <tls@ietfa.amsl.com>; Thu, 10 Aug 2017 02:23:55 -0700 (PDT)
Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 47446132665 for <tls@ietf.org>; Thu, 10 Aug 2017 02:23:54 -0700 (PDT)
Received: by mail-io0-x22a.google.com with SMTP id g71so7355910ioe.5 for <tls@ietf.org>; Thu, 10 Aug 2017 02:23:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZWOAxzKTO5ORdeCeBsvVAkqieN2NE5KGqLjHG19zW8g=; b=R5sk6RXNm22W3B4YLY/wUIq8FwDjl68OVW9Dq7WB7Y5a2N9cbDot6ocn2nPuGWizLa Hf3cc9yJOKtz8j5QmFwOzuiekJRRbsQHwvWFOUiZ5aIDHJOLToBK+WiRszoB+p8xTRKK j6jeiAHRd3r0LJXB2i0ofNsdibzANucOuVHhglDiTdr03ZCkfMbaAhVnXGJjo0+H7pzp GOGN/WiU0QZrlQwcl67LKLvIjlX6Kz+eaEFjJaH5eqIjaN3SOYN/NSQSILx8x68+5FWW VvSDvWEL7/5ki1FCRo/k7KpyuwXM/lqdGdWZ1ohoFNPj/XSR6a4PLD/xHScnuzqmoQ5b oqzg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZWOAxzKTO5ORdeCeBsvVAkqieN2NE5KGqLjHG19zW8g=; b=go313uF+VWkKeTUfbeiE5uMRn3BRiRC4zzX/K3JBgz3+8SsKiKDcrBhx2cGVmQJDkM f1IbKqvkHy//ctufuDrucGlD/uZwqCjCQzEL1lbF19zK5LdbWRzffYfmPQoN5YH3H6Uj 0EdCHTEbz5oUJCzlMz2K90TSo/U1prLQgBxybTYxIbqKCgltmTgI1A3gmt4UWqfwxoER Wt/2Hq/1b+tT65s3vZEL/A9AIyvPdgY835+FpKpb39REflhgTyQ/0XUOyJqFV9vWVemk sc58Ie4qIKZXHtPlYIvwgrIOsY6rTiB45mV/kq7e8XA1uEEMda1EYLu9tPryal6bfqIa lgnA==
X-Gm-Message-State: AHYfb5gJ7U9WccDCbHmkwAensYf0ImAAEBu0Co+MStHrn6qc5qacM0iX qx3blVSm8Vu1UycHDU/YPZitHC7obg==
X-Received: by 10.107.46.155 with SMTP id u27mr8628698iou.107.1502357033525; Thu, 10 Aug 2017 02:23:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.164.42 with HTTP; Thu, 10 Aug 2017 02:23:52 -0700 (PDT)
In-Reply-To: <CAHOTMVJczAcn6dEot-nVqN6NQxZt64pq=bKr4p6tz4F3WhJdGw@mail.gmail.com>
References: <CAHOTMVJczAcn6dEot-nVqN6NQxZt64pq=bKr4p6tz4F3WhJdGw@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 10 Aug 2017 19:23:52 +1000
Message-ID: <CABkgnnV19Dznczm-mMsLUcB6SBeAocgh4QH4+9vh_-5yi9_qsw@mail.gmail.com>
To: Tony Arcieri <bascule@gmail.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/17SecLqhU5KU7cuhFvjdxWpgFWY>
Subject: Re: [TLS] TLS-in-TLS tunneling use cases (was: SNI Encryption)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Aug 2017 09:23:57 -0000

I'm trying to work out whether there is anything new here.  I know
that browsers implement proxying over HTTPS and CONNECT.  Can you
summarize the ask more succinctly?  Because I'm thinking that this is
a solved problem.

See Section 8.3 of RFC 7540.  We didn't put that there for a lark.

On 10 August 2017 at 15:54, Tony Arcieri <bascule@gmail.com> wrote:
> As I look at draft-huitema-tls-sni-encryption[1], I really think it's
> putting the cart before the horse. I really like the proposed TLS-in-TLS
> tunneling mechanism, but I feel it is a generally useful mechanism, and this
> draft relegates it to providing a point solution specifically for the
> purposes of SNI encryption and considering only that use case.
>
> One of the things I like the most about TLS 1.3 is how it has harmonized the
> sort of chunky stew of ill-conceived features found in previous TLS versions
> (with nebulous and overlapping responsibilities) into a smaller set of
> clearly-defined parsimonious ones which cover a wide range of use cases.
>
> In considering the general problem of "SNI encryption", and particularly
> within the context of TLS-in-TLS tunneling solution, I humbly ask that other
> use cases which would benefit from a TLS-in-TLS tunneling mechanism are
> considered. I think any draft about this should have TLS-in-TLS tunneling
> itself as the centerpiece, and "SNI encryption" off to the side as one
> potential use case.
>
> So, what other use cases are worth considering? Egress proxies!
>
> Consider: a gateway server acting as an external proxy which bridges an
> internal network with the Internet, acting as a forward proxy to
> authenticated clients (either human-driven apps/tools or backend services).
>
> What I think is particularly interesting about this use case in the context
> of the SNI encryption discussion is it is in fact almost entirely the same
> problem from a technical perspective. Where it differs is largely in the
> framing of the problem: instead of using the gateway to reach a hidden host
> from the Internet, we are using the gateway to talk to the Internet from an
> internal network which needs to go through a proxy host to reach the
> Internet.
>
> More tangibly, I would like the following as the administrator of an
> internal network:
>
> - All outbound traffic flows through centrally managed gateway hosts which
> act as TCP proxies. Outbound connections to the Internet are otherwise NOT
> allowed
>
> - As we're fans of actually using TLS to provide end-to-end transport
> security and not "SSL added and removed here ;-)", we want the resulting
> connection to be encrypted end-to-end between the internal network TLS
> client and the requested destination server. Also, all "setup" communication
> to the gateway should also happen over TLS
>
> - The gateway authenticates clients (using e.g. a TLS client certificate)
> and authorizes the outbound hostnames against an ACL. This way we can
> control which clients are allowed to reach which external endpoints.
>
> There are a few additional things which are different between the cases
> beyond some of what I've just mentioned. Ideally the client verifies the
> gateway's server cert against an internal-only CA bundle, then verifies the
> tunneled destination host against a public CA bundle. We might want a client
> to present an internal client certificate to the gateway, but present no
> cert/a different cert to the destination host. That said, aside from minutia
> like that, the machinery seems largely the same.
>
> What are the real-world "rough consensus and running code" solutions to this
> sort of problem in place today? There are all sorts of options that are
> sort-of-not-quite like what I just described, e.g. a SOCKS proxy. But the
> one I'm thinking of as I write this is CONNECT tunnels:
>
> https://wiki.squid-cache.org/Features/HTTPS
>
> These sorts of tunnels (ab)use a HTTP(S) forward-proxy to establish outbound
> TCP connections (which, if you care about security, will carry TLS encrypted
> traffic).
>
> This approach is partly described in RFC 2817[2], but to tick all of the
> checkboxes on the points I mentioned earlier using this method, you need to
> implement features in draft-luotonen-web-proxy-tunneling-01[3], which has
> never received an RFC and, as far as I can tell, is only properly
> implemented by Squid. Using Squid as a TLS-in-TLS tunneling solution seems
> less than ideal to me, and yet in many ways it seems like the "least
> friction" option, especially for access control purposes.
>
> I would really love a simple, straightforward approach to this problem with
> a published RFC instead of an expired draft that's only implemented by
> Squid. I also think TLS-in-TLS tunneling can solve this same problem in a
> much more straightforward manner.
>
> tl;dr: when making drafts regarding TLS-in-TLS tunneling, please consider
> the forward-proxy use case in addition to the reverse-proxy case
>
> [1]: https://datatracker.ietf.org/doc/draft-huitema-tls-sni-encryption/
> [2]: https://www.rfc-editor.org/rfc/rfc2817.txt
> [3]: https://tools.ietf.org/html/draft-luotonen-web-proxy-tunneling-01
>
> --
> Tony Arcieri
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>