Re: Issue #356: Form-encode Expect-CT report bodies?

Emily Stark <estark@google.com> Sat, 10 June 2017 16:33 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AE953124BFA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 10 Jun 2017 09:33:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.501
X-Spam-Level:
X-Spam-Status: No, score=-6.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 KBmDqKW4-oBq for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 10 Jun 2017 09:33:37 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (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 61C831200E5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 10 Jun 2017 09:33:37 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.84_2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1dJjH7-0003jG-Cw for ietf-http-wg-dist@listhub.w3.org; Sat, 10 Jun 2017 16:30:09 +0000
Resent-Date: Sat, 10 Jun 2017 16:30:09 +0000
Resent-Message-Id: <E1dJjH7-0003jG-Cw@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <estark@google.com>) id 1dJjGx-0000As-7Y for ietf-http-wg@listhub.w3.org; Sat, 10 Jun 2017 16:29:59 +0000
Received: from mail-oi0-f42.google.com ([209.85.218.42]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <estark@google.com>) id 1dJjGq-00036m-HK for ietf-http-wg@w3.org; Sat, 10 Jun 2017 16:29:54 +0000
Received: by mail-oi0-f42.google.com with SMTP id o65so40352458oif.1 for <ietf-http-wg@w3.org>; Sat, 10 Jun 2017 09:29:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ye7pA6vMk9W+BfMvech4l9Icz6vu5UZXtwg/onEAk58=; b=M17OHA55QVDtIlHeS1OwOL8nC8YOFCL4vr+fKZNJYzmD5fnB72gLL2TACTFb0s9w/y b32kyPPTqczmzBw4J73pmRowKNFGgw7h4y0t4JLVMdP3SwBdTwOCfdFBmkRQmQTECT3X +iHPCirlwhLIFDnY92vLguvMLhPEtVOR61ZgAGZHAsnA4F9mf59VtsVNvxrzs74XAGOJ 4i2fb4bUJrGzgeCWjzNTSIta2qOgXkihrpGHfCi0vPNdHkRARpMaQCWbD15NhrfNVMq8 Jg6dH6wvhUOPQ2cFrQOswEgp+HpGgamdSDGJJh9cLbdK11cfpvicITMBfvf6Vhk97LT9 5pvg==
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=ye7pA6vMk9W+BfMvech4l9Icz6vu5UZXtwg/onEAk58=; b=KZYf0hRG+iD5lr5Kvn1bKTOnwV8nUh0O0tTUS/JwmfsiBClxg1kqYI7XtmEQoMygLi HKGDoxiKGTx/k/Bq3rrBPLe1e5vx/oGJh1eY6ZxWAQhar80gM0OHZCCy+l4oZBTeGklo trLwceaq7JJ+tp/PIv8yov808Vbw3oAFUYsioQl8YOeBsjT8bXKzPc0XPNypYzJuYmC6 lVeySZ2Eor6YdZEV81I6i4J324RIPBQrknn5BmmSYN2xGfAA1t6R1InssXbB+nk7n31t 0r/ukvCmprtCjIIST/XgwI15/4GDssTNxeTnpUEF8EG4R8U3Rws8cVuXGKlecNZeL1QQ DNKA==
X-Gm-Message-State: AODbwcBcJfc6rxycjtgkAxrbIbf4koXDagaFqA/fO3vHR9Rh7G5rPDBb 7KzrtmciEEdDO4gcD+MsASTiF6u9TeAupVo=
X-Received: by 10.202.87.130 with SMTP id l124mr11089291oib.131.1497112165979; Sat, 10 Jun 2017 09:29:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.202.66.86 with HTTP; Sat, 10 Jun 2017 09:29:05 -0700 (PDT)
In-Reply-To: <CABkgnnVBNHUoSHud88PJGNziA3BMRU7Sd5jhkqVtKfdrGxJHZQ@mail.gmail.com>
References: <CAPP_2Sa+6eSAChgp8KrzabPJUkMmiKBhWp1dFhS0zOVnXrenLw@mail.gmail.com> <CAOdDvNoStrOu=SSZJrKMsQFjG2YVtiLqMdvXP_1PKJ_a+58Mfw@mail.gmail.com> <CABkgnnUVYB1Dqh4efe25bKx=-2iOBXHZg=3fgXjvbRn28b6nuw@mail.gmail.com> <CAOdDvNqquZymrmE3i3DFfdgVUuq-iWxr0+jvO3AF0NymnJK9Zg@mail.gmail.com> <CAPP_2SYNkReoDOjRKdEWtrP=ZGhPO2mKCoQm9Pm7LjcNLyoC+Q@mail.gmail.com> <CAPP_2SYLpKBo-rWV4oMG7V3FeN4aZ7fZEOdFgwFC8ASmFKmvqA@mail.gmail.com> <CABkgnnWU09-kV8gAu6xZV7n-rvrmL6R98EzA7O7nxTjBMFntpQ@mail.gmail.com> <CAPP_2Sa7b3XTgFE0VcF7-ffxYMOuhR8vHTROL88RDus4foP8CA@mail.gmail.com> <CABkgnnU-c4FbBNGz4V-jpO-Rwc5Evy7DFzmBdsT0xkZFv+Drxg@mail.gmail.com> <CAPP_2SY8h-ymtTubY0GMLqWctP4MXXu9nSiUU228gJ5drzZZQg@mail.gmail.com> <CABkgnnXEUdZ9M=911wGcNVqL+=qpwfvnE+3rNu1g3ApepyCKFA@mail.gmail.com> <CAPP_2SYJGXqLOh_E56Aou5RgO2mLNzUYWVZHmwu9_vN2MsV9XA@mail.gmail.com> <CABkgnnVBNHUoSHud88PJGNziA3BMRU7Sd5jhkqVtKfdrGxJHZQ@mail.gmail.com>
From: Emily Stark <estark@google.com>
Date: Sat, 10 Jun 2017 09:29:05 -0700
Message-ID: <CAPP_2SaK=1JO8Oz=k=LuSLBVqGQ2ZUZ1JYufF_N7YJaNhk=iuA@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Patrick McManus <mcmanus@ducksong.com>, httpbis <ietf-http-wg@w3.org>, Anne van Kesteren <annevk@annevk.nl>
Content-Type: multipart/alternative; boundary="001a113d360ed7d95505519d96ac"
Received-SPF: pass client-ip=209.85.218.42; envelope-from=estark@google.com; helo=mail-oi0-f42.google.com
X-W3C-Hub-Spam-Status: No, score=-4.9
X-W3C-Hub-Spam-Report: AWL=1.117, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1dJjGq-00036m-HK 44d3a4599fb01423d0d0801e2136d5ec
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Issue #356: Form-encode Expect-CT report bodies?
Archived-At: <http://www.w3.org/mid/CAPP_2SaK=1JO8Oz=k=LuSLBVqGQ2ZUZ1JYufF_N7YJaNhk=iuA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33979
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Sat, Jun 10, 2017 at 1:55 AM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> For those who are reading this and eating popcorn, this is probably
> worth reading also... <https://github.com/whatwg/fetch/issues/530>
>
> On 9 June 2017 at 16:42, Emily Stark <estark@google.com> wrote:
> > As I said in my first message, implementing true preflights would violate
> > very core architectural principles in Chrome, and would jeopardize our
> > ability to ship an implementation. Maybe there are other implementors who
> > would like to chime in to the contrary, but as of now I'm not very
> inclined
> > to specify something that can't realistically be implemented.
>
> I wanted to poke at that a little.  Expect-CT is a header field, sent
> by a particular origin.  You store the tuple of origin, the expect CT
> mode (none, report, require), and the report URI somewhere.  Then when
> you connect to an origin you retrieve any stored tuple and compare
> what you get with what you expect.  I don't see how a stack would be
> unable to preflight at that point.  It has the information it needs
> for a preflight check.
>

What's missing is the origin that triggered the request: in Fetch language,
the request's client's origin, which populates the `Origin` header. Hence
the suggestion for a preflight with a null Origin header and
Access-Control-Allow-Origin: *. Which would be possible, and I think safe,
but a bit hacky. Probably not more hacky than any of the other solutions
under discussion, though. :)

Having the request's client's origin available at connection setup time
would require quite some gymnastics/re-design of the Chrome network stack,
which late-binds sockets and does not know which request(s) a particular
socket will be used for at connect time.


>
> I recognize that a particular piece of software might be constructed
> in a way that makes this difficult, but it can't be impossible.


> Question: how do you manage the checks when you are using alternative
> services?  I expect that you need to store a target origin for the
> connection attempt, rather than using the host and port or SNI and
> port that you are connecting to.  (This doesn't complicate things
> regarding the question at hand, but I don't see any text on this
> point.)
>

That's a good question, I have to think about that a bit.