Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Issue 1876683002: Implement SDCH Dictionary domain matching as per RFC 2965

Created:
4 years, 8 months ago by bacek_yandex
Modified:
3 years, 6 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement SDCH Dictionary domain matching as per RFC 2965 Default GURL::DomainIs gives wrong results for * "http://example.com/" won't match ".example.com" * "http://www.example.com" will match "example.com" R=rdsmith@chromium.org, mmenke@chromium.org

Patch Set 1 #

Total comments: 1

Patch Set 2 : Factor out IsDomainMatch from CanonicalCookie and use it in SdchDictionary. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -41 lines) Patch
M net/base/sdch_dictionary.cc View 1 3 chunks +4 lines, -11 lines 0 comments Download
M net/base/url_util.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M net/base/url_util.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download
M net/base/url_util_unittest.cc View 1 1 chunk +17 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 chunks +2 lines, -30 lines 0 comments Download

Messages

Total messages: 27 (4 generated)
bacek_yandex
DomainMatch is roughly based on DomainIs but in less "pure C" way.
4 years, 8 months ago (2016-04-12 23:19:07 UTC) #1
mmenke
On 2016/04/12 23:19:07, bacek_yandex wrote: > DomainMatch is roughly based on DomainIs but in less ...
4 years, 8 months ago (2016-04-13 01:02:55 UTC) #2
bacek_yandex
On 2016/04/13 01:02:55, mmenke wrote: > On 2016/04/12 23:19:07, bacek_yandex wrote: > > DomainMatch is ...
4 years, 8 months ago (2016-04-13 01:09:59 UTC) #3
mmenke
On 2016/04/13 01:09:59, bacek_yandex wrote: > On 2016/04/13 01:02:55, mmenke wrote: > > On 2016/04/12 ...
4 years, 8 months ago (2016-04-13 01:18:08 UTC) #4
mmenke
On 2016/04/13 01:18:08, mmenke wrote: > On 2016/04/13 01:09:59, bacek_yandex wrote: > > On 2016/04/13 ...
4 years, 8 months ago (2016-04-13 01:28:24 UTC) #5
bacek_yandex
On 2016/04/13 01:28:24, mmenke wrote: > On 2016/04/13 01:18:08, mmenke wrote: > > On 2016/04/13 ...
4 years, 8 months ago (2016-04-13 01:40:00 UTC) #6
Randy Smith (Not in Mondays)
Vasily: Is this a real problem you're running into, or is this cleanup code? If ...
4 years, 8 months ago (2016-04-13 17:35:16 UTC) #7
bacek_yandex
On 2016/04/13 17:35:16, Randy Smith - Not in Fridays wrote: > Vasily: Is this a ...
4 years, 8 months ago (2016-04-13 21:27:36 UTC) #8
Randy Smith (Not in Mondays)
On 2016/04/13 21:27:36, bacek_yandex wrote: > On 2016/04/13 17:35:16, Randy Smith - Not in Fridays ...
4 years, 8 months ago (2016-04-13 21:40:59 UTC) #11
bacek_yandex
On 2016/04/13 21:40:59, Randy Smith - Not in Fridays wrote: > > OTOH, I'm all ...
4 years, 8 months ago (2016-04-13 22:01:51 UTC) #12
Mike West
> I don't think that it's really relevant for SDCH Dictionary's Domain attribute. > Just ...
4 years, 8 months ago (2016-04-14 07:32:26 UTC) #13
Mike West
https://codereview.chromium.org/1876683002/diff/1/net/base/sdch_dictionary.cc File net/base/sdch_dictionary.cc (right): https://codereview.chromium.org/1876683002/diff/1/net/base/sdch_dictionary.cc#newcode155 net/base/sdch_dictionary.cc:155: /* RFC 2965: 1. This RFC has been updated ...
4 years, 8 months ago (2016-04-14 07:32:49 UTC) #14
bacek_yandex
On 2016/04/14 07:32:49, Mike West wrote: > https://codereview.chromium.org/1876683002/diff/1/net/base/sdch_dictionary.cc > File net/base/sdch_dictionary.cc (right): > > https://codereview.chromium.org/1876683002/diff/1/net/base/sdch_dictionary.cc#newcode155 ...
4 years, 8 months ago (2016-04-14 09:31:24 UTC) #15
bacek_yandex
On 2016/04/14 09:31:24, bacek_yandex wrote: > I have a bad feelings about CanonicalCookie::IsDomainMatch. Looks like ...
4 years, 8 months ago (2016-04-14 09:39:40 UTC) #16
Mike West
On 2016/04/14 at 09:39:40, Bacek wrote: > On 2016/04/14 09:31:24, bacek_yandex wrote: > > > ...
4 years, 8 months ago (2016-04-14 09:51:19 UTC) #18
bacek_yandex
On 2016/04/14 09:51:19, Mike West wrote: > On 2016/04/14 at 09:39:40, Bacek wrote: > > ...
4 years, 8 months ago (2016-04-14 10:34:48 UTC) #19
Ryan Sleevi
I'd like to push on this without a spec. I don't believe we should be ...
4 years, 8 months ago (2016-04-14 16:24:07 UTC) #20
Randy Smith (Not in Mondays)
On 2016/04/14 16:24:07, Ryan Sleevi wrote: > I'd like to push on this without a ...
4 years, 8 months ago (2016-04-14 17:37:15 UTC) #21
Ryan Sleevi
On 2016/04/14 17:37:15, Randy Smith - Not in Fridays wrote: > On 2016/04/14 16:24:07, Ryan ...
4 years, 8 months ago (2016-04-14 18:08:24 UTC) #22
bacek_yandex
On 2016/04/14 18:08:24, Ryan Sleevi wrote: > On 2016/04/14 17:37:15, Randy Smith - Not in ...
4 years, 8 months ago (2016-04-14 20:54:56 UTC) #23
Ryan Sleevi
On 2016/04/14 20:54:56, bacek_yandex wrote: > Hang on a second. We do have it in ...
4 years, 8 months ago (2016-04-14 22:41:28 UTC) #24
bacek_yandex
On 2016/04/14 22:41:28, Ryan Sleevi wrote: > On 2016/04/14 20:54:56, bacek_yandex wrote: > > Hang ...
4 years, 8 months ago (2016-04-15 20:07:37 UTC) #25
Ryan Sleevi
4 years, 8 months ago (2016-04-15 20:21:19 UTC) #26
On 2016/04/15 20:07:37, bacek_yandex wrote:
> Can you elaborate about "ability to be changed"?

