keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.78k stars 188 forks source link

Add support for setting the settings using 3rdparty policy #2365

Closed mihakrumpestar closed 4 weeks ago

mihakrumpestar commented 1 month ago

Add support for https://mozilla.github.io/policy-templates/#3rdparty.

Already referenced by this issue.

Expected Behavior

Should be able to modify extension setting in Firefox using policy:

policies.3rdparty.Extensions."keepassxc-browser@keepassxc.org".settings = { ... }

Current Behavior

Currently, this is not possible or does not work.

Possible Solution

Some additional documentation can be found here https://extensionworkshop.com/documentation/enterprise/enterprise-development/#how-to-add-policy.

Example:

{
  "policies": {
    "3rdparty": {
      "Extensions": {
        "YOUR_EXTENSION_ID": {
          "STRING": "value",
          "BOOLEAN": true,
          "INTEGER": 10
        }
      }
    }
  }
}

How uBlock Origin has it implemented:

{
  "policies": {
    "3rdparty": {
      "Extensions": {
        "uBlock0@raymondhill.net": {
          "adminSettings": {
            "selectedFilterLists": [
              "ublock-privacy",
              "ublock-badware",
              "ublock-filters",
              "user-filters"
            ]
          }
        }
      }
    }
  }
}

Debug info

KeePassXC - 2.7.9 KeePassXC-Browser - 1.9.2 Operating system: Linux x86_64 Browser: Firefox

varjolintu commented 1 month ago

I made a draft for this: https://github.com/keepassxreboot/keepassxc-browser/pull/2366 Feel free to test if it works for you.