New issue
Advanced search Search tips

Issue 916859 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 901768



Sign in to add a comment

Prevent browser window creation in non browsing profiles (e.g. sign-in profile)

Project Member Reported by tbarzic@chromium.org, Dec 20

Issue description

Historically, we've had few security issues where browser windows opened on login screen in the sign-in profile were used for policy escape.

Given that browser windows do not have a use case on the login screen, we should make sure their creation in the sign-in profile is prevented all together (instead of relying on UI shown on login screen not providing elements that can be used to open a browser, which has been proven as flaky).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1076d92a2702b74521cabbf25765faaf78650f4b

commit 1076d92a2702b74521cabbf25765faaf78650f4b
Author: Toni Barzic <tbarzic@chromium.org>
Date: Thu Jan 03 00:31:26 2019

Do not open browser when testing sign-in extensions

SigninExtensionsDeviceCloudPolicyBrowserTests were opening a browser
window in Sign-in profile and running the test code in that context.
In general, browser windows should not be used in sign-in profile,
so we should not rely on this behavior in tests.

The test code is moved to the test extensions background page, and
run on runtime.onInstalled event (which should be dispatched on each
extension install event - note that running the tests in event listener
is not strictly necessary, but it gives better indication of the
reason the background page is loaded).

Given that in sign-in profile, background hosts are not allowed for
non-policy installed extensions, the test is updated to set up policy
to force install the test extension (which is packed into a CRX,
which is added to test data dir). Furthermore, the test extension is
transformed to an app, and whitelisted using whitelisted-extension-id
switch. This makes ScopedSigninScreenPolicyProviderDisabler
unnecessary.

PreinstalledSigninExtensionsDeviceCloudPolicyBrowserTest is dropped,
and the component policy caching is tested by running sign-in
extension device policy tests in two parts:
 * first, PRE_ManagedStorage test downloads the component policy from
   the tests server and runs the test extension (matches the logic in
   replaced InstallAndRunInWindow test)
 * the second, ManagedStorage test verifies that the downloaded policy
   is cached and usable after restart by throttling the component
   policy download request.

BUG=916859

Change-Id: Ia0748c2914649ea439664d748aca0bd5461a397f
Reviewed-on: https://chromium-review.googlesource.com/c/1379702
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619545}
[modify] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc
[add] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/test/data/extensions/signin_screen_managed_storage/extension.crx
[add] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/test/data/extensions/signin_screen_managed_storage/extension.pem
[add] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/test/data/extensions/signin_screen_managed_storage/extension/manifest.json
[rename] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/test/data/extensions/signin_screen_managed_storage/extension/schema.json
[add] https://crrev.com/1076d92a2702b74521cabbf25765faaf78650f4b/chrome/test/data/extensions/signin_screen_managed_storage/extension/test.js
[delete] https://crrev.com/71e2c3fd311e47c42854810a9195817981919e3c/chrome/test/data/extensions/signin_screen_managed_storage/manifest.json
[delete] https://crrev.com/71e2c3fd311e47c42854810a9195817981919e3c/chrome/test/data/extensions/signin_screen_managed_storage/test.html
[delete] https://crrev.com/71e2c3fd311e47c42854810a9195817981919e3c/chrome/test/data/extensions/signin_screen_managed_storage/test.js

Sign in to add a comment