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

Issue 117263002: Prevent ONC-pushed certificates from being used with multiprofiles. (Closed)

Created:
7 years ago by Joao da Silva
Modified:
7 years ago
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, kalyank, stevenjb+watch_chromium.org, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Prevent ONC-pushed certificates from being used with multiprofiles. If a profile uses ONC-pushed certificates then it can't be part of a multiprofile session for security reasons. This change enforces that: - if ONC-pushed certificates are in use then multiprofiles is disabled; - if a multiprofile session is ongoing then updates to the certificates pushed by ONC are ignored until the next restart; - a profile that already used an ONC-pushed certificate before can not join a multiprofile session. The last point required moving the "tainted" signal from the profile's prefs into local_state, so that it can be checked before the profile is loaded and added to the session. BUG=323854 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=241857

Patch Set 1 #

Total comments: 27

Patch Set 2 : added unittest #

Patch Set 3 : addressed comments #

Total comments: 3

Patch Set 4 : fixed login_utils_browsertest #

Total comments: 8

Patch Set 5 : addressed comments, more tests #

Total comments: 6

Patch Set 6 : fixed comment #

Total comments: 5

Patch Set 7 : Philipps suggestion, another test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -34 lines) Patch
M chrome/browser/chromeos/login/fake_user_manager.h View 1 2 3 4 4 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/fake_user_manager.cc View 1 2 3 4 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/multi_profile_user_controller.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/multi_profile_user_controller.cc View 1 2 3 4 5 6 4 chunks +32 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/login/multi_profile_user_controller_unittest.cc View 1 2 3 4 5 6 6 chunks +94 lines, -1 line 1 comment Download
M chrome/browser/chromeos/login/user_manager_impl.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/policy/policy_cert_service.h View 1 2 3 4 5 6 4 chunks +21 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/policy/policy_cert_service.cc View 1 2 3 4 5 6 4 chunks +43 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/policy/policy_cert_service_factory.h View 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/policy_cert_service_factory.cc View 1 2 3 4 4 chunks +74 lines, -4 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Joao da Silva
Please have a look: @Philipp: policy/ @Nikita: login/ and chromeos @James: ui/ash/ Thanks!
7 years ago (2013-12-17 14:21:10 UTC) #1
pneubeck (no reviews)
the only non-nit comment is: if user B has tainted his profile prior M33, device ...
7 years ago (2013-12-17 15:25:31 UTC) #2
Joao da Silva
Philipp, PTAL. The case you found isn't easy to prevent, but isn't common either; see ...
7 years ago (2013-12-17 16:36:40 UTC) #3
Bernhard Bauer
chrome/browser/prefs LGTM
7 years ago (2013-12-17 16:54:41 UTC) #4
James Cook
+skuhne, can you take a look at c/b/ui/ash? https://codereview.chromium.org/117263002/diff/40001/chrome/browser/ui/ash/chrome_shell_delegate.cc File chrome/browser/ui/ash/chrome_shell_delegate.cc (right): https://codereview.chromium.org/117263002/diff/40001/chrome/browser/ui/ash/chrome_shell_delegate.cc#newcode82 chrome/browser/ui/ash/chrome_shell_delegate.cc:82: chromeos::User* ...
7 years ago (2013-12-17 17:19:45 UTC) #5
James Cook
really +skuhne this time
7 years ago (2013-12-17 17:20:04 UTC) #6
Mr4D (OOO till 08-26)
Please have a look! https://codereview.chromium.org/117263002/diff/40001/chrome/browser/ui/ash/chrome_shell_delegate.cc File chrome/browser/ui/ash/chrome_shell_delegate.cc (right): https://codereview.chromium.org/117263002/diff/40001/chrome/browser/ui/ash/chrome_shell_delegate.cc#newcode82 chrome/browser/ui/ash/chrome_shell_delegate.cc:82: chromeos::User* active = chromeos::UserManager::Get()->GetActiveUser(); Would ...
7 years ago (2013-12-17 17:39:34 UTC) #7
pneubeck (no reviews)
lgtm you could add a bug for removing the migration code. when you do manual ...
7 years ago (2013-12-17 17:57:00 UTC) #8
Nikita (slow)
https://codereview.chromium.org/117263002/diff/40001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/40001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode86 chrome/browser/chromeos/login/multi_profile_user_controller.cc:86: if (policy::PolicyCertServiceFactory::UsedPolicyCertificates(user_email)) What if you have primary user in ...
7 years ago (2013-12-17 18:42:04 UTC) #9
Joao da Silva
Moved all the logic to MultiProfileUserController, so it's all available in one place and easier ...
7 years ago (2013-12-17 20:44:20 UTC) #10
James Cook
-me since I don't own any code in this CL anymore. Re-add me if you ...
7 years ago (2013-12-17 20:47:11 UTC) #11
Mr4D (OOO till 08-26)
lgtm - looks like that c/b/ui/ash went away
7 years ago (2013-12-17 22:16:39 UTC) #12
pneubeck (no reviews)
lgtm (your choice to go with the current usage of the service in the test ...
7 years ago (2013-12-18 09:11:07 UTC) #13
Joao da Silva
Ready to land if Nikita acks the login/ changes. https://codereview.chromium.org/117263002/diff/50001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/50001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode135 chrome/browser/chromeos/login/multi_profile_user_controller.cc:135: ...
7 years ago (2013-12-18 09:40:12 UTC) #14
pneubeck (no reviews)
https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode99 chrome/browser/chromeos/login/multi_profile_user_controller.cc:99: service->has_policy_certificates())) { another nit: if the service does not ...
7 years ago (2013-12-18 13:21:29 UTC) #15
Joao da Silva
https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode99 chrome/browser/chromeos/login/multi_profile_user_controller.cc:99: service->has_policy_certificates())) { On 2013/12/18 13:21:30, pneubeck wrote: > another ...
7 years ago (2013-12-19 09:13:23 UTC) #16
pneubeck (no reviews)
https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode99 chrome/browser/chromeos/login/multi_profile_user_controller.cc:99: service->has_policy_certificates())) { On 2013/12/19 09:13:24, Joao da Silva wrote: ...
7 years ago (2013-12-19 09:29:31 UTC) #17
Joao da Silva
https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc File chrome/browser/chromeos/login/multi_profile_user_controller.cc (right): https://codereview.chromium.org/117263002/diff/70001/chrome/browser/chromeos/login/multi_profile_user_controller.cc#newcode99 chrome/browser/chromeos/login/multi_profile_user_controller.cc:99: service->has_policy_certificates())) { I see what you meant now, thanks. ...
7 years ago (2013-12-19 10:37:25 UTC) #18
Nikita (slow)
lgtm
7 years ago (2013-12-19 10:42:05 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/117263002/90001
7 years ago (2013-12-19 10:42:37 UTC) #20
pneubeck (no reviews)
https://codereview.chromium.org/117263002/diff/90001/chrome/browser/chromeos/login/multi_profile_user_controller_unittest.cc File chrome/browser/chromeos/login/multi_profile_user_controller_unittest.cc (right): https://codereview.chromium.org/117263002/diff/90001/chrome/browser/chromeos/login/multi_profile_user_controller_unittest.cc#newcode315 chrome/browser/chromeos/login/multi_profile_user_controller_unittest.cc:315: policy::PolicyCertVerifier verifier((base::Closure())); nit: PolicyCertVerifier not required in this test ...
7 years ago (2013-12-19 11:35:08 UTC) #21
commit-bot: I haz the power
7 years ago (2013-12-19 14:29:04 UTC) #22
Message was sent while issue was closed.
Change committed as 241857

Powered by Google App Engine
This is Rietveld 408576698