Re: Alternative ways to keeps ODCID on the server

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Tue, 28 January 2020 13:19 UTC

Return-Path: <dtikhonov@litespeedtech.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 85A13120077 for <quic@ietfa.amsl.com>; Tue, 28 Jan 2020 05:19:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-com.20150623.gappssmtp.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 jcWFJakWWKvo for <quic@ietfa.amsl.com>; Tue, 28 Jan 2020 05:19:11 -0800 (PST)
Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 92F1C120071 for <quic@ietf.org>; Tue, 28 Jan 2020 05:19:11 -0800 (PST)
Received: by mail-qv1-xf33.google.com with SMTP id y8so6193062qvk.6 for <quic@ietf.org>; Tue, 28 Jan 2020 05:19:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jN2pBW1NNQI8+JyhI9gCGrAA3/swwmgNHX8imoG9ufU=; b=jd6G8sX23wUWDSOOv6sL3hp4+6gIfx9cb4DBiROPf6/IgFQwBaTe4SHDZSJe65/oyO y9oDni1LonAieE2OgKAhnfUxDcJUPTx5UiwF8oOxw5peA6ns3XjRLV7ILcahM6684ZrZ LdD4ElYRYWpwLLFp0wBzIzllSD6n9E3fNx5/0KQUQPhIu7Rs5fXdC2d2Z3mJg7ellxoj s5Rt1qzpaY72YoBezJ1PiMlkMoorkxs95EYQsvc5v1t3qF4wE+A5geLFfdVQ0ej20/ys nJ2dtCjgURGHjW1tGfe+o7SUbK2Ok3qZOKAzlQX8hLqSfPfeDHH4FqUTXGqSADK38BI7 gfyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=jN2pBW1NNQI8+JyhI9gCGrAA3/swwmgNHX8imoG9ufU=; b=r6oV91SsMlwS/GTT2TRQ/rMNVFb6oTYQEX8gaXMuUyxabKZ71bbow+nJXBAYj2pU5P 0voiYSQ9kuDhzaTujzZsXLwAdJ9jFmN+emhHDMHfmaMQbNlzvF8M8iGJ7uKSI4sMWDr6 AIN17WiMOBST0Cgv/iZJNzYLadlbbWkdNhwRKE3JRawUBn1pFu1xxrEiA/Z2EwAqlyIJ 3mmdMb55lRb/Xb6o5yRJLtiGNwDkBea57PEaVVSxaiQM+TArZB3SO+Sbhx+SDjioPodM 9NgOhJIuEJQ8oS+YHjLb5bGjqlang5IUxNnx7C2fZT5mb98fba8sTlzuMILmdbcxVBeA kX0g==
X-Gm-Message-State: APjAAAXcG0JPbbtGwTqnqMTyyQLMpqgQMLNBTOZlQAOqoWfGUgbeN36L cvTFcXpROby1e3kzD0sVWjFIBA==
X-Google-Smtp-Source: APXvYqza0U1igLFyu164e0t5Kvje4GjlDdktgp+7lhvq8CiRmw9A7J3oJEucFoxAsvodGC7Bqt0H4g==
X-Received: by 2002:a0c:e2d1:: with SMTP id t17mr22384961qvl.25.1580217550458; Tue, 28 Jan 2020 05:19:10 -0800 (PST)
Received: from ubuntu-dmitri (ool-2f1636b6.static.optonline.net. [47.22.54.182]) by smtp.gmail.com with ESMTPSA id w2sm8311125qtd.97.2020.01.28.05.19.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jan 2020 05:19:09 -0800 (PST)
Date: Tue, 28 Jan 2020 08:19:05 -0500
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: Kazuho Oku <kazuhooku@gmail.com>
Cc: Ian Swett <ianswett=40google.com@dmarc.ietf.org>, Christian Huitema <huitema@huitema.net>, Marten Seemann <martenseemann@gmail.com>, IETF QUIC WG <quic@ietf.org>
Subject: Re: Alternative ways to keeps ODCID on the server
Message-ID: <20200128131904.GA12466@ubuntu-dmitri>
Mail-Followup-To: Kazuho Oku <kazuhooku@gmail.com>, Ian Swett <ianswett=40google.com@dmarc.ietf.org>, Christian Huitema <huitema@huitema.net>, Marten Seemann <martenseemann@gmail.com>, IETF QUIC WG <quic@ietf.org>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CANatvzyTHXog=46wwpmVshkYcY0YFGdvWXj0dGjKVUj0dXa7pA@mail.gmail.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/nWNhaRusZmK47r42W4mQGdTERGc>
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 13:19:15 -0000

