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

Issue 1723753002: Make Document::isSecureContext() work for OOPIFs (Closed)

Created:
4 years, 10 months ago by estark
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Document::isSecureContext() work for OOPIFs The inputs needed for isSecureContext() were, previously: a.) the origins of the current frame and its ancestors b.) for any sandboxed origins in the ancestor chain, the URLs of those frames (a) is easily accessible in --site-per-process, but (b) is not. For sandboxed frames, the URL was used to construct a stand-in origin. The sandboxed frame was considered potentially trustworthy if the stand-in origin was potentially trustworthy. In --site-per-process, instead of using the URL for a sandboxed origin, we save the necessary information (the potential-trustworthiness) at the time that the origin becomes sandboxed. Based on https://codereview.chromium.org/1716303002/ BUG=571079 TEST=secureContexts/* layout tests with --site-per-process CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/bd8e26fa87f192482bc35f5417a2616f85a5bde5 Cr-Commit-Position: refs/heads/master@{#381587}

Patch Set 1 #

Total comments: 6

Patch Set 2 : mkwst comments #

Patch Set 3 : rebase #

Total comments: 16

Patch Set 4 : rebase on https://codereview.chromium.org/1745333002/ #

Patch Set 5 : replicate unique origin flags on url::Origin #

Patch Set 6 : alexmos/mkwst comments #

Patch Set 7 : layout test tweaks, remove unnecessarily #include #

Total comments: 5

Patch Set 8 : replicate unique origin potentially trustworthiness #

Patch Set 9 : rebase #

Patch Set 10 : clean up #

Patch Set 11 : add unit tests back in #

Patch Set 12 : set flag on navigation #

Patch Set 13 : rebase #

Patch Set 14 : fix WebRemoteFrameImpl assert #

Total comments: 8

Patch Set 15 : alexmos comments #

Patch Set 16 : a couple missed flags to rename #

Total comments: 2

Patch Set 17 : update origin when setting sandbox flags #

Patch Set 18 : move isUniqueOriginPotentiallyTrustworthy to .cc #

Total comments: 6

Patch Set 19 : alexmos comments #

Total comments: 4

Patch Set 20 : alexmos nits #

Patch Set 21 : rebase #

Patch Set 22 : rebase fixup #

