-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for configuration overrides via GPOs in Windows #11223
base: develop
Are you sure you want to change the base?
Add support for configuration overrides via GPOs in Windows #11223
Conversation
Nice this is awesome, been wanting to do this for years. Here are some ideas on the visual cues:
You can do similar with the spinboxes and such just not in a loop I am personally in favor of only allowing certain settings to be managed (ie, those that actually impact security). |
Hi @droidmonkey, thanks for your feedback!
How would you implement the strong binding? I saw that maybe we could use QProperty, but it seems limited only to Qt 6, so we would need to upgrade. Is there any other option?
Do you have concerns over some specific settings that should not be managed? In my experience, we found useful to enforce some non-security-related settings to better fit KeePassXC in our environment. |
For the "strong bind" I would just use either a We can leave out the complexity of excluding certain settings. |
Oh, that's why the loop! Yep, this was a far easier approach. I refactored the code using a |
f69f295
to
571c636
Compare
Wow great job! I'll give this a test but the code looks beautiful. |
Fixes: #2189
KeePassXC does not provide a way to enforce specific configurations in a centralized way. Since settings are stored only in INI files, there is no possibility to use Group Policy Objects (GPOs), which mainly rely on modifications in the Windows registry to apply enforced settings.
With this patch, it is possible to override settings using the Windows registry.
By default, user settings are still loaded from the INI files, but these settings will be overridden by any other setting defined in:
These settings follow the same hierarchy of the INI files. Each section (e.g., GUI, Security, etc.) corresponds to a registry key, and each setting is defined as a DWORD (32-bit) value.
Screenshots
For example, we can now create a policy to enforce the automatic database lock after 120 seconds of idle:
In the Application Settings pane, the user sees the setting as disabled and a tooltip explaining that that configuration is enforced by the organization:
Discussion
EDIT: now the user can see a tooltip on each managed setting.
Details
As for now, the patch is pretty minimal. When accessing the settings pane, the user gets the resulting set of configurations after the override. Any attempt to change one of the managed setting will be silently ignored: after having clicked OK and re-opened the settings pane, the setting will be reverted back at the enforced value.
Ideally, it would be better to show some visual cue to the user about the enforced settings, for instance:
MessageWidget
that says something like "KeePassXC configuration is being managed by your organization"QWidget
corresponding to a managed setting asdisabled
While showing the message would be fairly easy to implement, disabling the widgets would be much cumbersome since we would need to call the
setEnabled()
manually for each widget depending on the value ofconfig()->isManaged(KEY)
.That's why before even implementing it, I would like some advice from you.
Would that be acceptable, or we can think of something better?
Testing strategy
Manual
Type of change