Bug 1607760 - Remove ConfirmAuth prompt and URI userinfo telemetry. r=valentin

Differential Revision: https://phabricator.services.mozilla.com/D59494

--HG--
extra : moz-landing-system : lando
This commit is contained in:
pbz 2020-01-13 09:41:55 +00:00
Родитель 518e315e71
Коммит c25ee45b34
3 изменённых файлов: 4 добавлений и 41 удалений

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

@ -677,7 +677,6 @@ nsresult nsHttpChannelAuthProvider::GetCredentialsForChallenge(
if (mIdent.IsEmpty()) {
GetIdentityFromURI(authFlags, mIdent);
identFromURI = !mIdent.IsEmpty();
Telemetry::Accumulate(Telemetry::HTTP_AUTH_USERINFO_URI, identFromURI);
}
if ((loadFlags & nsIRequest::LOAD_ANONYMOUS) && !identFromURI) {
@ -1427,16 +1426,6 @@ nsresult nsHttpChannelAuthProvider::ContinueOnAuthAvailable(
return NS_OK;
}
void nsHttpChannelAuthProvider::RecordConfirmAuthTelemetry(const char* aType) {
if (nsCRT::strcmp(aType, "SuperfluousAuth")) {
Telemetry::AccumulateCategorical(
Telemetry::LABELS_HTTP_AUTH_CONFIRM_PROMPT::Superfluous);
} else if (nsCRT::strcmp(aType, "AutomaticAuth")) {
Telemetry::AccumulateCategorical(
Telemetry::LABELS_HTTP_AUTH_CONFIRM_PROMPT::Automatic);
}
}
bool nsHttpChannelAuthProvider::ConfirmAuth(const char* bundleKey,
bool doYesNoPrompt) {
// skip prompting the user if
@ -1445,6 +1434,10 @@ bool nsHttpChannelAuthProvider::ConfirmAuth(const char* bundleKey,
// 3) we're not a toplevel channel
// 4) the userpass length is less than the "phishy" threshold
if (!StaticPrefs::network_auth_confirmAuth_enabled()) {
return true;
}
uint32_t loadFlags;
nsresult rv = mAuthChannel->GetLoadFlags(&loadFlags);
if (NS_FAILED(rv)) return true;
@ -1459,12 +1452,6 @@ bool nsHttpChannelAuthProvider::ConfirmAuth(const char* bundleKey,
(userPass.Length() < gHttpHandler->PhishyUserPassLength()))
return true;
if (!StaticPrefs::network_auth_confirmAuth_enabled()) {
// If it wasn't for the pref, we would have prompted, record telemetry
RecordConfirmAuthTelemetry(bundleKey);
return true;
}
// we try to confirm by prompting the user. if we cannot do so, then
// assume the user said ok. this is done to keep things working in
// embedded builds, where the string bundle might not be present, etc.
@ -1551,8 +1538,6 @@ bool nsHttpChannelAuthProvider::ConfirmAuth(const char* bundleKey,
if (NS_FAILED(rv)) return true;
}
RecordConfirmAuthTelemetry(bundleKey);
return confirmed;
}

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

@ -86,7 +86,6 @@ class nsHttpChannelAuthProvider final : public nsIHttpChannelAuthProvider,
uint32_t authFlags,
nsHttpAuthIdentity&);
void RecordConfirmAuthTelemetry(const char* aType);
bool ConfirmAuth(const char* bundleKey, bool doYesNoPrompt);
void SetAuthorizationHeader(nsHttpAuthCache*, nsHttpAtom header,
const char* scheme, const char* host,

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

@ -2513,27 +2513,6 @@
"releaseChannelCollection": "opt-out",
"description": "Recorded once for each HTTP 401 response. The value records the type of authentication and the TLS-enabled status. (0=basic/clear, 1=basic/tls, 2=digest/clear, 3=digest/tls, 4=ntlm/clear, 5=ntlm/tls, 6=negotiate/clear, 7=negotiate/tls)"
},
"HTTP_AUTH_CONFIRM_PROMPT": {
"record_in_processes": ["main"],
"products": ["firefox", "geckoview"],
"alert_emails": ["seceng-telemetry@mozilla.com", "pbz@mozilla.com"],
"bug_numbers": [1594613],
"expires_in_version": "75",
"kind": "categorical",
"releaseChannelCollection": "opt-out",
"description": "Number of Automatic/Superfluous auth warning prompts shown. Prompts are counted even if disabled by pref.",
"labels": ["Automatic", "Superfluous"]
},
"HTTP_AUTH_USERINFO_URI": {
"record_in_processes": ["main"],
"products": ["firefox", "geckoview"],
"alert_emails": ["seceng-telemetry@mozilla.com", "pbz@mozilla.com"],
"bug_numbers": [1594613],
"expires_in_version": "75",
"kind": "boolean",
"releaseChannelCollection": "opt-out",
"description": "Counts http auth connections with (true) / without (false) userinfo in URI"
},
"HTTP_CHILD_OMT_STATS": {
"record_in_processes": ["content"],
"products": ["firefox", "fennec", "geckoview"],