Add policy support for arbitrary preferences (based on prefixes)
Categories
(Firefox :: Enterprise Policies, enhancement, P3)
Tracking
()
People
(Reporter: mkaply, Assigned: mkaply)
Details
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
After discussion, we're going to add support for arbitrary preferences in policy and control them by having prefixes that aren't allowed and certain preferences that are blocked.
Assignee | ||
Comment 1•4 years ago
|
||
Comment 3•4 years ago
|
||
bugherder |
Assignee | ||
Comment 4•4 years ago
|
||
Comment on attachment 9170672 [details]
Bug 1659719 - Add support for arbitrary preferences in policy. r?Gijs!
Beta/Release Uplift Approval Request
- User impact if declined: New policy not available.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Policy only, automated tests.
- String changes made/needed:
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Implements new policy
- User impact if declined: New policy not available.
- Fix Landed on Version: 82
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Policy only, automated tests.
- String or UUID changes made by this patch:
Comment 5•4 years ago
|
||
This seems like a pretty big change, why do we think extra QA isn't needed here?
Assignee | ||
Comment 6•4 years ago
|
||
Well it didn't feel like a big change :). But yeah, asking for QA is fine. I never know what the "Needs manual test" is really for.
Which qa-triaged flag do I set?
To test, add the following to a policies.json file:
{
"policies": {
"Preferences": {
"name_of_preference: {
"Value": true,
"Status": "default"
}
}
}
}
Any preference that starts with these prefixes:
https://searchfox.org/mozilla-central/rev/d54712b9644b49cec6cc90a9e0c325fdfab04e7c/browser/components/enterprisepolicies/Policies.jsm#1466
or is in this list:
https://searchfox.org/mozilla-central/rev/d54712b9644b49cec6cc90a9e0c325fdfab04e7c/browser/components/enterprisepolicies/Policies.jsm#1481
will work.
Available Status are:
default, user, locked and clear
user preferences will persist across restart.
clear will only clear user preference.
The automated test is here:
Comment 7•4 years ago
|
||
Comment on attachment 9170672 [details]
Bug 1659719 - Add support for arbitrary preferences in policy. r?Gijs!
Approved for 81.0b4. Let's get QA to take a look before we uplift to ESR78, though.
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Hi Mike,
Can you please share the steps to reproduce we can follow in order to verify this on QA?
Do we have to create a policies.json file? Where do we save it?
Once it's saved, what are the next steps to verify this change is working?
Thanks in advance,
Virginia
Assignee | ||
Comment 10•4 years ago
|
||
Comment 6 has the information you need, but I'll provide more detail - https://bugzilla.mozilla.org/show_bug.cgi?id=1659719#c6
Create a file called policies.json. On Windows, create a directory called distribution where the EXE is located and place the file there. On Mac, the file goes into Firefox.app/Contents/Resources/distribution
In that file, you should put:
{
"policies": {
"Preferences": {
"browser.policies.test.default.boolean": {
"Value": true,
"Status": "default"
}
}
}
}
The value of "Value" depends on the pref.
The value of "Status" can either be default (set a default value), locked (lock a pref), user (set the user value of a pref), clear (clear an existrnig pref)
For the preference name, you can use existing preferences you see in about:config or create a new one.
You are verifying that the preference is set as default, locked or user set.
Comment 11•4 years ago
•
|
||
Hi all,
Thanks for the clarification to reproduce this.
I've used the following preference as a test on version 81.0b7 (64-bit) on Windows 10, and I verify that when changing status, the changes are reflected.
Status tested: default, locked, user and clear
{
"policies": {
"Preferences": {
"browser.policies.test.default.boolean": {
"Value": true,
"Status": "locked"
}
}
}
}
Just to verify, I also tested this on a previous version, 79.0 and I confirm that changes to the json file are not reflecting. The changes do reflect on version 81.0b7 (64-bit)
Regards,
Virginia
Adding that this has also been verified in 82.0a1 (2020-09-08) (64-bit).
Regards,
Virginia
Comment 13•4 years ago
|
||
Comment on attachment 9170672 [details]
Bug 1659719 - Add support for arbitrary preferences in policy. r?Gijs!
Thanks for the verification. Approved for 78.3esr.
Comment 14•4 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Description
•