[TLS] Re: Port number and ALPN of ECH client facing servers

Christian Huitema <huitema@huitema.net> Sat, 07 June 2025 07:04 UTC

Return-Path: <huitema@huitema.net>
X-Original-To: tls@mail2.ietf.org
Delivered-To: tls@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 1B1603214482 for <tls@mail2.ietf.org>; Sat, 7 Jun 2025 00:04:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: 1.638
X-Spam-Level: *
X-Spam-Status: No, score=1.638 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=mfg.outbound
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BGwhF_rkwDQS for <tls@mail2.ietf.org>; Sat, 7 Jun 2025 00:04:44 -0700 (PDT)
Received: from semfq02.mfg.siteprotect.com (semfq02.mfg.siteprotect.com [64.26.60.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id A2419321447F for <tls@ietf.org>; Sat, 7 Jun 2025 00:04:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mfg.outbound; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:reply-to: sender:cc:bcc; bh=4MOnrKTh1dFl8G1LzTy1wI5+bVNvkKGOGBjAHRbXy+U=; b=gFtghw0ZmFV mDtkoDeYn5+joo1dD9VWAqJ4t0Lmhz6MbUfkllrMz7d/Kc5qNj4PVER2kjwOT+fdOXuSfkgWoURoC qjr22zPwYpC8WfxjxwMkIU8MzOeI/DDhkOqZ2fz2CCGaUHQEKXpmWqbgkijHBFrLS6LKysLBynMiT DpCdje7g6fFgFwy6hzoYvwd2NnjzSG0Ix1CCrCy+CIVOZzZzGrqNxoAeU8Ulpr9tJ/dlRA/x5AcKs OkbrJFoY2cvoNwG7adKcdfzMjK1vIGhRxc+icM67e037GO8/Ng+vwgjKm5DllSyTMrAUNlIw01m0X XptRoBj0A7dHL6zvYW+dHdA==;
Received: from smtpauth01.mfg.siteprotect.com ([64.26.60.150]) by se02.mfg.siteprotect.com with esmtp (Exim 4.94.2) (envelope-from <huitema@huitema.net>) id 1uNnbd-00AFJM-F2 for tls@ietf.org; Sat, 07 Jun 2025 03:04:43 -0400
Received: from [192.168.1.105] (unknown [172.56.170.224]) (Authenticated sender: huitema@huitema.net) by smtpauth01.mfg.siteprotect.com (Postfix) with ESMTPSA id 4bDq1h63T7z9hypw1 for <tls@ietf.org>; Sat, 7 Jun 2025 03:04:40 -0400 (EDT)
Message-ID: <8669d982-00e4-428b-9c9e-553241663b94@huitema.net>
Date: Sat, 07 Jun 2025 00:04:39 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: tls@ietf.org
References: <cd762457-4949-4b1d-8cb2-c46ecc9700c6@huitema.net> <ME0P282MB55874535EA95DB504B806C5DA369A@ME0P282MB5587.AUSP282.PROD.OUTLOOK.COM>
Content-Language: en-US
From: Christian Huitema <huitema@huitema.net>
In-Reply-To: <ME0P282MB55874535EA95DB504B806C5DA369A@ME0P282MB5587.AUSP282.PROD.OUTLOOK.COM>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Authentication-Results: mfg.siteprotect.com; auth=pass smtp.auth=huitema@huitema.net
X-Originating-IP: 64.26.60.150
X-SpamExperts-Domain: mfg.outbound
X-SpamExperts-Username: 64.26.60.150/31
Authentication-Results: mfg.siteprotect.com; auth=pass smtp.auth=64.26.60.150/31@mfg.outbound
X-SpamExperts-Outgoing-Class: ham
X-SpamExperts-Outgoing-Evidence: Combined (0.14)
X-Recommended-Action: accept
X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuVAuA5fYRkEBnC+chq51BKWOX6j/za2P4nw 5t4FW3mdkiu2SmbhJN1U9FKs8X3+Nt127hcteP1p0NVNV47moiZtUnZMMMyaNBeO+OvFQHUlG4JL M0i5ZAms0EHrvcCaVIN6/+Rk2fNdNyYnI7aSiqb9GnT3EFAinyrilm9zau/FuzkQt9Nb4Ml7QXdk EetczWAAEJg/m+QapWwQMV0JqMideB7itP8hgjDRserKv4bhb5ad32FAu+dBavD9Yzm05DvEMzer JfQa9UAYKsgEV8p+MUJTS2Jsxpkx+IHIsDarm2U3gyy0nlbakKK22WPBaizjKzb+JrnOTbl8FYp7 CIWjverajYy2yB71RZy29b9HL7yliuqXZvH3i216cQum166j+BL4PYVgvaXSXb1cxfXFRLmyQwGi ZJgVfk+eiqgtnWPB2Pnz+d7EeiljkeJKEJfZMVbZgPGqS8l2ok9OMWikKE3RLxdi5fkNsznYwdy0 7QDk5nWIiIcthdTaotkIarTZarYidkZBdHCCngOK96nKBJLYTZxh22meX7HFA+oP+UkljMUfkLWG wPUTaYSg5fuff8pZ9ure3k2YtJj4Q8Z77zI1++1qWejV4LNLMkeJB/O7CUKUwrLD2MocedVfzsup 7zMNx7j1mmd1XaKxewe0zepMD18pWvPAXDv7RDt/l2e1zBEkKiVQ0aE0FiIR2w962eyjD/ojqy2d 24gPlDivEIs7JSKPM7dlswCooIwYj8NYKH7x10XTVw7o43BiNkcdP9it2XBBpoaNtsAhTpG+GaDF aL1VHVb2R36ZHVYVvpBF2Go97pAM3YVDJPKoeb749lJJB3mC5pj7knk60m4EXPWlFdaGOH191uXj gjQN/ScE/a1TDR3jZVUNwgbS33/OB7VPRCJBB4EtYyzWZQw3OUZvyOXN3K5jiUnAbmtqdJ5XWi6y 2EbKXFV1T5HRmNt0B8UHGcAF6mYbrMRbu5qKOy0Easx4X8UO54de5LdF5QT6N0Oj6wTd7aHtHxtG wnTdL/l7LOMu/lmay9KiyHdRAgUkwKOuTLY6l+WVJUfbEcpTWBtXIMd13QjfAnf6U/Y=
X-Report-Abuse-To: spam@se02.mfg.siteprotect.com
X-Complaints-To: abuse@se01.mfg.siteprotect.com
Message-ID-Hash: RTUPWJSF5APUXMXIGZPBC72BEO24Z6TR
X-Message-ID-Hash: RTUPWJSF5APUXMXIGZPBC72BEO24Z6TR
X-MailFrom: huitema@huitema.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [TLS] Re: Port number and ALPN of ECH client facing servers
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Ay2jKfMjoCmuV84XQij8NJP9FFo>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Owner: <mailto:tls-owner@ietf.org>
List-Post: <mailto:tls@ietf.org>
List-Subscribe: <mailto:tls-join@ietf.org>
List-Unsubscribe: <mailto:tls-leave@ietf.org>

Hello Raghu,

I understand that logic, but what if public and backend are using split 
mode? The IP addresses of public and backend are different. Using the 
backend address for the connection immediately reveals that the 
connection is directed to the backend server, even if the observable SNI 
says "public". In the split mode scenario, the expected behavior is to 
use the IP address of the public server, and let the public server relay 
the connection to the backend. that implies:

1. Get the SVCB record for `backend.example.com`.

2. Get the A (or AAAA) record of `public.example.com`

But then we cannot get the port number unless we download either the 
HTTPS or the SVCB record for `public.example.com`, and to get the SVCB 
we need to know the ALPN expected for `public.example.com`. But we 
cannot, because the "public ALPN" is not part of the ECH configuration.

-- Christian Huitema

On 6/6/2025 10:25 PM, Raghu Saxena wrote:
> Dear Christian,
>
> I'm not sure on the ALPN side, but form my understanding of ECH: the 
> `ech` param in the SVCB record contains the `public_name`, which is 
> only used as the "Public SNI" for the initial TLS connection. In your 
> example, assuming the connection was intended for 
> `backend.example.com:1337` , then two DNS lookups would be involved:
>
> - 1. Get the A (or AAAA) record of `backend.example.com`
> - 2. Get the SVCB record for `backend.example.com` (with potential 
> port-prefix mapping).
>
> From the `ech` param, the `public_name` will be used as the SNI when 
> establishing the TLS connection to the initial intended port (on 
> `backend.example.com`, i.e. 1337), and the IP address that 
> `backend.example.com` resolves to. The client does not need to worry 
> about `facing.example.com` other than setting the SNI extension.
>
> Regards,
> Raghu Saxena
>
> On 6/7/25 8:32 AM, Christian Huitema wrote:
>> I am implementing the ECH draft, and there is something a little 
>> unclear.
>>
>> Suppose a backend server "backend.example.com" implementing the 
>> application protocol "example" (i.e., not H3). Before connecting, the 
>> client looks up the corresponding SVCB record, and finds an ECH 
>> parameter stating that the public server is "facing.example.com". How 
>> exactly is the client going to find the ALPN used to connect to 
>> "facing.example.com"? What about the port number?
>>
>> Yes, the client could do a DNS lookup to find details about 
>> "facing.example.com", but should that request be for the SVCB record 
>> corresponding to the "example" service, or for the HTTPS record 
>> corresponding to H3?
>>
>> Obviously, the practical answer is "connect to `facing.example.com` 
>> port number to 443 setting the outer ALPN to H3." But is that the 
>> right answer?
>>
>> -- Christian Huitema
>>
>> _______________________________________________
>> TLS mailing list -- tls@ietf.org
>> To unsubscribe send an email to tls-leave@ietf.org
>
> _______________________________________________
> TLS mailing list -- tls@ietf.org
> To unsubscribe send an email to tls-leave@ietf.org