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

Issue 2797813002: Replicate feature policy container policies. (Closed)

Created:
3 years, 8 months ago by iclelland
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-frames_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dcheng, dglazkov+blink, jam, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replicate feature policy container policies. This CL adds a persistent parsed container policy to HTMLFrameOwnerElement, and replicates it alongside of sandbox attributes to remote frames. In most cases, the sandbox and FP attributes should be processed at the same time, so the IPC and methods for them have been combined. The combination of sandbox and FP is referred to as the "frame policies". BUG=682258 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2797813002 Cr-Commit-Position: refs/heads/master@{#465563} Committed: https://chromium.googlesource.com/chromium/src/+/92f8c0b3ff53422eb761b53793bac0b424ec45df

Patch Set 1 #

Patch Set 2 : Fix ODR violation #

Total comments: 10

Patch Set 3 : Cleanup, reponding to review comments #

Total comments: 39

Patch Set 4 : Rebase #

Patch Set 5 : Addressing comments from PS#3 #

Patch Set 6 : Rebase after the great Blink rename #

Total comments: 12

Patch Set 7 : Addressing comments from PS#6 #

Total comments: 4

Patch Set 8 : Update tests #

Patch Set 9 : Update pending container policy more often; add test #

Total comments: 8

Patch Set 10 : Addressing review nits #

Patch Set 11 : Rebase #

Patch Set 12 : Fix rebase #

Total comments: 10

Patch Set 13 : Rebase; addressing review comments #

Total comments: 2

Patch Set 14 : Addressing review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+806 lines, -209 lines) Patch
M components/printing/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 2 chunks +6 lines, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +35 lines, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 2 chunks +16 lines, -3 lines 0 comments Download
M content/browser/frame_host/frame_tree_node_blame_context_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_unittest.cc View 1 2 3 4 5 10 chunks +50 lines, -32 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 7 chunks +7 lines, -7 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +24 lines, -19 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +13 lines, -11 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 4 5 6 7 9 chunks +23 lines, -14 lines 0 comments Download
M content/browser/frame_host/render_frame_message_filter.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +78 lines, -6 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/common/feature_policy/feature_policy.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/feature_policy/feature_policy.cc View 1 2 3 4 5 6 2 chunks +13 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +14 lines, -7 lines 0 comments Download
M content/common/frame_replication_state.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +8 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +16 lines, -7 lines 0 comments Download
M content/renderer/render_frame_proxy.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M content/renderer/render_frame_proxy.cc View 1 2 3 4 5 4 chunks +10 lines, -5 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameOwner.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +30 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +258 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/RemoteFrameOwner.h View 1 2 3 4 5 4 chunks +13 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/RemoteFrameOwner.cpp View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameTestHelpers.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp View 1 2 3 4 5 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebFrame.h View 1 2 3 4 5 2 chunks +9 lines, -6 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -9 lines 0 comments Download
M third_party/WebKit/public/web/WebRemoteFrame.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 94 (57 generated)
iclelland
Still cleaning this up a bit, but the basic idea is here.
3 years, 8 months ago (2017-04-04 23:02:12 UTC) #11
iclelland
On 2017/04/04 23:02:12, iclelland wrote: > Still cleaning this up a bit, but the basic ...
3 years, 8 months ago (2017-04-05 02:18:55 UTC) #12
iclelland
https://codereview.chromium.org/2797813002/diff/20001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/2797813002/diff/20001/content/browser/frame_host/frame_tree_node.cc#newcode328 content/browser/frame_host/frame_tree_node.cc:328: // Validate that inherited policy matches? This isn't necessary; ...
3 years, 8 months ago (2017-04-05 02:19:08 UTC) #13
raymes
Hey Ian, I had a look through. One high level question I have is why ...
3 years, 8 months ago (2017-04-05 05:24:38 UTC) #14
raymes
https://codereview.chromium.org/2797813002/diff/20001/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp File third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp (right): https://codereview.chromium.org/2797813002/diff/20001/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp#newcode229 third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp:229: allowedFeatures(), SecurityOrigin::create(m_absoluteURL)); Hmm, how do payment request and fullscreen ...
3 years, 8 months ago (2017-04-05 05:43:22 UTC) #15
iclelland
On 2017/04/05 05:24:38, raymes wrote: > Hey Ian, I had a look through. One high ...
3 years, 8 months ago (2017-04-05 14:15:53 UTC) #16
iclelland
https://codereview.chromium.org/2797813002/diff/20001/content/browser/frame_host/frame_tree_node.h File content/browser/frame_host/frame_tree_node.h (right): https://codereview.chromium.org/2797813002/diff/20001/content/browser/frame_host/frame_tree_node.h#newcode229 content/browser/frame_host/frame_tree_node.h:229: // Update this frame's container policy. This is used ...
3 years, 8 months ago (2017-04-05 14:51:13 UTC) #17
iclelland
+r alexmos -- could you PTAL? As I mentioned to raymes, if this is way ...
3 years, 8 months ago (2017-04-05 14:53:20 UTC) #19
lunalu1
Thanks for doing this Ian. I just have one question: I don't see container policy ...
3 years, 8 months ago (2017-04-05 22:30:03 UTC) #20
raymes
On 2017/04/05 14:15:53, iclelland wrote: > On 2017/04/05 05:24:38, raymes wrote: > > Hey Ian, ...
3 years, 8 months ago (2017-04-05 22:35:39 UTC) #21
raymes
On 2017/04/05 22:35:39, raymes wrote: > On 2017/04/05 14:15:53, iclelland wrote: > > On 2017/04/05 ...
3 years, 8 months ago (2017-04-05 22:41:02 UTC) #22
raymes
On 2017/04/05 22:35:39, raymes wrote: > On 2017/04/05 14:15:53, iclelland wrote: > > On 2017/04/05 ...
3 years, 8 months ago (2017-04-05 22:41:04 UTC) #23
alexmos
Thanks, a couple of high-level questions below, and I'm also curious about some of raymes's ...
3 years, 8 months ago (2017-04-06 00:44:22 UTC) #24
iclelland
On 2017/04/06 00:44:22, alexmos wrote: > Thanks, a couple of high-level questions below, and I'm ...
3 years, 8 months ago (2017-04-06 03:38:45 UTC) #25
iclelland
https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree.cc#newcode207 content/browser/frame_host/frame_tree.cc:207: // Set sandbox flags and make them effective immediately, ...
3 years, 8 months ago (2017-04-09 03:25:54 UTC) #30
alexmos
https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree.cc#newcode210 content/browser/frame_host/frame_tree.cc:210: added_node->SetPendingContainerPolicy(container_policy); On 2017/04/09 03:25:54, iclelland wrote: > On 2017/04/06 ...
3 years, 8 months ago (2017-04-11 01:17:50 UTC) #35
iclelland
https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/2797813002/diff/40001/content/browser/frame_host/frame_tree_node.cc#newcode375 content/browser/frame_host/frame_tree_node.cc:375: pending_container_policy_ != replication_state_.container_policy; On 2017/04/05 22:30:03, loonybear wrote: > ...
3 years, 8 months ago (2017-04-11 17:41:43 UTC) #37
alexmos
Thanks, this looks good with a couple of nits below. Were you planning to add ...
3 years, 8 months ago (2017-04-13 02:09:16 UTC) #41
iclelland
Yes, I've added a test to site_per_processs_browsertests, and I'm in the process of adding a ...
3 years, 8 months ago (2017-04-13 19:05:32 UTC) #44
lunalu1
Thanks for writing all this Ian! lgtm + nit https://codereview.chromium.org/2797813002/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2797813002/diff/120001/content/renderer/render_frame_impl.cc#newcode1003 content/renderer/render_frame_impl.cc:1003: ...
3 years, 8 months ago (2017-04-13 20:54:05 UTC) #47
alexmos
On 2017/04/13 19:05:32, iclelland wrote: > Yes, I've added a test to site_per_processs_browsertests, and I'm ...
3 years, 8 months ago (2017-04-14 00:33:43 UTC) #50
iclelland
On 2017/04/14 00:33:43, alexmos wrote: > On 2017/04/13 19:05:32, iclelland wrote: > > Yes, I've ...
3 years, 8 months ago (2017-04-14 03:29:21 UTC) #51
alexmos
Thanks for adding the tests! LGTM with nits, and let's follow up on removing the ...
3 years, 8 months ago (2017-04-14 23:42:45 UTC) #52
iclelland
https://codereview.chromium.org/2797813002/diff/160001/content/browser/frame_host/frame_tree_node.h File content/browser/frame_host/frame_tree_node.h (right): https://codereview.chromium.org/2797813002/diff/160001/content/browser/frame_host/frame_tree_node.h#newcode220 content/browser/frame_host/frame_tree_node.h:220: return pending_container_policy_; On 2017/04/14 23:42:45, alexmos wrote: > You ...
3 years, 8 months ago (2017-04-15 03:36:07 UTC) #55
iclelland
+r pfeldman -- can you PTAL as OWNER in third_party/WebKit?
3 years, 8 months ago (2017-04-15 03:37:14 UTC) #57
pfeldman
someone from isolation / security should take a look at this.
3 years, 8 months ago (2017-04-17 17:18:12 UTC) #70
iclelland
On 2017/04/17 17:18:12, pfeldman wrote: > someone from isolation / security should take a look ...
3 years, 8 months ago (2017-04-18 13:24:40 UTC) #71
dcheng
https://codereview.chromium.org/2797813002/diff/220001/third_party/WebKit/Source/core/frame/FrameOwner.h File third_party/WebKit/Source/core/frame/FrameOwner.h (right): https://codereview.chromium.org/2797813002/diff/220001/third_party/WebKit/Source/core/frame/FrameOwner.h#newcode94 third_party/WebKit/Source/core/frame/FrameOwner.h:94: return container_policy; Nit: it's unclear to me why we ...
3 years, 8 months ago (2017-04-18 16:26:37 UTC) #72
iclelland
Thanks, dcheng! (I would have asked you explicitly to take a look, but your username ...
3 years, 8 months ago (2017-04-18 19:19:44 UTC) #75
iclelland
https://codereview.chromium.org/2797813002/diff/240001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/2797813002/diff/240001/content/browser/site_per_process_browsertest.cc#newcode9547 content/browser/site_per_process_browsertest.cc:9547: // Test dynamic updates to iframe sandbox attribute correctly ...
3 years, 8 months ago (2017-04-18 19:25:19 UTC) #76
dcheng
Blink LGTM with two comments addressed. I talked with iclelland offline about the semantics of ...
3 years, 8 months ago (2017-04-18 19:46:53 UTC) #77
iclelland
On 2017/04/18 19:46:53, dcheng (OOO through May 2) wrote: > Blink LGTM with two comments ...
3 years, 8 months ago (2017-04-19 02:32:45 UTC) #85
Lei Zhang
lgtm
3 years, 8 months ago (2017-04-19 05:22:26 UTC) #86
Mike West
LGTM, though it looks like I'm too late to the party. :(
3 years, 8 months ago (2017-04-19 08:45:30 UTC) #87
iclelland
On 2017/04/19 08:45:30, Mike West wrote: > LGTM, though it looks like I'm too late ...
3 years, 8 months ago (2017-04-19 12:36:32 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2797813002/260001
3 years, 8 months ago (2017-04-19 12:37:01 UTC) #91
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 12:43:23 UTC) #94
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/92f8c0b3ff53422eb761b53793ba...

Powered by Google App Engine
This is Rietveld 408576698