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

Issue 1411813003: Teach URLRequest about initiator checks for First-Party-Only cookies. (Closed)

Created:
5 years, 2 months ago by Mike West
Modified:
4 years, 11 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Teach URLRequest about initiator checks for First-Party-Only cookies. This patch adds an 'initiator' field to 'URLRequest' in order to keep track of the origin of the context which initiated a request. This allows us to correctly perform the initiator requests specified in [1], which prevent first-party-only cookies from being sent along with a request if that request is "unsafe", and is initiated from a third-party origin (e.g. a form submission to 'bank.com' from 'evil.com'). [1]: https://tools.ietf.org/html/draft-west-first-party-cookies-04#section-4.3 BUG=544114 Committed: https://crrev.com/202534e3fa636aa1c9ce73c30dbbba854992488f Cr-Commit-Position: refs/heads/master@{#369754}

Patch Set 1 #

Patch Set 2 : test #

Total comments: 10

Patch Set 3 : Feedback. #

Total comments: 14

Patch Set 4 : mmenke #

Total comments: 9

Patch Set 5 : Rebase. #

Patch Set 6 : Fix. #

Patch Set 7 : Rebase. #

Patch Set 8 : Rebase. #

Total comments: 16

Patch Set 9 : mmenke@ feedback. #

Patch Set 10 : Feedback. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -107 lines) Patch
M chrome/browser/predictors/resource_prefetcher.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_update_job.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigation_request_info.h View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request_info.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/loader/async_revalidation_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/child/request_info.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download
M content/child/resource_dispatcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/net/url_fetcher.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -1 line 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -8 lines 0 comments Download
M net/cookies/canonical_cookie_unittest.cc View 1 2 3 4 5 6 7 2 chunks +18 lines, -24 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 2 3 4 5 6 7 5 chunks +5 lines, -5 lines 0 comments Download
M net/cookies/cookie_options.h View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -15 lines 0 comments Download
M net/cookies/cookie_options.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/test_url_fetcher_factory.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M net/url_request/url_fetcher.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -4 lines 0 comments Download
M net/url_request/url_fetcher_core.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -4 lines 0 comments Download
M net/url_request/url_fetcher_core.cc View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -8 lines 1 comment Download
M net/url_request/url_fetcher_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_fetcher_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 8 9 5 chunks +25 lines, -2 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 2 chunks +24 lines, -7 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +42 lines, -11 lines 0 comments Download

Messages