There's no actively maintained spec that, if it turns out there are spec bugs
(and there always are), we can respond - either during development of the spec
or in release.

> I'm totally agree with maintenance cost. But after Mike's suggestion there is
> only few lines changed in SdchDictionary. Just use IsDomainMatch instead of
> DomainIs helper. And it's resolving of years old TODO item. Which is currently
> preventing us to deploy SDCH properly. fsvo "properly".

Right. And while it may sound harsh, my suggestion is that if you're unable to
deploy SDCH "properly" because Chrome's implementation is lacking, then it may
be worthwhile to prioritize resources to build consensus and iterate on the
specification and gather feedback. I'm not comfortable supporting this change -
I believe it's a "spec bug" that it shares the cookie construct, and were this a
new specification, we would flag it as such and push back on the spec, for all
the reasons mentioned.

> I didn't see any discussions about "removing this code". Is it "removing sdch
> support at all and declare it dead"?

That is what an "Intent to Deprecate" for vendor-specific features is all about,
yes. If we don't have the resources to maintain something, if we don't have the
resources to spec something, if we don't have consensus from other implementors
that this is a worthwhile and useful feature of the Web platform with some
degree of interest, then we should remove support, reduce the burden, and reduce
the divergence in the Web platform.

This is, understandably, seemingly "drastic". But arguably, we should not have
introduced this in the first place in the way we did, and the Blink process is
meant to ensure we don't do it in the future. When we encounter issues like this
- where historically we've done it, but we don't have the staffing and resources
to maintain it - we do the Web a disservice.

For example, if, on the basis of Yandex supporting SDCH (e.g. we fixed this as
you deployed it), Firefox or Edge wanted to implemented SDCH support, could
they, without reverse engineering Chrome's implementation? If the answer is no
(and it clearly is), then we should be working towards one of two paths -
provide a spec or remove the implementation.

While I realize the aforementioned linked spec exist, it doesn't match what
implementations (such as Chrome) do. That's deeply troubling, and suggests our
first-order priorities should be in remedying that situation, such as the paths
I mentioned - WICG for the W3C path or IETF for the IETF path. We should be
tracking interest from implementors and gaining feedback from developers. If
there were resources committed to that, I'd be supportive of changes to this
code. But it's more important that we pursue an open web platform than it is
that we encourage deployment of vendor-specific features, which this is.

> Current SDCH spec isn't using RFC6265 for anything apart domain matching
> algorithm. Nothing at all. 

And that is still problematic, and I'm sorry that's not being communicated
clearly. Plainly put, the RFC 6265 language for domain matching - ignoring the
notion of origin - is bad. With refactoring out, though a useful suggestion, is
missing the underlying premise that nobody "but cookies" should be using RFC
6265 language for domain matching. I'm going to put a Not LGTM on this on that
basis.

> And yes, whole fetching/security/caching/etc part is
> highly underspecced.

> Erm... How is this "greatly widening the scope"?

Changing how domains are matched. More pragmatically, we should be matching
origin, rather than allowing the subdomain usage here.

> I'm all for doing this stuff properly. And I will give it a go to do it
through
> ietf. But it will take a few years to finalize. Meanwhile we are having
problems
> with sdch deployment  right now. Which can be considered as "implementor
> feedback" actually.

Agreed. But where's the spec to discuss the problems and security risks with RFC
6265 language? Where's the forum to build consensus that it's the right thing to
do? Where's the analysis of the security risks relevant to the Web platform, and
the violations here of the Same Origin Policy with respect to cross-origin
resource fetching? How do we effectively address these concerns?

I'm aware this is limiting your deployment. While it may sound cruel, I see this
as a good thing - it provides the correct incentives to help us do this the
right way. But I think our default state should be towards moving to SDCH
disabled, as the forcing function to ensure the right resources and right
committment to an open web platform are pursued.

Powered by Google App Engine
This is Rietveld 408576698