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

Issue 1719193003: Add a user id parameter to connections (Closed)

Created:
4 years, 10 months ago by Ben Goodger (Google)
Modified:
4 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a user id parameter to connections. This is simply a uint32 that identifies the user running a particular instance. Note that the shell cares nothing about higher level semantic meaning/mapping of this identifier. That's for a user service to perform. An application that connects to another specifies the user id they wish the target to be run as. This can either be a specific user, the root user, or "inherit" which means either their own identity or root, whichever is available in that order. The application manager resolves "inherit" to the source identity or the root identity, and initializes & completes the connection. When a target application is initialized, the shell tells it (via Initialize()) the identity it is run as. When a target application receives an inbound connection, the shell tells it (via AcceptConnection) the identity of the caller. This allows a service run as root to service connections from other users, and create facades scoped to that user. Long term, only specific applications will be able to pass anything other than "inherit" as the user id. (e.g. the login app and the profile creator app). This isn't done in this CL. I need to add some tests for this, along with the rest of the shell stuff. TBD. R=sky@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/a16b491f249de01d84114889f2ea3a8aea966413 Cr-Commit-Position: refs/heads/master@{#377239}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 3

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+318 lines, -206 lines) Patch
M ash/mus/sysui_application.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ash/mus/sysui_application.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M components/filesystem/file_system_app.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/filesystem/file_system_app.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/font_service/font_service_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/font_service/font_service_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/leveldb/leveldb_app.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M components/leveldb/leveldb_app.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M components/mus/mus_app.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/mus/mus_app.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M components/resource_provider/resource_provider_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/resource_provider/resource_provider_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/frame_mojo_shell.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/frame_mojo_shell.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/mojo/mojo_shell_context.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/common/mojo/mojo_shell_connection_impl.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/test_mojo_app.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/test_mojo_app.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M content/test/data/web_ui_mojo_shell_test.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M mash/browser_driver/browser_driver_application_delegate.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/browser_driver/browser_driver_application_delegate.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mash/example/views_examples/views_examples_application_delegate.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/example/views_examples/views_examples_application_delegate.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mash/example/window_type_launcher/window_type_launcher.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/example/window_type_launcher/window_type_launcher.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/quick_launch/quick_launch_application.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mash/quick_launch/quick_launch_application.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mash/screenlock/screenlock.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/screenlock/screenlock.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/shell/shell_application_delegate.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/shell/shell_application_delegate.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mash/task_viewer/task_viewer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/task_viewer/task_viewer.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/wm/window_manager_application.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mash/wm/window_manager_application.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/mojo_media_application.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/mojo_media_application.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mojo/services/network/network_service_delegate.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mojo/services/network/network_service_delegate.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/services/package_manager/package_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/services/package_manager/package_manager.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M mojo/services/test_service/test_request_tracker_application.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mojo/services/test_service/test_request_tracker_application.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mojo/services/test_service/test_service_application.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M mojo/services/test_service/test_service_application.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/application_instance.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M mojo/shell/application_instance.cc View 1 2 3 4 4 chunks +8 lines, -6 lines 0 comments Download
M mojo/shell/application_manager.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M mojo/shell/application_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +25 lines, -30 lines 0 comments Download
M mojo/shell/background/background_shell.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M mojo/shell/connect_params.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/shell/connect_params.cc View 1 2 3 4 1 chunk +4 lines, -12 lines 0 comments Download
M mojo/shell/connect_util.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M mojo/shell/identity.h View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -1 line 0 comments Download
M mojo/shell/identity.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -11 lines 0 comments Download
M mojo/shell/public/cpp/connection.h View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/shell/public/cpp/lib/application_test_base.cc View 8 9 10 11 3 chunks +6 lines, -2 lines 0 comments Download
M mojo/shell/public/cpp/lib/connection_impl.h View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M mojo/shell/public/cpp/lib/connection_impl.cc View 1 2 3 4 3 chunks +6 lines, -0 lines 0 comments Download
M mojo/shell/public/cpp/lib/shell_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/public/cpp/lib/shell_connection.cc View 1 2 3 4 3 chunks +12 lines, -7 lines 0 comments Download
M mojo/shell/public/cpp/shell.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/shell/public/cpp/shell_client.h View 1 chunk +8 lines, -3 lines 0 comments Download
M mojo/shell/public/cpp/shell_connection.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M mojo/shell/public/interfaces/shell.mojom View 1 2 3 4 5 6 7 1 chunk +48 lines, -22 lines 0 comments Download
M mojo/shell/public/interfaces/shell_client.mojom View 1 2 3 4 5 6 7 1 chunk +58 lines, -45 lines 0 comments Download
M mojo/shell/runner/child/native_apptest_target.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/standalone/context.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M mojo/shell/tests/application_manager_apptest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/shell/tests/application_manager_apptest_driver.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/tests/application_manager_apptest_target.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/tests/application_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -1 line 0 comments Download
M mojo/shell/tests/capability_filter_test.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/shell/tests/capability_filter_test.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M mojo/shell/tests/package_test_package.cc View 2 chunks +4 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (19 generated)
Ben Goodger (Google)
The interesting bits are in mojo/shell, the rest is mostly just a signature change to ...
4 years, 10 months ago (2016-02-23 19:18:31 UTC) #4
sky
LGTM with better comments about the ids, and run git cl format. https://codereview.chromium.org/1719193003/diff/120001/mojo/shell/identity.cc File mojo/shell/identity.cc ...
4 years, 10 months ago (2016-02-23 21:15:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1719193003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1719193003/140001
4 years, 10 months ago (2016-02-23 21:54:13 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/25991) cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 10 months ago (2016-02-23 22:16:55 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1719193003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1719193003/160001
4 years, 10 months ago (2016-02-23 22:22:54 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/120171) linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 10 months ago (2016-02-23 22:41:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1719193003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1719193003/180001
4 years, 10 months ago (2016-02-23 23:01:09 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/120212)
4 years, 10 months ago (2016-02-23 23:42:28 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1719193003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1719193003/220001
4 years, 10 months ago (2016-02-24 04:11:28 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/120395)
4 years, 10 months ago (2016-02-24 05:13:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1719193003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1719193003/240001
4 years, 10 months ago (2016-02-24 05:59:15 UTC) #28
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 10 months ago (2016-02-24 07:50:29 UTC) #30
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 07:51:30 UTC) #32
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/a16b491f249de01d84114889f2ea3a8aea966413
Cr-Commit-Position: refs/heads/master@{#377239}

Powered by Google App Engine
This is Rietveld 408576698