Re: [TLS] Representing IP addresses in SNI -- proposed draft

Martin Thomson <mt@lowentropy.net> Fri, 29 July 2022 15:42 UTC

Return-Path: <mt@lowentropy.net>
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 2CDD3C14CF01 for <tls@ietfa.amsl.com>; Fri, 29 Jul 2022 08:42:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.127
X-Spam-Level:
X-Spam-Status: No, score=-2.127 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=fXa63suo; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=PH87/39y
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id As7f7g5gxQ3G for <tls@ietfa.amsl.com>; Fri, 29 Jul 2022 08:42:54 -0700 (PDT)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 670C1C14CF1B for <tls@ietf.org>; Fri, 29 Jul 2022 08:42:16 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CF45B5C0051; Fri, 29 Jul 2022 11:42:15 -0400 (EDT)
Received: from imap41 ([10.202.2.91]) by compute3.internal (MEProxy); Fri, 29 Jul 2022 11:42:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1659109335; x=1659195735; bh=QM XkUxZwsiLtIxjaQgRMlHHX29IxvOB9I7T6SWnl0A4=; b=fXa63suoc4U/fY2jM1 ZqFYlhFD5mYPN6euRg04uB9HiaZv0i+AK+p6hSM91xlVVZpxgyGiUzhjVxFmaOs9 iIqTwVSmv0qQIYM1pZxq/wsj2wbP44xZMqiGiKt9s4u/YiMvjd/JoeW5mHXVltDo GzeMgnUHbdhcJ3Nn6eUJ9GtyaDVrRpmvGdS0P6ZDTXFDpwLbOh1+OB6vOQQ65WRU fJBpwi+yYww71EBB60TnxmZ2El7Z0r98b8fPc8b1PwkEUNvKk97biwZofrkWI62f zuyknzxbwVkaYOmyvbhSVD45gpru4s5WMVRZSpmgYM8XS93PxcT8VJPGVvurFsTh dr2g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1659109335; x=1659195735; bh=QMXkUxZwsiLtIxjaQgRMlHHX29Ix vOB9I7T6SWnl0A4=; b=PH87/39y/RB6a3iqR3CQRMQH1kr0Esw2QqNRdO6/79aa 3+PXcFradcJIa/5065dUPpyFDn55+fkOWRGMcTG7y5pwSJYinQvFolGEqEC9n82X RR4nBaNf3KsH1cyWKEu9z+3y71J+kYhA5XsbY5w/QA8JIircGFstzwA1LbnzO2U0 U7qN2U5VtYDL17KjamoVOMaLekER/Aj8hk8s+Zy07cpHG/EEYfEEPrYZ+X5cxsEZ pdoF2595C5hz+76i0EozIjCZLknqqVoffXvO4uyTmFO8861VmUedC5SwgvZnWlMO gPTwJezTWVabCJP+NOb3HEAZiYgTl7fZ9dBQ9UbjOw==
X-ME-Sender: <xms:1__jYhy6b7xJ4AWygI916UFxNXwrxz5EQRRnbd6HT4QDuDU_XGCv0Q> <xme:1__jYhSCjb5ql89_rTlQ_EHl_yXNTL5ktiTN91DJCWaTo-ppej5geDqTZuzfumuYt cWANzflRgYCxV7pg0E>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddujedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfofgr rhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigvnhhtrhhophihrdhnvghtqeenuc ggtffrrghtthgvrhhnpefhvddtveeuhfeigedtjeegveekuedtueejveeugedukedtlefg vdeludekuddvgeenucffohhmrghinhepihgvthhfrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhtsehlohifvghnthhrohhphidr nhgvth
X-ME-Proxy: <xmx:1__jYrWy7n5OtVXZlVv8n1bpiPlJ139NvDLnUZFyOK6aiAd9Fe2IZg> <xmx:1__jYjgh8HmeaTz49FNlDYtzVWJUP5BgZJfcOibMBiuA6uz2m1mO-w> <xmx:1__jYjA5-hSZSAT_4z7Ab63txQcoIpfOuksYgitAuoX6nsk6WOCuyg> <xmx:1__jYmqROQUQHiCT0mt1zX3mC5Ouo-bSm4NGFqr8jwOR5XKvv663Sw>
Feedback-ID: ic129442d:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8EF1C2340077; Fri, 29 Jul 2022 11:42:15 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.7.0-alpha0-758-ge0d20a54e1-fm-20220729.001-ge0d20a54
Mime-Version: 1.0
Message-Id: <568c1c84-d701-47ef-a9ce-0d5a22688240@www.fastmail.com>
In-Reply-To: <CAKC-DJin=BZfPgt3Yq1yr4Pb5JbN=N7d_nMY_piwdhTWLa13HQ@mail.gmail.com>
References: <165894600746.5156.16661196948798932257@ietfa.amsl.com> <CAKC-DJgG9f1fkZO7aAV18wYyobHxPL9LW48Htj9Ut1Uqu=78Sg@mail.gmail.com> <22b537c2-9c28-407c-8916-a5cc3dcf0be7@www.fastmail.com> <CAF8qwaCMNSBgiypfzJ8Vi+8M6pxohE_HvzsHMHYBnN9wuc1B8Q@mail.gmail.com> <CAKC-DJin=BZfPgt3Yq1yr4Pb5JbN=N7d_nMY_piwdhTWLa13HQ@mail.gmail.com>
Date: Fri, 29 Jul 2022 11:41:54 -0400
From: Martin Thomson <mt@lowentropy.net>
To: Erik Nygren <erik+ietf@nygren.org>, David Benjamin <davidben@chromium.org>
Cc: "TLS@ietf.org" <tls@ietf.org>
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/-ztlhdPFO6crnp7E-U2rFx_h34Y>
Subject: Re: [TLS] Representing IP addresses in SNI -- proposed draft
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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: Fri, 29 Jul 2022 15:42:59 -0000

