Bug 1642267 - Record the AutoAdminLogon and RequireSignon values in extra_keys so we can monitor these values regardless of success/fail for authentication attempts. r=MattN

Differential Revision: https://phabricator.services.mozilla.com/D77630
This commit is contained in:
Jared Wein 2020-06-01 06:18:55 +00:00
Родитель e9e007365d
Коммит 4ba829a85d
3 изменённых файлов: 22 добавлений и 11 удалений

Просмотреть файл

@ -1218,6 +1218,7 @@ this.LoginHelper = {
object: "os_auth", object: "os_auth",
method: "reauthenticate", method: "reauthenticate",
value: result.auth_details, value: result.auth_details,
extra: result.auth_details_extra,
}; };
return { return {
isAuthorized, isAuthorized,

Просмотреть файл

@ -642,17 +642,22 @@ pwmgr:
"success_disabled" is used when the feature is disabled. "success_disabled" is used when the feature is disabled.
"success_unsupported_platform" should be set when the user attempts to authenticate on an unsupported platform. "success_unsupported_platform" should be set when the user attempts to authenticate on an unsupported platform.
"success_no_password" should be used when the user doesn't have an OS password set. "success_no_password" should be used when the user doesn't have an OS password set.
"success_auto_admin_logon" should be used when the user has enabled the "AutoAdminLogon" registry key
"fail" should be used when the user cancels the authentication prompt or an unexpected exception is encountered. The user may or may not have provided an incorrect password before cancelling. "fail" should be used when the user cancels the authentication prompt or an unexpected exception is encountered. The user may or may not have provided an incorrect password before cancelling.
objects: [ objects: [
"master_password", "master_password",
"os_auth", "os_auth",
] ]
methods: ["reauthenticate"] methods: ["reauthenticate"]
extra_keys:
auto_admin: >
If the AutoAdminLogon Windows feature is enabled. This feature disables password prompt when logging in to Windows.
require_signon: >
If the Power Settings on Windows are configured to prompt for password upon resuming from sleep.
bug_numbers: bug_numbers:
- 1628029 - 1628029
- 1623745 - 1623745
- 1636729 - 1636729
- 1642267
expiry_version: never expiry_version: never
notification_emails: ["loines@mozilla.com", "passwords-dev@mozilla.org", "jaws@mozilla.com"] notification_emails: ["loines@mozilla.com", "passwords-dev@mozilla.org", "jaws@mozilla.com"]
release_channel_collection: opt-out release_channel_collection: opt-out

Просмотреть файл

@ -206,27 +206,27 @@ var OSKeyStore = {
unlockPromise = osReauthenticator unlockPromise = osReauthenticator
.asyncReauthenticateUser(reauth, dialogCaption, parentWindow) .asyncReauthenticateUser(reauth, dialogCaption, parentWindow)
.then(reauthResult => { .then(reauthResult => {
let auth_details_extra = {};
if (reauthResult.length > 3) {
auth_details_extra.auto_admin = "" + !!reauthResult[2];
auth_details_extra.require_signon = "" + !!reauthResult[3];
}
if (!reauthResult[0]) { if (!reauthResult[0]) {
throw new Components.Exception( throw new Components.Exception(
"User canceled OS reauth entry", "User canceled OS reauth entry",
Cr.NS_ERROR_FAILURE Cr.NS_ERROR_FAILURE,
null,
auth_details_extra
); );
} }
let result = { let result = {
authenticated: true, authenticated: true,
auth_details: "success", auth_details: "success",
auth_details_extra,
}; };
if (reauthResult.length > 1 && reauthResult[1]) { if (reauthResult.length > 1 && reauthResult[1]) {
result.auth_details += "_no_password"; result.auth_details += "_no_password";
} }
if (reauthResult.length > 3) {
if (reauthResult[2]) {
result.auth_details += "_auto_admin_logon";
}
if (!reauthResult[3]) {
result.auth_details += "_require_signon_disabled";
}
}
return result; return result;
}); });
} else { } else {
@ -274,7 +274,12 @@ var OSKeyStore = {
this._pendingUnlockPromise = null; this._pendingUnlockPromise = null;
this._isLocked = true; this._isLocked = true;
return { authenticated: false, auth_details: "fail" }; return {
authenticated: false,
auth_details: "fail",
auth_details_extra: err.data.QueryInterface(Ci.nsISupports)
.wrappedJSObject,
};
} }
); );