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

Issue 520213002: Make SecurityContext available in RemoteFrames. (Closed)

Created:
6 years, 3 months ago by alexmos
Modified:
6 years, 1 month ago
Reviewers:
Nate Chapin, dcheng, nasko
CC:
blink-reviews, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Make SecurityContext available in RemoteFrames. With OOPIF, many security checks need to access SecurityContexts of RemoteFrames. This CL is the first step to make this possible. It introduces a SecurityContext accessor for Frames. LocalFrames redirect it to document(), and RemoteFrames return a new RemoteSecurityContext. A RemoteSecurityContext's origin is initialized using data replicated from the browser process, and its CSP is a default/empty policy (CSP is not replicated because it is moving to the browser process). More information: https://docs.google.com/a/chromium.org/document/d/1Y0s76YK0ziiL8hddiFlNUyAF4hqRAGpZM8cfnnLsZPg/edit#heading=h.lrzgurbjttfm The Chromium side of this CL is: https://codereview.chromium.org/692973005/ BUG=426512 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185684

Patch Set 1 #

Patch Set 2 : Fix style #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 13

Patch Set 7 : Review feedback from Daniel, expose securityOrigin() from WebFrame #

Total comments: 6

Patch Set 8 : More feedback from Daniel #

Total comments: 9

Patch Set 9 : Address Nasko's nits #

Patch Set 10 : Switch WebFrame::securityOrigin to use toCoreFrame #

Patch Set 11 : Remove WebSecurityOrigin::createUnique #

Patch Set 12 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -0 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/dom/RemoteSecurityContext.h View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download
A Source/core/dom/RemoteSecurityContext.cpp View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
M Source/core/frame/Frame.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/frame/LocalFrame.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/frame/RemoteFrame.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download
M Source/core/frame/RemoteFrame.cpp View 1 2 3 4 5 6 7 3 chunks +7 lines, -0 lines 0 comments Download
M Source/web/WebFrame.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M Source/web/WebRemoteFrameImpl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/WebRemoteFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M public/web/WebFrame.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M public/web/WebRemoteFrame.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
alexmos
Hey Daniel, could you please review this CL, which is the first step towards enabling ...
6 years, 1 month ago (2014-11-11 23:44:26 UTC) #2
dcheng
https://codereview.chromium.org/520213002/diff/100001/Source/core/dom/RemoteSecurityContext.h File Source/core/dom/RemoteSecurityContext.h (right): https://codereview.chromium.org/520213002/diff/100001/Source/core/dom/RemoteSecurityContext.h#newcode12 Source/core/dom/RemoteSecurityContext.h:12: class RemoteSecurityContext: public SecurityContext, public RefCounted<RemoteSecurityContext> { Nit: space ...
6 years, 1 month ago (2014-11-12 21:55:50 UTC) #3
dcheng
https://codereview.chromium.org/520213002/diff/100001/Source/core/dom/RemoteSecurityContext.cpp File Source/core/dom/RemoteSecurityContext.cpp (right): https://codereview.chromium.org/520213002/diff/100001/Source/core/dom/RemoteSecurityContext.cpp#newcode31 Source/core/dom/RemoteSecurityContext.cpp:31: securityContext->setContentSecurityPolicy(csp); Nit: I would just combine these two lines, ...
6 years, 1 month ago (2014-11-12 21:57:40 UTC) #4
alexmos
Daniel, PTAL. In addition to addressing your comments, I've also added similar plumbing to expose ...
6 years, 1 month ago (2014-11-18 18:35:18 UTC) #5
dcheng
https://codereview.chromium.org/520213002/diff/120001/Source/core/dom/RemoteSecurityContext.cpp File Source/core/dom/RemoteSecurityContext.cpp (right): https://codereview.chromium.org/520213002/diff/120001/Source/core/dom/RemoteSecurityContext.cpp#newcode30 Source/core/dom/RemoteSecurityContext.cpp:30: securityContext->setContentSecurityPolicy(ContentSecurityPolicy::create()); I'd probably move lines 23-30 to the constructor ...
6 years, 1 month ago (2014-11-18 23:31:40 UTC) #6
alexmos
Thanks for the review! https://codereview.chromium.org/520213002/diff/120001/Source/core/dom/RemoteSecurityContext.cpp File Source/core/dom/RemoteSecurityContext.cpp (right): https://codereview.chromium.org/520213002/diff/120001/Source/core/dom/RemoteSecurityContext.cpp#newcode30 Source/core/dom/RemoteSecurityContext.cpp:30: securityContext->setContentSecurityPolicy(ContentSecurityPolicy::create()); On 2014/11/18 23:31:40, dcheng ...
6 years, 1 month ago (2014-11-19 00:33:04 UTC) #7
dcheng
https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h File Source/web/WebLocalFrameImpl.h (right): https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h#newcode85 Source/web/WebLocalFrameImpl.h:85: virtual WebSecurityOrigin securityOrigin() const override; Just curious: what are ...
6 years, 1 month ago (2014-11-19 00:53:55 UTC) #8
nasko
Just a few drive-by nits. https://codereview.chromium.org/520213002/diff/140001/Source/core/dom/RemoteSecurityContext.cpp File Source/core/dom/RemoteSecurityContext.cpp (right): https://codereview.chromium.org/520213002/diff/140001/Source/core/dom/RemoteSecurityContext.cpp#newcode25 Source/core/dom/RemoteSecurityContext.cpp:25: // TODO(alexmos): Document::initSecurityContext has ...
6 years, 1 month ago (2014-11-19 01:16:09 UTC) #10
alexmos
https://codereview.chromium.org/520213002/diff/140001/Source/core/dom/RemoteSecurityContext.cpp File Source/core/dom/RemoteSecurityContext.cpp (right): https://codereview.chromium.org/520213002/diff/140001/Source/core/dom/RemoteSecurityContext.cpp#newcode25 Source/core/dom/RemoteSecurityContext.cpp:25: // TODO(alexmos): Document::initSecurityContext has a few other things we ...
6 years, 1 month ago (2014-11-19 18:19:19 UTC) #11
dcheng
https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h File Source/web/WebLocalFrameImpl.h (right): https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h#newcode85 Source/web/WebLocalFrameImpl.h:85: virtual WebSecurityOrigin securityOrigin() const override; On 2014/11/19 18:19:19, alexmos ...
6 years, 1 month ago (2014-11-19 18:28:38 UTC) #12
alexmos
On 2014/11/19 18:28:38, dcheng wrote: > https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h > File Source/web/WebLocalFrameImpl.h (right): > > https://codereview.chromium.org/520213002/diff/140001/Source/web/WebLocalFrameImpl.h#newcode85 > ...
6 years, 1 month ago (2014-11-19 19:50:12 UTC) #13
dcheng
lgtm
6 years, 1 month ago (2014-11-19 22:13:40 UTC) #14
alexmos
Nate, can you please review this CL for Source/web and public/web OWNERS approval?
6 years, 1 month ago (2014-11-20 00:45:19 UTC) #16
Nate Chapin
lgtm
6 years, 1 month ago (2014-11-20 17:08:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/520213002/220001
6 years, 1 month ago (2014-11-20 17:59:45 UTC) #19
commit-bot: I haz the power
6 years, 1 month ago (2014-11-20 18:08:50 UTC) #20
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=185684

Powered by Google App Engine
This is Rietveld 408576698