Total messages: 46 (13 generated)
Mike West
Hi Matt, Emily, and Nasko! I've consolidated the various FPO patches I've asked y'all to ...
5 years, 2 months ago (2015-10-20 09:30:18 UTC) #2
nasko
The content/ part looks fine to me. Adding clamy@ to ensure I'm not missing some ...
5 years, 2 months ago (2015-10-20 22:36:30 UTC) #4
estark
mostly just questions from me https://codereview.chromium.org/1411813003/diff/20001/content/common/resource_messages.h File content/common/resource_messages.h (right): https://codereview.chromium.org/1411813003/diff/20001/content/common/resource_messages.h#newcode164 content/common/resource_messages.h:164: // fo cookie checks ...
5 years, 2 months ago (2015-10-20 23:41:58 UTC) #5
clamy
PlzNavigate part lgtm.
5 years, 2 months ago (2015-10-21 11:32:32 UTC) #6
mmenke
https://codereview.chromium.org/1411813003/diff/40001/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/1411813003/diff/40001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1242 content/browser/loader/resource_dispatcher_host_impl.cc:1242: new_request->set_initiator(request_data.request_initiator); What about AppCache? https://codereview.chromium.org/1411813003/diff/40001/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1242 content/browser/loader/resource_dispatcher_host_impl.cc:1242: new_request->set_initiator(request_data.request_initiator); What about ...
5 years, 2 months ago (2015-10-21 15:36:38 UTC) #7
Mike West
Thanks for taking a look, Matt. Mind taking another? In particular, I'd love help with ...
5 years, 2 months ago (2015-10-22 13:17:03 UTC) #8
mmenke
[+michaeln] for ServiceWorker/AppCache considerations. See https://codereview.chromium.org/1411813003/diff/60001/net/url_request/url_request.h for a description of the new field. The concern ...
5 years, 2 months ago (2015-10-22 19:41:05 UTC) #10
mmenke
https://codereview.chromium.org/1411813003/diff/60001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/1411813003/diff/60001/net/url_request/url_request_http_job.cc#newcode667 net/url_request/url_request_http_job.cc:667: options.set_include_first_party_only_cookies(); What about requests that don't set either of ...
5 years, 2 months ago (2015-10-22 19:57:22 UTC) #11
michaeln
+mek@, seems like something that will matter for foreign fetch https://codereview.chromium.org/1411813003/diff/60001/content/browser/appcache/appcache_update_job.cc File content/browser/appcache/appcache_update_job.cc (right): https://codereview.chromium.org/1411813003/diff/60001/content/browser/appcache/appcache_update_job.cc#newcode167 ...
5 years, 2 months ago (2015-10-23 23:29:50 UTC) #12
michaeln
> +mek@, seems like something that will matter for foreign fetch sry for the spam, ...
5 years, 2 months ago (2015-10-23 23:31:04 UTC) #15
mmenke
On 2015/10/23 23:31:04, michaeln wrote: > > +mek@, seems like something that will matter for ...
5 years, 1 month ago (2015-11-12 19:38:23 UTC) #16
Mike West
On 2015/11/12 at 19:38:23, mmenke wrote: > On 2015/10/23 23:31:04, michaeln wrote: > > > ...
5 years, 1 month ago (2015-11-13 15:02:08 UTC) #17
Mike West
On 2015/11/13 at 15:02:08, Mike West wrote: > On 2015/11/12 at 19:38:23, mmenke wrote: > ...
5 years ago (2015-12-07 13:26:00 UTC) #18
mmenke
On 2015/12/07 13:26:00, Mike West wrote: > On 2015/11/13 at 15:02:08, Mike West wrote: > ...
5 years ago (2015-12-07 16:27:56 UTC) #19
Mike West
On 2015/12/07 at 16:27:56, mmenke wrote: > "Mark?" Are you talking to me? ... Did ...
5 years ago (2015-12-07 17:27:09 UTC) #20
mmenke
On 2015/12/07 17:27:09, Mike West wrote: > On 2015/12/07 at 16:27:56, mmenke wrote: > > ...
5 years ago (2015-12-07 17:30:43 UTC) #21
Mike West
On 2015/12/07 at 17:30:43, mmenke wrote: > On 2015/12/07 17:27:09, Mike West wrote: > > ...
4 years, 11 months ago (2016-01-12 13:57:40 UTC) #22
mmenke
On 2016/01/12 13:57:40, Mike West (OOO) wrote: > On 2015/12/07 at 17:30:43, mmenke wrote: > ...
4 years, 11 months ago (2016-01-12 14:30:13 UTC) #23
mmenke
Looks good! https://codereview.chromium.org/1411813003/diff/140001/net/cookies/cookie_options.h File net/cookies/cookie_options.h (right): https://codereview.chromium.org/1411813003/diff/140001/net/cookies/cookie_options.h#newcode13 net/cookies/cookie_options.h:13: #include "url/origin.h" No longer needed. https://codereview.chromium.org/1411813003/diff/140001/net/cookies/cookie_options.h#newcode62 net/cookies/cookie_options.h:62: ...
4 years, 11 months ago (2016-01-12 16:20:59 UTC) #24
Mike West
https://codereview.chromium.org/1411813003/diff/60001/net/url_request/url_request.h File net/url_request/url_request.h (right): https://codereview.chromium.org/1411813003/diff/60001/net/url_request/url_request.h#newcode295 net/url_request/url_request.h:295: // sites On 2015/10/22 at 19:41:05, mmenke wrote: > ...
4 years, 11 months ago (2016-01-13 08:10:22 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411813003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411813003/160001
4 years, 11 months ago (2016-01-13 08:10:33 UTC) #29
Mike West
On 2016/01/13 at 08:10:33, commit-bot wrote: > CQ is trying da patch. Follow status at ...
4 years, 11 months ago (2016-01-13 08:12:24 UTC) #30
mmenke
URLFetcher supports setting first_party_for_cookies, but not initiator. With this behavior, that makes no sense. You ...
4 years, 11 months ago (2016-01-13 16:30:16 UTC) #31
Mike West
On 2016/01/13 at 16:30:16, mmenke wrote: > URLFetcher supports setting first_party_for_cookies, but not initiator. With ...
4 years, 11 months ago (2016-01-14 12:33:10 UTC) #32
mmenke
LGTM. For the record, I reviewed everything but content/browser/frame_host/*, content/child/, and content/renderer (Looked at all ...
4 years, 11 months ago (2016-01-14 16:47:42 UTC) #33
Mike West
On 2016/01/14 at 16:47:42, mmenke wrote: > LGTM. For the record, I reviewed everything but ...
4 years, 11 months ago (2016-01-14 19:51:47 UTC) #34
mmenke
On 2016/01/14 19:51:47, Mike West (OOO) wrote: > On 2016/01/14 at 16:47:42, mmenke wrote: > ...
4 years, 11 months ago (2016-01-14 19:54:48 UTC) #35
Mike West
jochen@: Perhaps you can take a look at the (~4 files, ~dozen lines) in //content/child ...
4 years, 11 months ago (2016-01-15 06:24:06 UTC) #37
Mike West
On 2016/01/14 at 19:54:48, mmenke wrote: > It serves two purposes: Lets people drive a ...
4 years, 11 months ago (2016-01-15 06:24:38 UTC) #38
jochen (gone - plz use gerrit)
lgtm
4 years, 11 months ago (2016-01-15 14:48:25 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411813003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411813003/180001
4 years, 11 months ago (2016-01-15 14:51:47 UTC) #42
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 11 months ago (2016-01-15 16:07:23 UTC) #44
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 16:08:20 UTC) #46
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/202534e3fa636aa1c9ce73c30dbbba854992488f
Cr-Commit-Position: refs/heads/master@{#369754}

Powered by Google App Engine
This is Rietveld 408576698