The server cannot pretend as if the Retry token weren't there,
because the client knows that it sent the Retry token and will
verify the subsequent Initial packet from the server according
to rules in Section 17.2.5 [1]:

   If the client received and processed a Retry packet, it MUST validate
   that the original_connection_id transport parameter is present and
   correct; otherwise, it MUST validate that the transport parameter is
   absent.  A client MUST treat a failed validation as a connection
   error of type TRANSPORT_PARAMETER_ERROR.

A conformant client will fail the connection.

  - Dmitri.

1. https://tools.ietf.org/html/draft-ietf-quic-transport-25#section-17.2.5

On Tue, Jan 28, 2020 at 07:39:48AM +0900, 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).
> 
> Maybe changing "verifying the token" to "as if there was no token being
> attached" would clarify things?
> 
> 2020年1月27日(月) 22:15 Dmitri Tikhonov <dtikhonov@litespeedtech.com>:
> 
> > After considering this for a few days, I now think that the "server
> > MAY proceed" part should be removed from the draft.  This is because
> > it is impossible to get ODCID from an invalid Retry token.  There is
> > no other way reliably to associate an incoming packet with a previous
> > packet (if the server were willing to stored ODCIDs in memory
> > somewhere).
> >
> > Specifying that the server MAY proceed only makes the issue more
> > confusing.
> >
> >   - Dmitri.
> >
> > On Sat, Jan 25, 2020 at 04:36:51PM -0500, Ian Swett wrote:
> > > This is a bit of an edge case, so spelling out what's required to proceed
> > > seems reasonable to me.
> > >
> > > On Sat, Jan 25, 2020 at 12:11 AM Christian Huitema <huitema@huitema.net>
> > > wrote:
> > >
> > > >
> > > > On 1/24/2020 8:41 PM, Marten Seemann wrote:
> > > >
> > > > Then it's not a *Retry* token, then it's a NEW_TOKEN token.
> > > > It's a kind of subtle distinction (as I noted in
> > > > https://github.com/quicwg/base-drafts/pull/3107#discussion_r349859380
> > ).
> > > >
> > > >
> > > > I understand that they are different. But look at the text in draft-25:
> > > >
> > > >    If a server receives a client Initial that can be unprotected but
> > > >    contains an invalid Retry token, it knows the client will not accept
> > > >    another Retry token.  The server can discard such a packet and allow
> > > >    the client to time out to detect handshake failure, but that could
> > > >    impose a significant latency penalty on the client.  A server MAY
> > > >    proceed with the connection without verifying the token, though the
> > > >    server MUST NOT consider the client address validated.  If a server
> > > >    chooses not to proceed with the handshake, it SHOULD immediately
> > > >    close (Section 10.3 <
> > https://tools.ietf.org/html/draft-ietf-quic-transport-25#section-10.3>)
> > the connection with an INVALID_TOKEN error.
> > > >    Note that a server has not established any state for the connection
> > > >    at this point and so does not enter the closing period.
> > > >
> > > > Invalid is invalid. An invalid token is something that the server
> > cannot parse.
> > > > The server does not know whether the client got the token from a retry
> > packet
> > > > or a new token frame, or just made it up with random bytes.
> > > >
> > > > -- Christian Huitema
> > > >
> > > >
> >
> >
> 
> -- 
> Kazuho Oku