Re: [Unbearable] 0-RTT Token Binding: When to switch exporters?

Eric Rescorla <ekr@rtfm.com> Mon, 20 March 2017 16:57 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: unbearable@ietfa.amsl.com
Delivered-To: unbearable@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C92951314DB for <unbearable@ietfa.amsl.com>; Mon, 20 Mar 2017 09:57:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-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 QfDP3P3b6cUp for <unbearable@ietfa.amsl.com>; Mon, 20 Mar 2017 09:57:09 -0700 (PDT)
Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (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 675991314E2 for <unbearable@ietf.org>; Mon, 20 Mar 2017 09:57:06 -0700 (PDT)
Received: by mail-yw0-x230.google.com with SMTP id v198so93910300ywc.2 for <unbearable@ietf.org>; Mon, 20 Mar 2017 09:57:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aStwNlCGPJgp7XA6leSneBo8QhCqFiD6rwsAxVho/xA=; b=Nvw9Uh8/qmeIiq7jFMHt4J8ekDRxCbpOFRqhvjrogipv6F/j7q5fPoeeJmL85nkjA+ v3Zuv/aTDbdJYAR0CgHIU1QlCdWDyTsj1b9tLOVQmHwMrDrHLDwLyHuLIDMhyGjUOXwh ccC5xyXCz2gckp2sepWMHS6tqCb6THIRgLpQ/S81jwYDyZy0IaekkfKYpJbY3f8hCKR4 xPjSlgmEnf+WZBvItgxZgNbZ0EA9uo1zXS61VWzlQjr59UtzbQGFmFdR8gAJbPZdBZog 7JNaZkAZFe15zFIYlKnJh3NWExW8DRnYfkq9N5qLKkdgkoXAZbo81Z0Aota0z0kpZnm5 f0rg==
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=aStwNlCGPJgp7XA6leSneBo8QhCqFiD6rwsAxVho/xA=; b=ONrbetYl2jMfUMj43jE9sbNYMtBYntAylpHL7mbnEM6noacYH5picmuSCuizrlRYl9 O2KokoFnoE6tohejUnu4kMocEH9UgQSVWj+PUZZSUYcUwDqCgczOy0Szt/R3jf3Vlj40 t52dNRxhHzOVYAEKdHmZwaINVaEJSqvnv4zlFBJRuvsnA7tytS8uLysMeyC2mKCe3LCz WLD+sd5nSRX6Jcur/1MZDK5GWil/CvngmYr12G7koXUTrz1+N6aAeFSoW+8advzrKCgi AV3AhPwwfRhNe5fivXcvQkNsbZhENeIyaJsdJTrWj8sCvfaTxK8DGm+eqzopy93Pzoz4 mjYg==
X-Gm-Message-State: AFeK/H2WP6p/ypnJN58B4x+un4Kf9xVONIOV0n6DliXwMSKJlz0hdd0sFfxAAnmc7BYmtJ9MA5DqkgFsw5Imtw==
X-Received: by 10.13.250.67 with SMTP id k64mr15529578ywf.125.1490029025452; Mon, 20 Mar 2017 09:57:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Mon, 20 Mar 2017 09:56:24 -0700 (PDT)
In-Reply-To: <CACdeXiL6riBRb1-UDhVK-R5CvopzisJnYTRjWsvpimWA2G3DhQ@mail.gmail.com>
References: <CACdeXiK2Hs=Kz_5OFryWR+9_t6nDL_p7NKjw=CwRsua_E5S9Mw@mail.gmail.com> <DM2PR0301MB084793F58146F8574BF36EE18C780@DM2PR0301MB0847.namprd03.prod.outlook.com> <CACdeXiJGcsTxrSWmd5BZrfoWTHhFF3+RisQFD628iYNMzZakhQ@mail.gmail.com> <CACdeXiJFe7-jM9qEnNB+Wp3joGxF_X1z+-dPywb9SRZuSNmAzQ@mail.gmail.com> <DM2PR21MB0091E3F087E1AECA3A63A3788C560@DM2PR21MB0091.namprd21.prod.outlook.com> <CACdeXi+YjLaXtoX47LtVK4Ay2y-mCOOraV46gbbbuQPL40ngXg@mail.gmail.com> <DM2PR21MB00910C83983BEE885B0E04288C560@DM2PR21MB0091.namprd21.prod.outlook.com> <CACdeXiLON5OAjfFCNsenCeaGV3a_LDoi17VAk=fSzF0YA5=f7Q@mail.gmail.com> <CACdeXiLNCrPSz0_hZSpQ6tsoHB7ryJ2dCnHjUYwu5vu5fO4XBg@mail.gmail.com> <SN1PR21MB0096D7426A4E230E284F0D058C560@SN1PR21MB0096.namprd21.prod.outlook.com> <CACdeXiKuzNh0fP9b-jEF82m-6mX+i04To96GMa_tFNcuznGn+A@mail.gmail.com> <DM2PR21MB00914BA07BA984E931B88FEB8C290@DM2PR21MB0091.namprd21.prod.outlook.com> <CACdeXiKQjaoAArLBcjRj+kUJUqH+f1bA5yeCCiQ6GMXzWJURBw@mail.gmail.com> <CABkgnnV0+vumfkZAMRZ_8q5pTkwf_CqhZ+deeVWdbF9SFaHoJw@mail.gmail.com> <DM2PR21MB0091DE5B213D2363FAF353CF8C280@DM2PR21MB0091.namprd21.prod.outlook.com> <CACdeXiKweRaZEKi4kqmPfUc2JLyZLGbp8tFRpkTfmJisPCMWRg@mail.gmail.com> <CACdeXiL6riBRb1-UDhVK-R5CvopzisJnYTRjWsvpimWA2G3DhQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 20 Mar 2017 09:56:24 -0700
Message-ID: <CABcZeBN2RhBsyj8_1F6bBnw9j10qdABwdZVdgwVcUr4Tf6sLtA@mail.gmail.com>
To: Nick Harper <nharper@google.com>
Cc: Andrei Popov <Andrei.Popov@microsoft.com>, IETF Tokbind WG <unbearable@ietf.org>, Martin Thomson <martin.thomson@gmail.com>
Content-Type: multipart/alternative; boundary="94eb2c07f34ac4e206054b2c6ab5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/unbearable/BRkFo_DsXup3x3w0t6xka1_7g4c>
Subject: Re: [Unbearable] 0-RTT Token Binding: When to switch exporters?
X-BeenThere: unbearable@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "\"This list is for discussion of proposals for doing better than bearer tokens \(e.g. HTTP cookies, OAuth tokens etc.\) for web applications. The specific goal is chartering a WG focused on preventing security token export and replay attacks.\"" <unbearable.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/unbearable>, <mailto:unbearable-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/unbearable/>
List-Post: <mailto:unbearable@ietf.org>
List-Help: <mailto:unbearable-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/unbearable>, <mailto:unbearable-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Mar 2017 16:57:12 -0000

I'm not quite sure I understand the reasoning here, so let me try to walk
through it.

The HTTP stack tells the TLS stack to initiate a connection and starts
streaming
requests down to the TLS stack. At this point, it can only use the 0-RTT
exporter,
so it has to do that. At some point in this process, the client receives
the 1-RTT
Finished and can then switch to the 1-RTT exporter, but the serves has no
way
of knowing at which point that is.

In the current rule, the client MUST switch when it sees app data from the
server,
so if the server receives a HTTP request from the client that is
semantically
dependent on some HTTP response from the server, then it knows that the
client should have switched at this point. However, ISTM that SFIN must
have appeared prior to the any such application layer message, so requiring
the client to switch on SFIN would make the switch happen slightly earlier
and give the server the same guarantees. What's the argument for not
requiring
that instead, given that it's tied to the state of the TLS stack rather
than the
HTTP stack.

-Ekr


On Fri, Mar 10, 2017 at 12:11 PM, Nick Harper <nharper@google.com> wrote:

> I'd like to update the I-D to address the concern of which exporter to
> use when. I know that this update will not address the recent concern
> around proof of possession of the TB key in 0-RTT, and we can discuss
> that concern at IETF 98 in Chicago. Below is an outline of how I plan
> to handle changing exporters. Does it sound reasonable to update the
> I-D now, even with the open concern around proof of possession?
>
> Outline for changing exporters:
> In early data, the client uses the early exporter.
> Upon receiving an application-layer response from the server, the
> client switches to the regular exporter. (The client may have some
> requests that were sent after the TLS handshake completed but still
> using the early exporter.)
> The above switch allows a server to on a per-request basis decide that
> the signature of the early exporter was not sufficient and have the
> client re-send the request with the regular exporter. In http, this
> can be done by the server responding with a 307 redirecting to the
> same resource (optionally with an additional query param indicating
> that said redirect happened).
>
> In the TokenBinding struct for any Token Binding whose signature is of
> the early exporter, the client includes an Extension with
> ExtensionType early_exporter(TBD) and 0-length extension_data to
> indicate that the server should verify the signature using the early
> exporter instead of the normal exporter.
>
> On Wed, Mar 1, 2017 at 5:36 PM, Nick Harper <nharper@google.com> wrote:
> >> -----Original Message-----
> >> From: Martin Thomson [mailto:martin.thomson@gmail.com]
> >> Sent: Wednesday, March 1, 2017 4:53 PM
> >> To: Nick Harper <nharper@google.com>
> >> Cc: Andrei Popov <Andrei.Popov@microsoft.com>; IETF Tokbind WG <
> unbearable@ietf.org>
> >> Subject: Re: [Unbearable] 0-RTT Token Binding: When to switch exporters?
> >>
> >> Would it help to include a clear signal about which keys are intended
> to be exported and used?
> >
> > Yes, I plan to include some sort of signal so that the server doesn't
> > have to do trial verification. This could be defining a new set of key
> > types that when used in a TokenBinding struct indicate the signature
> > is over the early exporter, or it could be an indicator extension in
> > the TokenBinding struct (or maybe something else). The former has the
> > benefit that it is covered by the signature (unless the signature
> > format changes).
> >
> >
> > On Wed, Mar 1, 2017 at 4:54 PM, Andrei Popov <Andrei.Popov@microsoft.com>
> wrote:
> >> This solution introduces a lot of complexity, but does not address the
> fundamental problem, which is that the client can't prove possession of the
> TB key in 0-RTT. So, if I have a site that requires strong protection of
> tokens with TB, I would disable 0-RTT application data, or at least reject
> requests that arrive in 0-RTT and require bound tokens to be authorized.
> >
> > The signature over the early exporter proves that the client had
> > possession of the TB key sometime after the server issued the
> > NewSessionTicket used for starting the 0-RTT connection. Whether this
> > is good enough depends on the threat model of the server. Obviously a
> > server that is paranoid can choose to reject 0-RTT data if Token
> > Binding is also negotiated on the connection, and I'm fine with that.
> > However, a server may decide that it is not concerned with client
> > malware stealing a NewSessionTicket (and corresponding data to replay
> > a 0-RTT TokenBindingMessage), and find this proof of possession good
> > enough.
> >
> > 0-RTT data has different security properties than 0.5-RTT or
> > post-handshake application data in TLS 1.3, so it's reasonable for a
> > TokenBindingMessage sent in 0-RTT application data to have different
> > security properties.
>
> _______________________________________________
> Unbearable mailing list
> Unbearable@ietf.org
> https://www.ietf.org/mailman/listinfo/unbearable
>