Re: Issue #356: Form-encode Expect-CT report bodies?
Emily Stark <estark@google.com> Fri, 09 June 2017 14:43 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 B6E59129B6D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 9 Jun 2017 07:43:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.5
X-Spam-Level:
X-Spam-Status: No, score=-6.5 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, URIBL_BLOCKED=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 07Ny765KXm-P for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 9 Jun 2017 07:43:04 -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 4182E129B5D for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 9 Jun 2017 07:43:01 -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 1dJL4f-0007OC-P3 for ietf-http-wg-dist@listhub.w3.org; Fri, 09 Jun 2017 14:39:41 +0000
Resent-Date: Fri, 09 Jun 2017 14:39:41 +0000
Resent-Message-Id: <E1dJL4f-0007OC-P3@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 1dJL4T-0007NL-UX for ietf-http-wg@listhub.w3.org; Fri, 09 Jun 2017 14:39:29 +0000
Received: from mail-oi0-f47.google.com ([209.85.218.47]) 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 1dJL4M-0006tO-CY for ietf-http-wg@w3.org; Fri, 09 Jun 2017 14:39:24 +0000
Received: by mail-oi0-f47.google.com with SMTP id s3so31510272oia.0 for <ietf-http-wg@w3.org>; Fri, 09 Jun 2017 07:39:01 -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=6/Vm5anO7md+7hegX7lotsCSGrS46huB7Q5/vPUZtNo=; b=LHZBEjfcM3QlHk5Zx9vn61NlwLS8xIqR/ND/PSf3x040WMjfYbJ9pl2v/m8wBUeN8i DGKnKJ7ZEVBBVEXh1r3BCs/oBucsuDU+sRslul/HOvXH7FqxqS63Y5G6eTbKGLsvkroD xjpyvEprw2NPcDfy+dpUsBwi3JpqLHoRpyPxvbGBkePocIwgAqz8BIrsN+tv/wTmp+Cu DysVDd8Wi9Tz3U77465oJZsqsOhSK6xVE2k6k6NfyQMIABEFNotQb0OExgoyD0dKIZw6 TZxdI8eq3x/vaL2ilsRY+lZWCvahPPBs8ve18ExGvWXuHvxyB6j31Inf/253pfBqZuVN Ln9Q==
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=6/Vm5anO7md+7hegX7lotsCSGrS46huB7Q5/vPUZtNo=; b=sMlOCBjijaJLuHSoK/AGeKCcNQ05rVsU++PBRb+yOOrlErbhbkYXJda1HbIHv5AgVd NNYNXspC/gdgSr/bIvHFvNwnow3sMI7IObF82aMEtIfIh/AMMQj2Tgu1YsvHaitZCwsf IyWnktRflNOGsajbccj2ojmuXHgopq2abaJimAa6rr4eYgryGQ7RdXPxJErRQNncoqud 9i1ubqkdptgCUzG+cdjpYMxRtSX3Ip44KVIfQHlq/ksnT0LeFD+3oR2tb3whDDO9fGC+ L4soUuX8dX6b6ceevq2wQQ3IgYQ7LmGs0va7qgqW+B8lar0r9ZMV97JIDRIN+Sx2uJ4x C1+Q==
X-Gm-Message-State: AODbwcDeEIeTnCovenywxTYz1qSP1vHiQ4GhxTtZ8+K6TqngB36R9+zp NMgYHc24Zor7ntIdSjAcfzlHk7tEEZ8GrBM=
X-Received: by 10.202.229.138 with SMTP id c132mr2105720oih.19.1497019135476; Fri, 09 Jun 2017 07:38:55 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.202.66.86 with HTTP; Fri, 9 Jun 2017 07:38:35 -0700 (PDT)
In-Reply-To: <CAPP_2SYNkReoDOjRKdEWtrP=ZGhPO2mKCoQm9Pm7LjcNLyoC+Q@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>
From: Emily Stark <estark@google.com>
Date: Fri, 09 Jun 2017 07:38:35 -0700
Message-ID: <CAPP_2SYLpKBo-rWV4oMG7V3FeN4aZ7fZEOdFgwFC8ASmFKmvqA@mail.gmail.com>
To: Patrick McManus <mcmanus@ducksong.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, httpbis <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a114183b0cb3d91055187edc2"
Received-SPF: pass client-ip=209.85.218.47; envelope-from=estark@google.com; helo=mail-oi0-f47.google.com
X-W3C-Hub-Spam-Status: No, score=-5.4
X-W3C-Hub-Spam-Report: AWL=1.607, 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_H2=-1, 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 1dJL4M-0006tO-CY 66165c042932bdb7d9fc3892d295bd28
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_2SYLpKBo-rWV4oMG7V3FeN4aZ7fZEOdFgwFC8ASmFKmvqA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33970
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>
Does anyone else have an opinion? If not, I'll probably go with text/plain. On Wed, Jun 7, 2017 at 9:04 AM, Emily Stark <estark@google.com> wrote: > Re: CSP and OCSP, yes, those are open issues as well. Indeed, the > Expect-CT issue spawned a long and as-yet-unresolved debate about OCSP: > https://github.com/whatwg/fetch/issues/530 > > For CSP, the plan is to move reporting to the in-progress Reporting API, > which was intended to send CORS preflights but doesn't currently in either > spec or implementation. The spec issue is https://github.com/WICG/ > reporting/issues/41, and it's still an open question how preflights would > be implemented in Chrome. > > HPKP reporting has the same issue. Whatever we do for Expect-CT would most > likely make sense to apply for HPKP reports as well. > > I would be okay with either of your proposed workarounds. I lean slightly > towards text/plain because I suspect the empty-Origin-header proposal will > lead to implementors doing special-purpose implementations of a subset of > CORS for this purpose, skipping preflight caching and such. > > On Wed, Jun 7, 2017 at 8:36 AM, Patrick McManus <mcmanus@ducksong.com> > wrote: > >> On Wed, Jun 7, 2017 at 3:39 PM, Martin Thomson <martin.thomson@gmail.com> >> wrote: >> >>> Can we go to first principles? >>> >>> >> I can learn, forget, and relearn cors more times in a day than I care to >> count :) >> >> fwiw, it seems an inconsistent state of affairs here.. >> >> csp report-uri is similar.. afaict the current spec applies fetch (and >> therefore cors) rules to it after mandating no credentials.. but also >> afaict that's not the reality of implementations. The OCSP example has a >> lot of similarities too, though the uri is less controllable (but after a >> few layers from the PKI root who really knows..). when talking through the >> basic cors principles (credential leakage, read-side leaks, write-side >> triggers) I didn't really see a problem with a non content UA request doing >> this based on a policy decision to implement a spec but I can certainly see >> how every UA might come to a different conclusion. Indeed I went back and >> forth a few times. So Emily, I certainly see where your use of >> "jeopardizes" comes from with option a. This IETF forum is only likely to >> muddy the waters further, I'm afraid as we aren't the keepers of cors. >> >> which kind of brings us to the more httpbis parts of your issue - the >> self described option b. Those are indeed gross. Perhaps more a little less >> offensive, but still non ideal, workarounds would be: >> * an empty string origin request header and an >> access-control-allow-origin: * response >> * content-type: text/plain (its not right, but seems strictly better >> than a form) >> >> hth. (I'm prepared to be told those are bogus too.) >> >> -P >> >> >> >> >> >> >> >>> The URL is controlled by a site. Though it doesn't include ambient >>> authority (I hope), it can still be used to poke at things on the same >>> side of the firewall as a client. That would seem to qualify it for >>> CORS. >>> >>> On 7 June 2017 at 12:23, Patrick McManus <mcmanus@ducksong.com> wrote: >>> > my gut reaction: why would an expect-ct report be more subject to cors >>> than >>> > something like OCSP? (assuming it wasn't driven directly from content) >>> > >>> > >>> > On Tue, Jun 6, 2017 at 6:45 PM, Emily Stark <estark@google.com> wrote: >>> >> >>> >> I'm looking for some feedback on >>> >> https://github.com/httpwg/http-extensions/issues/356. >>> >> >>> >> Expect-CT violation reports are currently specified as POST requests >>> with >>> >> JSON bodies. When implemented in a web browser, such reports should >>> arguably >>> >> send CORS preflights, because the content type is not CORS-safelisted >>> >> (https://www.w3.org/TR/cors/#simple-header). >>> >> >>> >> But sending CORS preflights for these requests doesn't really make >>> sense >>> >> from a web browser architecture perspective: CT compliance is checked >>> as >>> >> part of certificate verification and connection setup, divorced from >>> the >>> >> context one needs to send a CORS preflight (such as an Origin >>> header). This >>> >> is not just a theoretical layering issue; implementing preflights for >>> >> Expect-CT reports in Chrome would be pretty challenging. >>> >> >>> >> I only see two options to resolve this, both of which seem bad to me: >>> >> >>> >> a) Leave the reporting part of the spec as it currently is, and leave >>> it >>> >> up to the UA to decide whether further operations such as CORS >>> preflights >>> >> are needed for sending reports. This would basically leave it to us in >>> >> Chrome to decide either that Expect-CT reports should not be subject >>> to CORS >>> >> restrictions, or that we should not ship reporting. (I'm >>> uncomfortable with >>> >> this option because it somewhat jeopardizes the only active >>> implementation >>> >> effort that I know of.) >>> >> >>> >> b) The disgusting option: disguise Expect-CT reports as form >>> submissions, >>> >> which are not subject to CORS preflighting. This would mean the >>> report body >>> >> is sent as hostname=blah&port=443&... or we could even just send >>> >> expect-ct-report=<stringified JSON blob>. >>> >> >>> >> Thanks, >>> >> Emily >>> > >>> > >>> >>> >> >
- Issue #356: Form-encode Expect-CT report bodies? Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Patrick McManus
- Re: Issue #356: Form-encode Expect-CT report bodi… Martin Thomson
- Re: Issue #356: Form-encode Expect-CT report bodi… Patrick McManus
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Martin Thomson
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Martin Thomson
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Martin Thomson
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Martin Thomson
- Re: Issue #356: Form-encode Expect-CT report bodi… Patrick McManus
- Re: Issue #356: Form-encode Expect-CT report bodi… Emily Stark
- Re: Issue #356: Form-encode Expect-CT report bodi… Anne van Kesteren