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

Unified Diff: chrome/browser/chromeos/settings/session_manager_operation.cc

Issue 62453002: Don't verify the policy timestamp when loading from cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/settings/session_manager_operation.cc
diff --git a/chrome/browser/chromeos/settings/session_manager_operation.cc b/chrome/browser/chromeos/settings/session_manager_operation.cc
index c4fc8d132051ae0c9f17b39f5d03c3f8f14bc4db..5952a7d06774e55c0d19ba324f9ed6efd5b64f5b 100644
--- a/chrome/browser/chromeos/settings/session_manager_operation.cc
+++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
@@ -162,15 +162,23 @@ void SessionManagerOperation::ValidateDeviceSettings(
policy::DeviceCloudPolicyValidator::Create(policy.Pass(),
background_task_runner);
- // Policy auto-generated by session manager doesn't include a timestamp, so we
- // need to allow missing timestamps.
- const bool require_timestamp =
- policy_data_.get() && policy_data_->has_request_token();
+
+ // Policy auto-generated by session manager doesn't include a timestamp, so
+ // the timestamp shouldn't be verified in that case.
+ //
+ // Additionally, offline devices can get their clock set backwards in time
+ // under some hardware conditions; checking the timestamp now could likely
+ // find a value in the future, and prevent the user from signing-in or
+ // starting guest mode. Tlsdate will eventually fix the clock when the device
+ // is back online, but the network configuration may come from device ONC.
+ //
+ // To prevent all of these issues the timestamp is just not verified when
+ // loading the device policy from the cache. Note that the timestamp is still
+ // verified during enrollment and when a new policy if fetched from the
bartfab (slow) 2013/11/06 17:53:51 Nit: s/if/is/
+ // server.
validator->ValidateAgainstCurrentPolicy(
policy_data_.get(),
- require_timestamp ?
- policy::CloudPolicyValidatorBase::TIMESTAMP_REQUIRED :
- policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED,
+ policy::CloudPolicyValidatorBase::TIMESTAMP_NOT_REQUIRED,
policy::CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED);
validator->ValidatePolicyType(policy::dm_protocol::kChromeDevicePolicyType);
validator->ValidatePayload();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698