-
-
Notifications
You must be signed in to change notification settings - Fork 197
Add support for managed settings using 3rdparty policy #2366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I need to check the build script with the new file addition. For testing you do not need to build this. Just load the temporary extension directly from the sources. |
I did read the instructions for development now. Loading as temporary add-on also does not seem to work completely properly: The settings are then missing Passkey options, which are also absent when I export config from temporary add-on. |
That warning in the temporary extension page is expected, becase the default |
Do you mean the passkeys option is missing even if you have enabled it? |
I cannot reproduce that kind of error. I tried this with both temporary profile and a newly created profile with |
I am sorry. I was trying some things and forgot I changed to master branch. Furthermore, I tested again (on the correct branch this time) and the settings for Passkeys are indeed there, and the 3rdparty extension settings also get applied successfully. Tested on NixOS. TLDR: It is working. |
37e77a5
to
1093a16
Compare
Did some fixes to the |
1093a16
to
4549219
Compare
Only comment I have: settings that are string values, we should enumerate the possible options either directly or in documentation or in wiki. |
Added a new wiki page for this: https://github.com/keepassxreboot/keepassxc-browser/wiki/Managed-schema |
@varjolintu Do you mind explaining why you decided to have this only apply when the extension is first installed? It seems like an odd use case to only manage the initial configuration with no updates applying afterwards. |
@JuneStepp Is that something users really want? That would override any user-specific settings for sites etc. Maybe we could add a notification that asks the user if there are new settings available, and update them manually. |
I don't think a notification prompt makes sense, since the point of managed settings is that something is managed externally. It's up to the external party to determine how things get applied. I can only vouch for my own needs, but here's an attempt at breaking down some of the potential options for how to load settings at launch:
3 and/or 5 is what people probably expect when using policies; since this PR is already merged and released, I think keeping 2 but adding an option for 1 makes the most immediate sense. It would be a trivial change and fix my use case. Then, you could wait for someone who needs something more complicated to say so. |
Adds support for distributing global settings to the extension using 3rdparty policy. Includes a new
managed_storage.json
file that describes the settings that can be set. The schema file must be formatted correctly or the extension does not start because of failed validation.Easiest way to test this was to use
web-ext
with Firefox that had the policy JSON file added. Just made sure I deleted all storage data from the temporary extension before launching it again. That caused thesettings
to be an empty Object, and the getter for managed settings will be called.Example
policy.json
file:Related links:
https://extensionworkshop.com/documentation/enterprise/enterprise-development/#how-to-add-policy
https://developer.chrome.com/docs/extensions/reference/manifest/storage
Fixes #2365.