Commit 7afa2b1e authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1446482 - Add policy for integrated auth prefs. r=Felipe

MozReview-Commit-ID: 3V7EBSiVK4A

--HG--
extra : rebase_source : 5bdbc277f9bd28560eb4b7d6c5cf01e8c975ab54
parent 61efc0db
......@@ -61,6 +61,20 @@ var EXPORTED_SYMBOLS = ["Policies"];
* The callbacks will be bound to their parent policy object.
*/
var Policies = {
"Authentication": {
onBeforeAddons(manager, param) {
if ("SPNEGO" in param) {
setAndLockPref("network.negotiate-auth.trusted-uris", param.SPNEGO.join(", "));
}
if ("Delegated" in param) {
setAndLockPref("network.negotiate-auth.delegation-uris", param.Delegated.join(", "));
}
if ("NTLM" in param) {
setAndLockPref("network.automatic-ntlm-auth.trusted-uris", param.NTLM.join(", "));
}
}
},
"BlockAboutAddons": {
onBeforeUIStartup(manager, param) {
if (param) {
......
......@@ -2,6 +2,34 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Authentication": {
"description": "Sites that support integrated authentication. See https://developer.mozilla.org/en-US/docs/Mozilla/Integrated_authentication",
"first_available": "60.0",
"enterprise_only": true,
"type": "object",
"properties": {
"SPNEGO" : {
"type": "array",
"items": {
"type": "string"
}
},
"Delegated" : {
"type": "array",
"items": {
"type": "string"
}
},
"NTLM" : {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"BlockAboutAddons": {
"description": "Block access to the Add-ons Mananger (about:addons).",
"first_available": "60.0",
......
......@@ -75,6 +75,22 @@ const POLICIES_TESTS = [
policies: { "OverrideFirstRunPage": "https://www.example.com/" },
lockedPrefs: { "startup.homepage_welcome_url": "https://www.example.com/" },
},
// POLICY: Authentication
{
policies: {
"Authentication": {
"SPNEGO": ["a.com", "b.com"],
"Delegated": ["a.com", "b.com"],
"NTLM": ["a.com", "b.com"],
}
},
lockedPrefs: {
"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",
}
},
];
add_task(async function test_policy_remember_passwords() {
......
Supports Markdown
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