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

Martin Thomson <martin.thomson@gmail.com> Fri, 09 June 2017 15:25 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 A2DE0129B5E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 9 Jun 2017 08:25:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.502
X-Spam-Level:
X-Spam-Status: No, score=-6.502 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, 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=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 Yo7uW4lVywpe for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 9 Jun 2017 08:25:33 -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 7B62712960D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 9 Jun 2017 08:25:28 -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 1dJLkm-0003KZ-7s for ietf-http-wg-dist@listhub.w3.org; Fri, 09 Jun 2017 15:23:12 +0000
Resent-Date: Fri, 09 Jun 2017 15:23:12 +0000
Resent-Message-Id: <E1dJLkm-0003KZ-7s@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <martin.thomson@gmail.com>) id 1dJLke-0003Jh-Dt for ietf-http-wg@listhub.w3.org; Fri, 09 Jun 2017 15:23:04 +0000
Received: from mail-lf0-f46.google.com ([209.85.215.46]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <martin.thomson@gmail.com>) id 1dJLkY-0002Y9-1R for ietf-http-wg@w3.org; Fri, 09 Jun 2017 15:22:59 +0000
Received: by mail-lf0-f46.google.com with SMTP id v20so31141949lfa.1 for <ietf-http-wg@w3.org>; Fri, 09 Jun 2017 08:22:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ERZD9Pv9aD2+G7hjU062oF3cfrtbQHLUNv9bjrymASc=; b=pQtr0+bzP/VF7GH8IDaY73S+SvxBJ3bOii6EDWtjAi/seGOQ1WlWuZDZLI4aL2Q1CN Fz6b0rzlrtRYTTgof5In3OWqVzJDiCz8RQZrQTrBbJwT6Htrvoz2tGxsjKniSuGiW2Xi y3C6m49oIVpuUX2j35CDmOyLLe1PfreUKWVAB1PQMXSijGspExx2uHvxODOa0eHKnmZs 8fxzC3bCGex5FIRuOSuYrJR2rJWGrYjWf7uBKGpmip1xs8TwHBb4R+W9EruLJgGjO5PU jbPpYMDuvYomEfMvfRFBX47e4xZbNwKxeCcXaNeN3LdKAjRMFcSmFkthf8/4QbSlCLu/ DbIg==
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=ERZD9Pv9aD2+G7hjU062oF3cfrtbQHLUNv9bjrymASc=; b=WZmyTV/pceKIYRlL2PtdQEG1YUXyRav+kQ5Nhyhml6snlLIzH+yhplAORtJ/fjqG8L bbSjA6FTXhGuC7ewdKhh+vwJI/QINBmjTedyf07Jq5g7N5sfrtqoGIe0JldxU7ak9BQ/ mV61AduS7YNksl//AZmFMtsEt6w0+pAOe1sQAW0OeLlE85IghrQA5ha8JlbM5dmT0mVR unxzpYec3Om/LFHM74PGn4RRT+GI5NwWW0WS92Csh8hBhD+p6xcpWABwsQdqqnG5pl1F W7LnKNylOgmi9kzY+j0w9uT4qBiVI51LRjN+ruga0ENF1YOKdvsLnazr537ZGvDiARse Tevw==
X-Gm-Message-State: AODbwcDOzhp0HqXrrJFHu/dmqBnK9tHCWsdBWyRTrJmjr+OU0i9p6Qog pyoHa9NjdUnTk5BXK5B0l0kWmNqbow==
X-Received: by 10.46.21.68 with SMTP id 4mr13133381ljv.50.1497021750943; Fri, 09 Jun 2017 08:22:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.46.8.66 with HTTP; Fri, 9 Jun 2017 08:22:30 -0700 (PDT)
In-Reply-To: <CAPP_2SY8h-ymtTubY0GMLqWctP4MXXu9nSiUU228gJ5drzZZQg@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>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Fri, 09 Jun 2017 16:22:30 +0100
Message-ID: <CABkgnnXEUdZ9M=911wGcNVqL+=qpwfvnE+3rNu1g3ApepyCKFA@mail.gmail.com>
To: Emily Stark <estark@google.com>
Cc: Patrick McManus <mcmanus@ducksong.com>, httpbis <ietf-http-wg@w3.org>, Anne van Kesteren <annevk@annevk.nl>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.215.46; envelope-from=martin.thomson@gmail.com; helo=mail-lf0-f46.google.com
X-W3C-Hub-Spam-Status: No, score=-6.0
X-W3C-Hub-Spam-Report: AWL=0.041, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1dJLkY-0002Y9-1R ae9cdd9d595a78a5d9ef61997b089f84
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/CABkgnnXEUdZ9M=911wGcNVqL+=qpwfvnE+3rNu1g3ApepyCKFA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33975
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>

The "first principles" notion also refers to the fact that the URL is
attacker-controlled.  Being hard to do isn't a great reason not to
preflight, though it is something to consider.

On 9 June 2017 at 16:10, Emily Stark <estark@google.com> wrote:
>
>
> On Fri, Jun 9, 2017 at 8:01 AM, Martin Thomson <martin.thomson@gmail.com>
> wrote:
>>
>> On 9 June 2017 at 16:53, Emily Stark <estark@google.com> wrote:
>> > CSP reporting isn't added to the CORS whitelist. It's been in violation
>> > of
>> > CORS for years and there are some vague plans to fix it by sending
>> > preflights, but adding it to the whitelist hasn't really been discussed.
>> > Anne has said that he prefers not to add more to the whitelist, which I
>> > think is a reasonable stance. (see
>> > https://lists.w3.org/Archives/Public/public-webappsec/2017Feb/0009.html
>> > --
>> > though to be fair, the same text/plain idea is rejected in that thread
>> > as
>> > well)
>> >
>> > In addition to the fact that there's not really any principled reason
>> > for
>> > expanding the whitelist, it would mean that, say, an XHR can send the
>> > new
>> > header value, which shouldn't really be allowed.
>>
>> Ahh, I remembered that discussion, but failed to get that critical
>> detail.  My point is that if you want to avoid a preflight, then make
>> sure that you have an analysis to back it up, don't just dodge the
>> issue by using a whitelisted MIME type.
>>
>> If that means using a preflight, then great.  If we go back to first
>> principles, the "POST to intranet site" case would seem to suggest
>> that some preflighting is warranted.
>>
>> Ultimately, I want the same answer for this and for CSP reports.  I
>> would rather not add this to the pile of violating mechanisms though.
>
>
> These are quite different scenarios though. With CSP, sending preflights is
> totally doable and makes sense, except for the fact of the widely deployed
> reporting servers that would break if we suddenly started requiring them to
> respond to preflights. Expect-CT and HPKP are done as part of certificate
> verification and it's not clear that they should be governed by CORS any
> more than OCSP requests or any request made by the OS in the course of
> loading a webpage. I agree with your "first principles" argument that if
> they are cross-origin requests triggered in the course of loading a web
> page, then they can be used by malicious web content and should be subject
> to CORS... but at the same time I'm not sure that it's practical to require
> that any request at any layer of the system triggered during the course of
> loading a web page should go through Fetch and send preflights if needed.
>
>