Patch Set 23 : more rebase fixups #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -104 lines) Patch
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +13 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 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 11 12 13 14 15 16 17 18 19 20 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 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 13 14 15 16 17 18 19 20 1 chunk +5 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +15 lines, -1 line 0 comments Download
M content/common/frame_replication_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -1 line 0 comments Download
M content/common/frame_replication_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/render_frame_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +7 lines, -1 line 0 comments Download
M media/blink/webencryptedmediaclient_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -2 lines 0 comments Download
M media/blink/webmediaplayer_util.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/site-per-process View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated.html View 1 2 3 4 8 2 chunks +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_sandbox.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -12 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_srcdoc.html View 1 2 3 4 5 6 8 2 chunks +7 lines, -16 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/dynamically-sandbox-and-iframe-https.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +25 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/secureContexts/resources/post-securecontext-status-on-msg.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/secureContexts/unauthenticated.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/secureContexts/unauthenticated_sandbox.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +11 lines, -5 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/security/secureContexts/unauthenticated_srcdoc.html View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 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 13 14 15 16 17 18 19 20 1 chunk +2 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 13 14 15 16 17 18 19 20 21 22 4 chunks +34 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +37 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/SecurityContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/SecurityContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebSecurityOrigin.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebSecurityOrigin.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRemoteFrame.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (17 generated)
estark
Mike, Alex, could you please take a look at this CL for OOPIF-ifying Document::isSecureContext()? The ...
4 years, 10 months ago (2016-02-23 21:45:52 UTC) #3
Mike West
https://codereview.chromium.org/1723753002/diff/1/third_party/WebKit/Source/core/dom/SecurityContext.cpp File third_party/WebKit/Source/core/dom/SecurityContext.cpp (right): https://codereview.chromium.org/1723753002/diff/1/third_party/WebKit/Source/core/dom/SecurityContext.cpp#newcode81 third_party/WebKit/Source/core/dom/SecurityContext.cpp:81: ASSERT(securityOrigin()); On 2016/02/23 at 21:45:52, estark wrote: > I'm ...
4 years, 10 months ago (2016-02-24 08:40:59 UTC) #4
estark
Thanks Mike. I'm also adding dcheng: I'm curious what you think of this patch because ...
4 years, 10 months ago (2016-02-24 21:59:52 UTC) #6
dcheng
https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode4929 third_party/WebKit/Source/core/dom/Document.cpp:4929: // will adjust it to be a unique origin ...
4 years, 10 months ago (2016-02-24 22:11:30 UTC) #7
estark
https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode4929 third_party/WebKit/Source/core/dom/Document.cpp:4929: // will adjust it to be a unique origin ...
4 years, 10 months ago (2016-02-24 22:14:51 UTC) #8
dcheng
On 2016/02/24 at 22:14:51, estark wrote: > https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp > File third_party/WebKit/Source/core/dom/Document.cpp (right): > > https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode4929 ...
4 years, 10 months ago (2016-02-24 22:17:26 UTC) #9
Mike West
LGTM % nits. Thanks for taking another pass, Emily! https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_sandbox.html File third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_sandbox.html (right): https://codereview.chromium.org/1723753002/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_sandbox.html#newcode4 third_party/WebKit/LayoutTests/http/tests/security/secureContexts/authenticated_sandbox.html:4: ...
4 years, 10 months ago (2016-02-25 11:58:11 UTC) #10
alexmos
I've started going through this and will send other comments a bit later, but I ...
4 years, 10 months ago (2016-02-26 02:02:50 UTC) #11
alexmos
These changes look good, but I'm a bit confused about whether we also need to ...
4 years, 10 months ago (2016-02-26 19:21:57 UTC) #12
estark
Ok, thanks for the comments Alex and Mike. I've made some changes: 1.) As Alex ...
4 years, 9 months ago (2016-03-01 02:59:26 UTC) #16
alexmos
Thanks for taking another pass, Emily! I'll defer to Mike on whether this is ok ...
4 years, 9 months ago (2016-03-01 23:32:33 UTC) #17
Mike West
https://codereview.chromium.org/1723753002/diff/180001/url/origin.h File url/origin.h (right): https://codereview.chromium.org/1723753002/diff/180001/url/origin.h#newcode132 url/origin.h:132: } Not LGTM, sorry. This isn't going to fly. ...
4 years, 9 months ago (2016-03-02 14:02:57 UTC) #18
estark
Ok, I've taken another crack at this following Mike's stamp of doom. :) I realized ...
4 years, 9 months ago (2016-03-08 06:15:18 UTC) #22
Mike West
On 2016/03/08 at 06:15:18, estark wrote: > Ok, I've taken another crack at this following ...
4 years, 9 months ago (2016-03-08 11:04:58 UTC) #23
alexmos
This looks good, though a couple of high-level questions about the new replication IPCs: - ...
4 years, 9 months ago (2016-03-09 18:45:06 UTC) #24
estark
Thanks for taking another look. On 2016/03/09 18:45:06, alexmos wrote: > This looks good, though ...
4 years, 9 months ago (2016-03-10 00:53:22 UTC) #26
estark
https://codereview.chromium.org/1723753002/diff/180001/third_party/WebKit/Source/core/dom/DocumentTest.cpp File third_party/WebKit/Source/core/dom/DocumentTest.cpp (right): https://codereview.chromium.org/1723753002/diff/180001/third_party/WebKit/Source/core/dom/DocumentTest.cpp#newcode379 third_party/WebKit/Source/core/dom/DocumentTest.cpp:379: EXPECT_FALSE(document().securityOrigin()->isPotentiallyTrustworthy()); On 2016/03/09 18:45:06, alexmos wrote: > It seems ...
4 years, 9 months ago (2016-03-10 00:53:44 UTC) #27
alexmos
> On 2016/03/09 18:45:06, alexmos wrote: > > This looks good, though a couple of ...
4 years, 9 months ago (2016-03-10 06:13:47 UTC) #28
estark
On 2016/03/10 06:13:47, alexmos wrote: > > On 2016/03/09 18:45:06, alexmos wrote: > > > ...
4 years, 9 months ago (2016-03-14 19:48:57 UTC) #29
estark
https://codereview.chromium.org/1723753002/diff/400001/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h File third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h (right): https://codereview.chromium.org/1723753002/diff/400001/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h#newcode257 third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h:257: } On 2016/03/10 06:13:47, alexmos wrote: > nit: move ...
4 years, 9 months ago (2016-03-14 19:49:11 UTC) #30
alexmos
Thanks, Emily! Adding Nasko for my question below and to start a content/ owners review. ...
4 years, 9 months ago (2016-03-14 22:20:37 UTC) #32
estark
https://codereview.chromium.org/1723753002/diff/440001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1723753002/diff/440001/content/browser/frame_host/render_frame_host_impl.cc#newcode1482 content/browser/frame_host/render_frame_host_impl.cc:1482: frame_tree_node()->SetCurrentOrigin(origin, On 2016/03/14 22:20:36, alexmos wrote: > I know ...
4 years, 9 months ago (2016-03-15 01:04:41 UTC) #33
alexmos
LGTM. I'm ok landing this now and ripping out the <meta> sandbox support next. Thanks ...
4 years, 9 months ago (2016-03-15 06:44:34 UTC) #34
nasko
LGTM once alexmos@'s nits are addressed.
4 years, 9 months ago (2016-03-16 18:28:46 UTC) #35
estark
Thanks for all the reviews. Especially alexmos! https://codereview.chromium.org/1723753002/diff/460001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/1723753002/diff/460001/content/common/frame_messages.h#newcode959 content/common/frame_messages.h:959: // Sent ...
4 years, 9 months ago (2016-03-16 20:02:52 UTC) #36
estark
csharrison: can you please review changes in media/?
4 years, 9 months ago (2016-03-16 20:21:00 UTC) #38
estark
Oops, I added the wrong person. chcunningham: can you please review changes in media/?
4 years, 9 months ago (2016-03-16 20:31:19 UTC) #40
chcunningham
Media LGTM
4 years, 9 months ago (2016-03-16 21:36:04 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1723753002/540001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1723753002/540001
4 years, 9 months ago (2016-03-16 22:03:53 UTC) #44
commit-bot: I haz the power
Committed patchset #23 (id:540001)
4 years, 9 months ago (2016-03-16 23:30:53 UTC) #46
commit-bot: I haz the power
4 years, 9 months ago (2016-03-16 23:32:00 UTC) #48
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/bd8e26fa87f192482bc35f5417a2616f85a5bde5
Cr-Commit-Position: refs/heads/master@{#381587}

Powered by Google App Engine
This is Rietveld 408576698