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

Issue 2816393002: Implement Connector::ApplySpec() & use to enforce navigation:frame (Closed)

Created:
3 years, 8 months ago by Ben Goodger (Google)
Modified:
3 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement Connector::ApplySpec() & use to enforce navigation:frame. Rather than having InterfaceRegistry in the Service Manager client library implement capability enforcement in the client library (which forces us to shunt around capability info), we've been trying to have the Service Manager itself do enforcement. This is straightforward for connection-level requests, but for frame interfaces we would like to apply this enforcement on a defined scope as specified in the manifest, where the requestor-requestee relationship is direct currently and doesn't include the service manager. Instead would like to route these requests through the service manager. This change adds a method to Connector() called ApplySpec which allows an InterfaceProviderSpec to be enforced on an InterfaceProvider&. The idea is: 1. some untrusted remote service calls in wanting an InterfaceProvider& to be bound. 2. target service wishes to have service manager control interface access on this IP& by some named spec. Forwards IP& to Service Manager and asks it to enforce named spec. As part of this it provides an IP back to itself that the Service Manager can forward allowed requests to. 3. SM performs filtering, forwarding permitted requests on to target service. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2816393002 Cr-Commit-Position: refs/heads/master@{#467415} Committed: https://chromium.googlesource.com/chromium/src/+/b932d5ad0c349295c9d10de144f9358370e57b5c

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 2

Patch Set 8 : . #

Patch Set 9 : . #

Total comments: 14

Patch Set 10 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -102 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 4 chunks +9 lines, -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 2 chunks +17 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 2 3 4 5 3 chunks +3 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 4 chunks +10 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -13 lines 0 comments Download
M headless/lib/browser/headless_tab_socket_impl.h View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M headless/lib/headless_web_contents_browsertest.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/connector.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/lib/connector_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/lib/connector_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M services/service_manager/public/interfaces/connector.mojom View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M services/service_manager/service_manager.cc View 1 2 3 4 5 6 7 8 9 7 chunks +160 lines, -75 lines 0 comments Download

Messages

Total messages: 55 (40 generated)
Ben Goodger (Google)
3 years, 8 months ago (2017-04-25 23:32:45 UTC) #26
Tom Sepez
https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom File services/service_manager/public/interfaces/connector.mojom (right): https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom#newcode168 services/service_manager/public/interfaces/connector.mojom:168: ApplySpec(string spec, I'm a little worried about parsing this ...
3 years, 8 months ago (2017-04-25 23:51:20 UTC) #27
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom File services/service_manager/public/interfaces/connector.mojom (right): https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom#newcode168 services/service_manager/public/interfaces/connector.mojom:168: ApplySpec(string spec, On 2017/04/25 at 23:51:20, Tom Sepez wrote: ...
3 years, 8 months ago (2017-04-26 00:06:34 UTC) #28
Ben Goodger (Google)
On 2017/04/26 00:06:34, Ken Rockot wrote: > https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom > File services/service_manager/public/interfaces/connector.mojom (right): > > https://codereview.chromium.org/2816393002/diff/120001/services/service_manager/public/interfaces/connector.mojom#newcode168 ...
3 years, 8 months ago (2017-04-26 02:26:40 UTC) #31
Ben Goodger (Google)
On 2017/04/26 02:26:40, Ben Goodger (Google) wrote: > On 2017/04/26 00:06:34, Ken Rockot wrote: > ...
3 years, 8 months ago (2017-04-26 02:36:05 UTC) #34
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc#newcode3336 content/browser/frame_host/render_frame_host_impl.cc:3336: BrowserContext::GetServiceUserIdFor(GetProcess()->GetBrowserContext())); Weird - why wouldn't this already be set ...
3 years, 8 months ago (2017-04-26 04:32:48 UTC) #39
Tom Sepez
Next question: Until the ApplySpec() message arrives, do requests for the IP all fail?
3 years, 8 months ago (2017-04-26 16:21:19 UTC) #40
Tom Sepez
https://codereview.chromium.org/2816393002/diff/160001/services/service_manager/public/interfaces/connector.mojom File services/service_manager/public/interfaces/connector.mojom (right): https://codereview.chromium.org/2816393002/diff/160001/services/service_manager/public/interfaces/connector.mojom#newcode179 services/service_manager/public/interfaces/connector.mojom:179: ApplySpec(string spec, On 2017/04/26 04:32:48, Ken Rockot wrote: > ...
3 years, 8 months ago (2017-04-26 16:22:36 UTC) #41
Ken Rockot(use gerrit already)
On 2017/04/26 at 16:21:19, tsepez wrote: > Next question: Until the ApplySpec() message arrives, do ...
3 years, 8 months ago (2017-04-26 16:25:47 UTC) #42
Ben Goodger (Google)
https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc#newcode3336 content/browser/frame_host/render_frame_host_impl.cc:3336: BrowserContext::GetServiceUserIdFor(GetProcess()->GetBrowserContext())); On 2017/04/26 04:32:48, Ken Rockot wrote: > Weird ...
3 years, 8 months ago (2017-04-26 17:00:07 UTC) #43
Ben Goodger (Google)
Updated per other comments. https://codereview.chromium.org/2816393002/diff/160001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2816393002/diff/160001/content/renderer/render_frame_impl.cc#newcode1319 content/renderer/render_frame_impl.cc:1319: void RenderFrameImpl::GetInterface( On 2017/04/26 17:00:07, ...
3 years, 8 months ago (2017-04-26 17:26:59 UTC) #44
Tom Sepez
lgtm
3 years, 8 months ago (2017-04-26 17:39:08 UTC) #47
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2816393002/diff/160001/content/browser/frame_host/render_frame_host_impl.cc#newcode3336 content/browser/frame_host/render_frame_host_impl.cc:3336: BrowserContext::GetServiceUserIdFor(GetProcess()->GetBrowserContext())); On 2017/04/26 at 17:00:07, Ben Goodger (Google) ...
3 years, 8 months ago (2017-04-26 17:39:19 UTC) #48
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/2816393002/180001
3 years, 8 months ago (2017-04-26 19:26:59 UTC) #52
commit-bot: I haz the power
3 years, 8 months ago (2017-04-26 19:40:37 UTC) #55
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/b932d5ad0c349295c9d10de144f9...

Powered by Google App Engine
This is Rietveld 408576698