Re: Alternative ways to keeps ODCID on the server

Marten Seemann <martenseemann@gmail.com> Tue, 28 January 2020 03:11 UTC

Return-Path: <martenseemann@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4DA4A3A0B6D for <quic@ietfa.amsl.com>; Mon, 27 Jan 2020 19:11:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 I_Xo3rgN6a0s for <quic@ietfa.amsl.com>; Mon, 27 Jan 2020 19:11:40 -0800 (PST)
Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (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 23AB43A0B6B for <quic@ietf.org>; Mon, 27 Jan 2020 19:11:40 -0800 (PST)
Received: by mail-lj1-x244.google.com with SMTP id x7so13097402ljc.1 for <quic@ietf.org>; Mon, 27 Jan 2020 19:11:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w2t1J4g8/qDLvhrNmt6XLJGd9WvKRMyUydRaXc9f2bM=; b=iYXB0EHxhOcObcNdsDq34dx9/Ru+Wlq99LJJ4TXRZZ4na6bygZTXqZwGtaVrn0uu6V vOYA6nBUG7CG9us0XMhKsXkd3flUXCfXTtFKjGitnctAbMVk8kpCIT8nVd7E44SQihRV wnh3zBDRpsGz/GB7qWYVDMxFWjvcudzk2cHZ7Z20k9rkmcoa7fSsXgGGqOeuB2c+0X5d GPKvIARWOrm9Mh8I0XKlGKxpoopsvcZb93uxNn8/2F7lcOKzo5hSbHrUCULlJ80xlc71 5+uVBUoEsZjqtN6u2wAIBURrE4cdCCRbpjAdCKHYqUozppbThUbjCxIuQ2yXnwtk5OGu 8k6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w2t1J4g8/qDLvhrNmt6XLJGd9WvKRMyUydRaXc9f2bM=; b=b+v4eEbzvTEcFhoi7iN/NVps0uP+G5uUCNfm4FQC3SrCvwhBSj9Xlyl1H3WP0HU1Xh dvkQ1y4Dx/aMopHD5Lm3raEMmONgtFfcHh3GwTusjzYDqePZmeON+033JBMmER5G/5u+ BYXjNCYJF1DgjKyZYApDBlKZwoy87Ca+mKCXwIbUNQD1Nc49LrqnEuvi/NJOcnizac3X 9Zhkk5yWBGjVwaZv8uI2JwKgMoE7QxUQOFYqy2vT6QhE0JfmGo+u+hXVGhBCvqw1u9Uj A9eJJK05nXjyhob2K4SqCm9JT+cQB06UdQqoO+JaUBLkYreZ1AE0iGHNG0nvu48oxlTe vc9g==
X-Gm-Message-State: APjAAAXcZutOiifEUbcE53i0V9c9yLg5mfqryArSQFXRjrcKj4MQqAfQ C8qIOwZ7Men2OHTtwk6f9uEQys5G+twXJYqhShg=
X-Google-Smtp-Source: APXvYqxh3CSAZyL6naJjH9XxAiG2ik4rg7rtP578MsiLtmTh5wHeaKz+nFJxcQDdlH5O67NNx6UqFzhaRId05ZIMVoc=
X-Received: by 2002:a2e:9587:: with SMTP id w7mr11730272ljh.42.1580181097947; Mon, 27 Jan 2020 19:11:37 -0800 (PST)
MIME-Version: 1.0
References: <20200124222434.GA8279@ubuntu-dmitri> <7b228c14-c0d3-6458-77ab-945e713ef429@huitema.net> <CAOYVs2qhPBtbjrVEXE+oMXWUWRBqhzDfZsiOatRW5Zd67e1sWg@mail.gmail.com> <ee0f625b-b260-9e3d-12b6-80291fc110eb@huitema.net> <CAKcm_gNKu5b__cjy5212pWN=PKwdZKX23rXHs423-u8hZMjr+w@mail.gmail.com> <20200125135411.GA19655@ubuntu-dmitri> <CANatvzyTHXog=46wwpmVshkYcY0YFGdvWXj0dGjKVUj0dXa7pA@mail.gmail.com> <f25d2034-0938-f716-c356-5873eeb58cda@huitema.net>
In-Reply-To: <f25d2034-0938-f716-c356-5873eeb58cda@huitema.net>
From: Marten Seemann <martenseemann@gmail.com>
Date: Tue, 28 Jan 2020 10:11:26 +0700
Message-ID: <CAOYVs2pvLxvQFkwYY6FuT5wQ_OWjjvhSBoMpyrOn9Gh-qNiyQw@mail.gmail.com>
Subject: Re: Alternative ways to keeps ODCID on the server
To: Christian Huitema <huitema@huitema.net>
Cc: Kazuho Oku <kazuhooku@gmail.com>, Ian Swett <ianswett=40google.com@dmarc.ietf.org>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000062cfa059d2a9509"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/c3mjXaJQ1qWvhszITBaTZlLPmRk>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Jan 2020 03:11:42 -0000

> That's actually what I implemented. If the token can be verified, accept
> the connection, treat it as validated. If it cannot be verified, check
> whether the token is necessary, e.g., would any incoming connection
> trigger retry. If it is necessary, drop the connection; if not
> necessary, continue as if no token was there.

Doesn't that defeat the purpose of the original_connection_id transport
parameter? We introduced it to prevent middleboxes from performing a Retry.
With this logic, a middlebox could perform a Retry, and then corrupt the
token on the second Initial to trick the server into accepting the
connection.
Furthermore, client implementation will check for the
original_connection_id TP, and fail the connection if this TP is missing.

The spec also has language that I'd interpret as forbidding this:
If the server sends a Retry packet, it MUST include the Destination
Connection ID field from the client's first Initial packet in the transport
parameter.




On Tue, Jan 28, 2020 at 7:10 AM Christian Huitema <huitema@huitema.net>
wrote:

> On 1/27/2020 2:39 PM, Kazuho Oku wrote:
>
> > I am not sure if I agree with dropping the sentence.
> >
> > IIRC, this sentence (i.e. "server MAY proceed with the connection
> > without verifying the token, though the server MUST NOT consider the
> > client address validated.") suggests that a server might proceed the
> > handshake as if it did not receive the token when that token cannot be
> > used.
> >
> > I think that is not an unreasonable thing to do along with the other
> > two stated option (i.e. discard packet, send CONNECTION_CLOSE without
> > creating state).
>
> That's actually what I implemented. If the token can be verified, accept
> the connection, treat it as validated. If it cannot be verified, check
> whether the token is necessary, e.g., would any incoming connection
> trigger retry. If it is necessary, drop the connection; if not
> necessary, continue as if no token was there.
>
> -- Christian huitema
>
>