Commit ea3a9c77 authored by May Lippert's avatar May Lippert Committed by Commit Bot

Remove enrolled device check for saving login password.

Allow managed users logging into their own device to use their
login password for automatically authenticating to networks.

BUG=chromium:386606
TEST=run unit tests, manual test on kevin

Change-Id: I023472e12abaa39a03ea445358f68a7c1afa9391
Reviewed-on: https://chromium-review.googlesource.com/1058598Reviewed-by: default avatarMattias Nissler <mnissler@chromium.org>
Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Commit-Queue: May Lippert <maybelle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563155}
parent c742cfeb
...@@ -1082,17 +1082,6 @@ void UserSessionManager::StartCrosSession() { ...@@ -1082,17 +1082,6 @@ void UserSessionManager::StartCrosSession() {
} }
void UserSessionManager::OnUserNetworkPolicyParsed(bool send_password) { void UserSessionManager::OnUserNetworkPolicyParsed(bool send_password) {
// Sanity check that we only send the password for enterprise users. See
// https://crbug.com/386606.
const bool is_enterprise_managed = g_browser_process->platform_part()
->browser_policy_connector_chromeos()
->IsEnterpriseManaged();
if (!is_enterprise_managed) {
LOG(WARNING) << "Attempting to save user password for non enterprise user.";
user_context_.GetMutablePasswordKey()->ClearSecret();
return;
}
if (send_password) { if (send_password) {
if (user_context_.GetPasswordKey()->GetSecret().size() > 0) { if (user_context_.GetPasswordKey()->GetSecret().size() > 0) {
DBusThreadManager::Get()->GetSessionManagerClient()->SaveLoginPassword( DBusThreadManager::Get()->GetSessionManagerClient()->SaveLoginPassword(
......
...@@ -738,13 +738,9 @@ void GaiaScreenHandler::HandleCompleteAuthentication( ...@@ -738,13 +738,9 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
UserContext user_context(user_type, UserContext user_context(user_type,
GetAccountId(email, gaia_id, AccountType::GOOGLE)); GetAccountId(email, gaia_id, AccountType::GOOGLE));
user_context.SetKey(Key(password)); user_context.SetKey(Key(password));
// Only save the password for enterprise users. See https://crbug.com/386606. // Save the user's plaintext password for possible authentication to a
const bool is_enterprise_managed = g_browser_process->platform_part() // network. See https://crbug.com/386606 for details.
->browser_policy_connector_chromeos() user_context.SetPasswordKey(Key(password));
->IsEnterpriseManaged();
if (is_enterprise_managed) {
user_context.SetPasswordKey(Key(password));
}
user_context.SetAuthCode(auth_code); user_context.SetAuthCode(auth_code);
user_context.SetAuthFlow(using_saml user_context.SetAuthFlow(using_saml
? UserContext::AUTH_FLOW_GAIA_WITH_SAML ? UserContext::AUTH_FLOW_GAIA_WITH_SAML
......
...@@ -1229,13 +1229,9 @@ void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id, ...@@ -1229,13 +1229,9 @@ void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id,
user_context = UserContext(*user); user_context = UserContext(*user);
} }
user_context.SetKey(Key(password)); user_context.SetKey(Key(password));
// Only save the password for enterprise users. See https://crbug.com/386606. // Save the user's plaintext password for possible authentication to a
const bool is_enterprise_managed = g_browser_process->platform_part() // network. See https://crbug.com/386606 for details.
->browser_policy_connector_chromeos() user_context.SetPasswordKey(Key(password));
->IsEnterpriseManaged();
if (is_enterprise_managed) {
user_context.SetPasswordKey(Key(password));
}
user_context.SetIsUsingPin(authenticated_by_pin); user_context.SetIsUsingPin(authenticated_by_pin);
if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY && if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY &&
(user_context.GetUserType() != (user_context.GetUserType() !=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment