When an mv3 extension is force_installed via policy, users should not be able to change host permissions
Categories
(WebExtensions :: General, enhancement, P3)
Tracking
(firefox153 fixed)
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: mkaply, Assigned: mkaply)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
In Chrome and Edge, if an extension is force_installed, users cannot change the host permissions.
See:
https://github.com/mozilla/policy-templates/discussions/1111
Comment 1•2 years ago
|
||
Our permissions system is a bit different from Chromium, I'm not sure we want this to be the default behavior for all extensions, maybe have a separate opt-in policy?
And in any case, if we ever support this, we'd need to have it clear in the UI that permissions can't be revoked because the extension is controlled by the administrator.
| Assignee | ||
Comment 2•2 years ago
|
||
I'm not sure we want this to be the default behavior for all extensions, maybe have a separate opt-in policy?
I thought about that, but it seemed redundant since it only happens if the extension is installed via policy anyway.
depending on the usecase, it might be that it only works for admin only extensions.
And in any case, if we ever support this, we'd need to have it clear in the UI that permissions can't be revoked because the extension is controlled by the administrator.
Definitely.
| Assignee | ||
Comment 3•1 year ago
|
||
So for my reference:
diff --git a/toolkit/mozapps/extensions/content/aboutaddons.js b/toolkit/mozapps/extensions/content/aboutaddons.js
index a5ffdf71b835..57f6f541c3ea 100644
--- a/toolkit/mozapps/extensions/content/aboutaddons.js
+++ b/toolkit/mozapps/extensions/content/aboutaddons.js
@@ -2053,6 +2053,10 @@ class AddonPermissionsList extends HTMLElement {
// mark it as checked if ANY of the "all sites" permission is granted.
checked = await AddonCard.optionalAllSitesGranted(this.addon.id);
toggle.toggleAttribute("permission-all-sites", true);
+ if (addon.isInstalledByEnterprisePolicy) {
+ toggle.setAttribute("disabled", "true");
+ toggle.setAttribute("support-page", "admin");
+ }
}
toggle.pressed = checked;
We need a SUMO article for generic "managed by an admin"
| Assignee | ||
Comment 4•1 year ago
|
||
bug 1989401 opened to create SUMO page.
| Assignee | ||
Comment 5•10 months ago
|
||
SUMO article is https://support.mozilla.org/en-US/kb/managed-browser-firefox
Comment 6•9 months ago
|
||
@mkaply, how should Firefox handle situations where an extension has a minimal set of permissions in "host_permissions" and has "optional_host_permissions" set to ["<all_urls">] or similar? I see a couple of different options:
- Force installed extensions are authoritative for their
host_permissionsandoptional_host_permissions. All host permission requests made by the extension are auto-granted and the user is not notified.
NOTE: This approach has a couple of drawbacks. First, it makes it easier for a compromised extension with <all_urls> in optional host permissions to hide up data access at rest by requesting a permission during an attack and releasing it as soon as the attack is complete. Second, depending on the implementation of the extension, this may block users form enabling an extension in legitimate cases, such as manually granting access to an internally hosted version of an enterprise service.
- Force installed extensions are only authoritative for their
host_permissions. Users can manually add/removeoptional_host_permissionsand the user must conform any optional host permissions requests made by the extension.
NOTE: Depending on the implementation of the extension, this approach may prevent extensions from operating as expected due to both denied host permission requests and manually removed host permission grants.
- Expand the
ExtensionSettingspolicy to support theruntime_allowed_hostsandruntime_blocked_hostsfields from Chrome's version of the policy. Users can modify any host permissions that are not expressly declared in the extension's section of the ExtensionSettings policy. That is, URLs matching patterns declared inruntime_allowed_hostscannot be manually revoked a user and URLs matching patterns declared inruntime_blocked_hostscannot be manually granted by a user.
NOTE: I feel this option is the most robust because it allows sysadmins to maintain control over both hosts that should be allowed for an internal deployment and hosts that should not be.
| Assignee | ||
Comment 7•9 months ago
|
||
I mean I guess my question would be what does Chrome do :)
| Assignee | ||
Comment 8•7 months ago
|
||
Updated•7 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Description
•