[TLS] Idempotency and the application developer

Watson Ladd <watsonbladd@gmail.com> Thu, 04 May 2017 23:35 UTC

Return-Path: <watsonbladd@gmail.com>
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 18BC012773A for <tls@ietfa.amsl.com>; Thu, 4 May 2017 16:35:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.7
X-Spam-Level:
X-Spam-Status: No, score=0.7 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham 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 GItH9FkInS1P for <tls@ietfa.amsl.com>; Thu, 4 May 2017 16:35:11 -0700 (PDT)
Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (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 1C97F1243F3 for <tls@ietf.org>; Thu, 4 May 2017 16:35:11 -0700 (PDT)
Received: by mail-pf0-x231.google.com with SMTP id q66so14429465pfi.3 for <tls@ietf.org>; Thu, 04 May 2017 16:35:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ZLasDnwYenOSYAtFB2XZPQK+sw5+aDgng9daztE6M9A=; b=lYWvR6GFDRC5eMIOElYzib1paS7X0NLrgTO++apvGoauYpvvgwUis5UrDI4H0YTvZF 0EXmphoLcCEfWNQJurqRTdtyKmd3eag+z3WyPyVyi4w42ha3HqQ8+CBr+ijUjdALXEKW aRzolRyQK7ISmOZlZcZiXVd8B2t0q0oV9lLddrBTo2h05zMhd1tFgyz/3I81W9FyqFXP KIEw7YeYCuGVI1JjAevREGsHYAVNvfICTO7CDwKh+It0uhpj/PsYPNjC8D7orZBqMa6q EhZx2HDJlSlCKgFfZtjtBamHEb/dGL2WutcUwEYw4oqo49iZI9AwpQRbav8Q4VajUBEe e0AA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZLasDnwYenOSYAtFB2XZPQK+sw5+aDgng9daztE6M9A=; b=Uxu0qw1ikvYXg/D2dQG6OoalGm0o7ILc/lcKWb36WvOmHXRUw6wvCjTja/yCo8FcVs ASuIO2J6Zf3cWA/Rp3oUQ/HipN9hAOkiWbr2VJMYJcx3ZdcCfo77j4nEkj6NyfYYfZsK Nv2ucar99B+TrNuCaJYWvwgmSQe73QLDxqMJg7dMR1Yje5h9hUs0YgNutWhlKnGyiHTn TT24cGpiUjLhqvww4QYnmeABdHE89TzXIB+i0krs3lVqmfQ4Q+yJr4GVOf9qABwT6JiA ZvNTCMlzDhme87NwRbE5kxPTyFsXHGgrTNkUy/yJyefnxGH6d17hhwLkBrYniXBCNPNM 4rSA==
X-Gm-Message-State: AN3rC/63RjtZdAJ8Lewql6GOTFItfHBna/GrAVissc3K3fBC2f0fjoCW 5XOaq63GfJ2lkAECBPAmCn2Obn2SEfUD
X-Received: by 10.84.236.70 with SMTP id h6mr61070240pln.145.1493940910571; Thu, 04 May 2017 16:35:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.163.12 with HTTP; Thu, 4 May 2017 16:35:10 -0700 (PDT)
From: Watson Ladd <watsonbladd@gmail.com>
Date: Thu, 04 May 2017 16:35:10 -0700
Message-ID: <CACsn0ckPOU+mSCZdBycYKvAN=rLuVHnbsFNSOqZiN8oK_nJVBw@mail.gmail.com>
To: "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/Fzyuc_DaB62tefuBwi3UK840oqw>
Subject: [TLS] Idempotency and the application developer
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 04 May 2017 23:35:12 -0000

Dear all,

Applications have always had to deal with the occasional replay,
whether from an impatient user or a broken connection at exactly the
wrong time. But they've generally been rare, so human-in-the-loop
responses work. Order the same book twice? Just return one of them,
and if you get an overdraft fee, ouch, we're sorry, but nothing we can
do.

0-RTT is opt-in per protocol, and what we think of per application.
But it isn't opt-in for web application developers. Once browsers and
servers start shipping, 0-RTT will turn on by accident or deliberately
at various places in the stack.

At the same time idempotency patterns using unique IDs might require
nonidempotent backend requests. But this is an easier problem than if
we had nonidempotent brower requests: backends are much more
controlled.

If you are willing to buffer 0-RTT until completion before going to
the thing that makes the response, you can handle this problem for the
responsemaker. This will work for most applications I can think of,
and you need to handle large, drawn out requests anyway. This sounds
like it would work as a solution, but I am sure there are details I
haven't discovered yet.

In conclusion I think there is some thought that needs to go into
handling 0-RTT on the web, but it is manageable. I don't know about
other protocols, but they don't have the same kinds of problem as the
web does with lots of request passing around. Given the benefits here,
I think people will really want 0-RTT, and we are going to have to
figure out how to live with it.

Sincerely,
Watson Ladd