Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C87D99FC for ; Fri, 19 Dec 2014 13:35:47 +0000 (UTC) Received: (qmail 43764 invoked by uid 500); 19 Dec 2014 13:35:47 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 43724 invoked by uid 500); 19 Dec 2014 13:35:47 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 43712 invoked by uid 99); 19 Dec 2014 13:35:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2014 13:35:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of iclelland@google.com designates 209.85.218.53 as permitted sender) Received: from [209.85.218.53] (HELO mail-oi0-f53.google.com) (209.85.218.53) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2014 13:35:42 +0000 Received: by mail-oi0-f53.google.com with SMTP id g201so1593087oib.12 for ; Fri, 19 Dec 2014 05:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=EjatVFMHiFGvfgKPvrBIRp/omyYVEQOOJJVGkUk5EjY=; b=RcCmh2pDVkJ5K9NLnRcvVk/iQ4kvyzwKr2gdGKLdlcenyydDp2FAkroc82R5N2Lm8M YUWRKOh1IdLe0ikoeegjMsJaIr64wviSHo5sH88LYJd0LKRZgyYZeepXgruotA+RiyaL Ft3pFPw9Z7Dx7sLOhev0jLGEsDqpom74Suy90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:from:date:message-id :subject:to:content-type; bh=EjatVFMHiFGvfgKPvrBIRp/omyYVEQOOJJVGkUk5EjY=; b=WFsfKDgu82uwuM7B2QwZIZXLF0K6pgrWpLZr+TBcvt+y5pziXJcbGGB8LGshwIM948 RwR9nRZ2xemFaRLLqFP1sqA3o+e5R94+YNmbCivBoTJs/2k+ILaXbCZwZUKRaBVpxKtU yLPGecxNOt+3vxmugw+lef1MPsG8cx5XRqiF8felCBUXwWDMQfMxRWdE1XWHX+7cjCtv mfdVgH1S3aIZmSF3VVdxoYSjoVu9xtU1x1zi3RUJKmb/XqG+Gc/1JoD/8nBxL8vbChQA /NfW1/M84OB0cVfMDqrs9yoV7TqG3wIs9mCEPKZv+Vf+YR9ZrfUObAShehUp4tZTXsaI TGYQ== X-Gm-Message-State: ALoCoQnAKDCAz57iiMlGDiAtYCYADbIu4dnkTQOpQqffCcnf98uV0y+aKK+r2vc2ahL8PcjLxpjg X-Received: by 10.182.213.2 with SMTP id no2mr4770883obc.76.1418996031336; Fri, 19 Dec 2014 05:33:51 -0800 (PST) MIME-Version: 1.0 References: From: Ian Clelland Date: Fri, 19 Dec 2014 13:33:50 +0000 Message-ID: Subject: Re: How to handle CSP for XHR in Cordova 4.0 To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=001a11c2de6462e4a8050a91c223 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2de6462e4a8050a91c223 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu Dec 18 2014 at 9:42:18 AM Andrew Grieve wrote= : > That's a good point Chuck. Since the meaning of would be changin= g > in a dramatic way, I think we should just come up with something new, and > leave for anyone that wants to use the legacy-whitelist plugin. > > Maybe: > PATTERN > PATTERN > > On Wed, Dec 17, 2014 at 5:29 PM, Chuck Lantz wrote= : > > > > Yeah, I also am thinking about "upgrade" situations where someone takes > an > > existing app and moves it to Android Cordova 4.0. It strikes me there > we'd > > either want the existing behavior to be preserved (flaws aside) or move > it > > to the top level nav behavior. Did I read correctly the current > whitelist > > would be refactored out to a plugin? > And yes, the current whitelist, flaws and all, is refactored out into org.apache.cordova.legacy-whitelist. The source is in the cordova-plugins repo; it hasn't been published yet. Ian > > > > -Chuck > > > > -----Original Message----- > > From: Ian Clelland [mailto:iclelland@chromium.org] > > Sent: Wednesday, December 17, 2014 1:02 PM > > To: dev@cordova.apache.org > > Subject: Re: How to handle CSP for XHR in Cordova 4.0 > > > > I think that access tags (and the widget spec generally) were never a > good > > fit for the top-level-navigation case. Widgets, as far as I know, were > > always intended to be single page apps, and the tag wouldn't > have > > any affect on that at all. > > > > We've used it for nav in the past, though, so the question is whether > > familiarity with the old syntax trumps the fact that we're changing the > > behaviour. > > > > On Wed Dec 17 2014 at 11:47:02 AM Chuck Lantz > > wrote: > > > > > I suppose that is a good question. I took a look at the Widget Access > > > Request Policy W3C spec where that element comes from. It's actually > > > pretty ambiguous. > > > > > > "A user agent enforces an access request policy. ... In the default > > > policy, a user agent must deny access to network resources external t= o > > > the widget by default, whether this access is requested through APIs > > (e.g. > > > XMLHttpRequest) or through markup (e.g. iframe, script, img).." > > > > > > ... but... > > > > > > "A user agent may apply a different default policy if the widget is > > > being used in a context that defines its own policy, such as for > > > instance a widget served over HTTP. A more lenient policy can be > > > defined with the access-request list as defined in the processing > > > section. ... Furthermore, a user agent may grant access to certain UR= I > > > schemes (e.g., mailto:) without the need of an access request if its > > > security policy considers those schemes benign." > > > > > > It strikes me that today we implement the default policy and what > > > we're proposing here is a more lenient, alternate policy. > > > > > > For what it's worth, here's how this is defined in the Windows world: > > > > > > > > > > > > > > > > > > -Chuck > > > > > > -----Original Message----- > > > From: Ian Clelland [mailto:iclelland@chromium.org] > > > Sent: Wednesday, December 17, 2014 8:16 AM > > > To: dev@cordova.apache.org > > > Subject: Re: How to handle CSP for XHR in Cordova 4.0 > > > > > > Definitely want to handle iOS, with the same policy. I've been workin= g > > > on that in parallel with Android. > > > > > > Do we want to use for Nav? I wasn't sure, given its history, > > > and the fact that we're changing its behaviour. Is it better to stick > > > with the familiar tag and change what it tries to do? Or create a new > > > tag and deprecate ? > > > > > > On Wed Dec 17 2014 at 10:30:18 AM Chuck Lantz > > > wrote: > > > > > > > What about top level nav and script access? Would the thought be > > > > that the elements would map to that in the base platform? > > > > I'm thinking in terms of consistency across the different platforms= . > > > > It strikes me we'd want to update iOS at least as well. > > > > > > > > -Chuck > > > > > > > > -----Original Message----- > > > > From: agrieve@google.com [mailto:agrieve@google.com] On Behalf Of > > > > Andrew Grieve > > > > Sent: Tuesday, December 16, 2014 7:21 AM > > > > To: dev > > > > Subject: Re: How to handle CSP for XHR in Cordova 4.0 > > > > > > > > On Mon, Dec 15, 2014 at 8:19 PM, Chuck Lantz > > > wrote: > > > > > > > > > > Near term, for Windows 8.0/8.1, a custom security policy is in > > > > > place at the platform level for store apps so CSP doesn't really > > > > > apply there at the moment. (And, to be really specific, CSP > > > > > support is pretty limited in > > > > > IE10/11 focusing on the sandbox directive. The Windows 10 Tech > > > > > Preview is where you can see the real support in IE right now.) > > > > > So, it's a more of forward-thinking topic in that world. > > > > > > > > > > A related question, however - CSP support only started in the > > > > > Android browser with 4.4 did it not? Obviously Crosswalk would > > > > > have it but what about when using the base browser? Is the > > > > > thought devs should use the old whitelist model here? > > > > > > > > > > > > > I think one of the big issues is that the whitelist never worked fo= r > > > > blocking *all* requests. It didn't work pre-3.0, and it doesn't > > > > block