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

Issue 23684033: Fix device policy recovery on CrOS login (Closed)

Created:
7 years, 3 months ago by tbarzic
Modified:
7 years, 3 months ago
CC:
chromium-reviews, native-client-reviews_googlegroups.com, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Fix device policy recovery on CrOS login If the device policy file cannot be loaded on login, the device enters a state where it allows login process to proceed only if the user logging in is the owner. To be able to successfully determine if the user is owner, parallel authenticator has to wait until the certificates are loaded by CertLoader. The problem is that the CertLoader starts loading the certificates _after_ the user actually logs in. So if the authenticator actually waited for the owner status to be resolved, the login would hang. This CL adds another state to LoginState::LoggedInState enum (SAFE_MODE) in which CertLoader will be allowed to start loading the certificates. When the authenticator detects the policy file corruption, it changes login state to SAFE MODE (which triggers the certificate loading) and waits for the DeviceSettingsService to determine whether the current user is the owner. Also, removed LoginState::GetLoggedInState. Replaced it's pre-existing usages with LoginState::IsUserLoggedIn; and added LoginState::IsInSafeMode to be used here. BUG=285450 TEST= 1. manually remove device policy file 2. try logging in to a non-owner account -> should fail 3. try logging in to the owner account -> should succeed 4. try logging in to a non-owner account again -> should succeed Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223168

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : rebase #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 6

Patch Set 12 : . #

Patch Set 13 : rebase #

Patch Set 14 : . #

Patch Set 15 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -63 lines) Patch
M chrome/browser/chromeos/login/parallel_authenticator.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/parallel_authenticator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/login/parallel_authenticator_unittest.cc View 1 2 3 4 5 6 7 6 chunks +21 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/ash_system_tray_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/internet_options_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chromeos/cert_loader.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chromeos/cert_loader.cc View 1 2 3 4 3 chunks +11 lines, -7 lines 0 comments Download
M chromeos/login/login_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -7 lines 0 comments Download
M chromeos/login/login_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 14 2 chunks +10 lines, -9 lines 0 comments Download
M chromeos/login/login_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +54 lines, -12 lines 0 comments Download
M chromeos/network/network_connection_handler.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chromeos/network/network_connection_handler.cc View 1 2 3 4 5 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
tbarzic
Please, take a look. Steven: an owner for chromeos/ Dmitry: an owner for login flow
7 years, 3 months ago (2013-09-11 23:52:31 UTC) #1
stevenjb
https://codereview.chromium.org/23684033/diff/60001/chromeos/login/login_state.h File chromeos/login/login_state.h (right): https://codereview.chromium.org/23684033/diff/60001/chromeos/login/login_state.h#newcode60 chromeos/login/login_state.h:60: // Returns true if an user is considered to ...
7 years, 3 months ago (2013-09-12 00:48:01 UTC) #2
tbarzic
https://codereview.chromium.org/23684033/diff/60001/chromeos/login/login_state.h File chromeos/login/login_state.h (right): https://codereview.chromium.org/23684033/diff/60001/chromeos/login/login_state.h#newcode60 chromeos/login/login_state.h:60: // Returns true if an user is considered to ...
7 years, 3 months ago (2013-09-12 01:18:12 UTC) #3
stevenjb
lgtm
7 years, 3 months ago (2013-09-12 17:01:10 UTC) #4
Dmitry Polukhin
lgtm
7 years, 3 months ago (2013-09-12 17:18:43 UTC) #5
pastarmovj
lgtm. I remember we actually shuffled some code back then to make the keystore start ...
7 years, 3 months ago (2013-09-13 10:13:30 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tbarzic@chromium.org/23684033/74001
7 years, 3 months ago (2013-09-13 18:47:08 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tbarzic@chromium.org/23684033/6001
7 years, 3 months ago (2013-09-13 18:56:41 UTC) #8
commit-bot: I haz the power
7 years, 3 months ago (2013-09-13 23:36:40 UTC) #9
Message was sent while issue was closed.
Change committed as 223168

Powered by Google App Engine
This is Rietveld 408576698