Commit 0f917d19 authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1577312 - Allow authentication policies to be unlocked. r=mconley

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

--HG--
extra : moz-landing-system : lando
parent ddd0133b
......@@ -85,35 +85,45 @@ var Policies = {
Authentication: {
onBeforeAddons(manager, param) {
let locked = true;
if ("Locked" in param) {
locked = param.Locked;
}
if ("SPNEGO" in param) {
setAndLockPref(
setDefaultPref(
"network.negotiate-auth.trusted-uris",
param.SPNEGO.join(", ")
param.SPNEGO.join(", "),
locked
);
}
if ("Delegated" in param) {
setAndLockPref(
setDefaultPref(
"network.negotiate-auth.delegation-uris",
param.Delegated.join(", ")
param.Delegated.join(", "),
locked
);
}
if ("NTLM" in param) {
setAndLockPref(
setDefaultPref(
"network.automatic-ntlm-auth.trusted-uris",
param.NTLM.join(", ")
param.NTLM.join(", "),
locked
);
}
if ("AllowNonFQDN" in param) {
if (param.AllowNonFQDN.NTLM) {
setAndLockPref(
setDefaultPref(
"network.automatic-ntlm-auth.allow-non-fqdn",
param.AllowNonFQDN.NTLM
param.AllowNonFQDN.NTLM,
locked
);
}
if (param.AllowNonFQDN.SPNEGO) {
setAndLockPref(
setDefaultPref(
"network.negotiate-auth.allow-non-fqdn",
param.AllowNonFQDN.SPNEGO
param.AllowNonFQDN.SPNEGO,
locked
);
}
}
......
......@@ -53,6 +53,9 @@
"type": "boolean"
}
}
},
"Locked": {
"type": "boolean"
}
}
},
......
......@@ -132,6 +132,29 @@ const POLICIES_TESTS = [
},
},
// POLICY: Authentication (unlocked)
{
policies: {
Authentication: {
SPNEGO: ["a.com", "b.com"],
Delegated: ["a.com", "b.com"],
NTLM: ["a.com", "b.com"],
AllowNonFQDN: {
SPNEGO: true,
NTLM: true,
},
Locked: false,
},
},
unlockedPrefs: {
"network.negotiate-auth.trusted-uris": "a.com, b.com",
"network.negotiate-auth.delegation-uris": "a.com, b.com",
"network.automatic-ntlm-auth.trusted-uris": "a.com, b.com",
"network.automatic-ntlm-auth.allow-non-fqdn": true,
"network.negotiate-auth.allow-non-fqdn": true,
},
},
// POLICY: Certificates (true)
{
policies: {
......
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