Please don't define an "extended SNI".  A new extension to signal the target IP address would be fine.  Keep it narrowly focused.

Having a separate extension might allow the DDR client to express both the SNI and the IP it is seeking.

A separate expected certificate extension is another, separate, separable idea that can have its own extension.

However...Both of these need ECH protection.  Which means new ECH parameters.  I'm not sure that I like that idea very much.


On Fri, Jul 29, 2022, at 09:50, Erik Nygren wrote:
> I was thinking about the new extension idea more.  It has the downside 
> of potentially being an API change in client/server TLS stacks,
> but opening this up might generally be worth considering.  If we added 
> an "Extended SNI" extension to support IPAddress,
> we might also want to consider if there are other things worth adding.
>
> Also including an Extended SNI option for "Certificate Fingerprint" 
> would solve a bunch of issues
> that have come up from time-to-time.  For example, it might help with 
> DANE.
>
> We've also talked in the past about being able to include a certificate 
> fingerprint 
> in URIs, and being able to signal that in Extended SNI would likely 
> make that work better.
> (A use-case for this is for using TLS in local/private network 
> environments such as to 
> home network devices or even localhost processes where being able to 
> have a URI
> with an {IP,cert_fingerprint(s)} pairing would have better security 
> properties than trying
> to use some global PKIX framework.)
>
> Is this something worth considering or that others in the WG might be 
> interested in?
>
>     Erik
>
> 
>
>
>
> On Wed, Jul 27, 2022 at 4:16 PM David Benjamin <davidben@chromium.org> wrote:
>> I agree this is quite a compatibility risk. In addition to messing with SNI lookup, there are servers that try to correlate TLS SNI and HTTP Host. Indeed, when we accidentally sent IP literals in SNI, we broke a server that tried to do that but got very confused by the colons in an IPv6 literal. That server would likely also be confused by this draft, less by syntax and more by SNI/Host mismatch. I would be surprised if this option were viable.
>> 
>> Another option, which doesn't require redefining existing fields, is to simply allocate a new extension. Though I agree with Martin that one would expect the server to know its own IP. If you implicitly interpret a missing server_name extension as "I want the IP cert for this connection's IP", it's already unambiguous. Granted, there may be edge cases because missing server_name can also mean "I want the default cert" and perhaps your "default" cert and IP cert are different.
>> 
>> On Wed, Jul 27, 2022 at 12:17 PM Martin Thomson <mt@lowentropy.net> wrote:
>>> Hi Erik,
>>> 
>>> As far as it goes, this might work.  However, I'm not sure about the effect of this on compatibility.  I'm concerned that maybe this would end up causing some servers to choke.  Servers that receive SNI can sometimes use that SNI value to lookup the correct certificate.  Your design could have those servers searching for a certificate that doesn't exist.
>>> 
>>> Anything along these lines would need to be tested for compatibility - extensively - before it could even be trialed.
>>> 
>>> (I never saw the DDR as having deployment problems along these lines.  It isn't THAT hard to know your own IP address for that purpose.)
>>> 
>>> On Wed, Jul 27, 2022, at 14:38, Erik Nygren wrote:
>>> > Following discussions in ADD around the DDR draft (as well as in UTA
>>> > around Martin Thomson's PR to add IP address SANs to 6125-bis),
>>> > I wrote up a draft on how IP addresses might be represented in SNI:
>>> >
>>> >       https://datatracker.ietf.org/doc/draft-nygren-tls-ip-in-sni/
>>> >
>>> > There are at least three different ways we could do it, but this draft
>>> > proposes what seems to be the least bad while also talking about the 
>>> > other alternatives.  (I suspect we'd want to move the alternatives 
>>> > to an appendix or remove entirely from a final version.)
>>> >
>>> > Is this interesting to the working group?
>>> > While IP address SANs have a bunch of corner cases and gaps,
>>> > they do seem to be picking up new uses.  
>>> >
>>> > What motivated me to realize we need to solve this is that 
>>> > draft-ietf-add-ddr uses IP SANs in a new way.  Rather than the 
>>> > client connecting to an IP address and expecting to see a SAN
>>> > (where returning a cert associated with the IP address containing
>>> > a SAN that the client connected to is straight-forward),
>>> > DDR has clients connecting to a different IP and then
>>> > expects to find an original IP also in the SAN list.  
>>> > This means that for an ISP with a large number of IPs
>>> > (or using a services who operates DoH service on-behalf
>>> > of many entities), you'd need to quickly/wastefully burn through IPv4 
>>> > addresses to enable a unique cert per original IP.
>>> >
>>> >     Erik
>>> >
>>> >
>>> > ---------- Forwarded message ---------
>>> > From: <internet-drafts@ietf.org>
>>> > Date: Wed, Jul 27, 2022 at 2:20 PM
>>> > Subject: New Version Notification for draft-nygren-tls-ip-in-sni-00.txt
>>> > To: Erik Nygren <erik+ietf@nygren.org <mailto:erik%2Bietf@nygren.org> <mailto:erik%2Bietf@nygren.org <mailto:erik%252Bietf@nygren.org>>>, 
>>> > Rich Salz <rsalz@akamai.com>
>>> >
>>> >
>>> >
>>> > A new version of I-D, draft-nygren-tls-ip-in-sni-00.txt
>>> > has been successfully submitted by Erik Nygren and posted to the
>>> > IETF repository.
>>> >
>>> > Name:           draft-nygren-tls-ip-in-sni
>>> > Revision:       00
>>> > Title:          Representing IP addresses in TLS Server Name Indication 
>>> > (SNI)
>>> > Document date:  2022-07-27
>>> > Group:          Individual Submission
>>> > Pages:          7
>>> > URL:            
>>> > https://www.ietf.org/archive/id/draft-nygren-tls-ip-in-sni-00.txt
>>> > Status:         
>>> > https://datatracker.ietf.org/doc/draft-nygren-tls-ip-in-sni/
>>> > Htmlized:       
>>> > https://datatracker.ietf.org/doc/html/draft-nygren-tls-ip-in-sni
>>> >
>>> >
>>> > Abstract:
>>> >    This specification provides a mechanism for clients to send IP
>>> >    addresses in a TLS Server Name Indication (SNI) extension as part of
>>> >    TLS handshakes, allowing servers to return a certificate containing
>>> >    that subjectAltName.  This is done by converting the IP address to a
>>> >    special-use domain name.
>>> >
>>> >
>>> >
>>> >
>>> > The IETF Secretariat
>>> >
>>> >
>>> > _______________________________________________
>>> > TLS mailing list
>>> > TLS@ietf.org
>>> > https://www.ietf.org/mailman/listinfo/tls
>>> 
>>> _______________________________________________
>>> TLS mailing list
>>> TLS@ietf.org
>>> https://www.ietf.org/mailman/listinfo/tls