Skip to content

Proposal "Allow to change permissions behavior on extension updates" #798

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

oleksiilevzhynskyi
Copy link

@oleksiilevzhynskyi oleksiilevzhynskyi commented Mar 28, 2025

Context

During a recent WECG meeting ("Upgrade Permissions" section), we discussed a #711 and Proposal for "Hybrid Permissions". The group agreed that the current behavior with "warning" is suboptimal and needs to be updated. Also, the group decided that adding a new manifest key for permissions doesn't make sense. Instead, we may add a property that will suppress permissions warning behavior and fall to "optional" behavior for new permissions during the update.

Proposal Summary

Add a new property, permissions_behavior.updates, to the manifest to specify how browsers should act when extension updates introduce new permissions. When set to defer, new permissions will behave as if specified in optional_permissions for existing. They are not requested or granted on update thus must be explicitly requested by the extension. The default browser behavior will NOT be applied (warning, turn off, stop further updates, etc.).

The new behavior is not applicable during install time or for permissions that do not trigger a warning.

Extension manifest file example:

{
  "permissions_behavior": {
    "updates": "defer"
  }
}

To use the original browser's behavior, use "auto" or omit "updates" or "permissions_behavior" properties:

{
  "permissions_behavior": {
    "updates": "auto"
  }
}

or

{
  "permissions_behavior": {}
}

Open questions

  • Double-check the name. Is it clear?
  • What should happen when the extension is already turned off or further updates are suppressed due to a permission warning? Should new property work retroactively and "restore" extension?

Copy link
Collaborator

@xeenon xeenon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposal — the behavior makes sense and generally aligns with what Safari does (we disable extensions on update if they cross a permission threshold, but without showing warnings).

That said, I think the property name could be more flexible. suppress_permissions_warning_on_update is a bit too UI/UX specific and doesn’t map well in all browsers.

At the Berlin meeting, an enum was suggested — I think something like this would scale better:

"permissions_behavior_on_update": "defer"

This is more future-proof and avoids locking us into a UI-specific interpretation.

I plan to have a more detailed review of the proposal soon.

@oleksiilevzhynskyi
Copy link
Author

"permissions_behavior_on_update": "defer"

@xeenon, thank you; that's a great point! Enum permissions_behavior_on_update makes much more sense!

I've updated the proposal's name and wording to account for the new name and value.

@oleksiilevzhynskyi oleksiilevzhynskyi changed the title WIP: Proposal "Suppress permissions warning on update" WIP: Proposal "Allow to change permissions behavior on extension's update" Mar 31, 2025
@xeenon
Copy link
Collaborator

xeenon commented Mar 31, 2025

"permissions_behavior_on_update": "defer"

@xeenon, thank you; that's a great point! Enum permissions_behavior_on_update makes much more sense!

I've updated the proposal's name and wording to account for the new name and value.

@oleksiilevzhynskyi You will want to define the opposite value too. "disable", "prompt", "warn", …?

Copy link
Contributor

@carlosjeurissen carlosjeurissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the initial proposal doc!

@xeenon would advocate for auto as well to have a neutral explicit default value.


Extension manifest file example:

```json
{
"suppress_permissions_warning_on_update": true
"permissions_behavior_on_update": "defer"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably disregard; however want to mention it, we could be further future-proofed by making it an object.

{
  "permissions_behavior": {
    "updates": "defer",
  }
}

allowing other types of permission behaviours we might want to introduce in the future.

@oleksiilevzhynskyi
Copy link
Author

Hey @xeenon @carlosjeurissen. Thank you for the comments. I updated the proposal with a new "permissions_behavior" namespace and added an "auto" value that represents the current (default) permissions behaviour during update. Please take another look.

The only part of the proposal I'm unsure of is what should happen when the extension is turned off or further updates are suppressed due to a permission warning. Would the browser be able to "restore" such an extension if the next version has "defer"? This will provide a way to rescue unintended permissions updates, but this may not be feasible from the implementation side.

@oleksiilevzhynskyi oleksiilevzhynskyi changed the title WIP: Proposal "Allow to change permissions behavior on extension's update" Proposal "Allow to change permissions behavior on extension updates" Apr 22, 2025
@oleksiilevzhynskyi oleksiilevzhynskyi added the proposal Proposal for a change or new feature label Apr 23, 2025
@oleksiilevzhynskyi
Copy link
Author

@xeenon, thank you!

As promised, I filled in the section about rescue for extension "blocked" due to a warning. Could you check if it makes sense? 995df62

[Optional feature] What if extension was already turned off due to the permission "warning", but updates to a new version with "permissions_behavior.updates" set to "defer"

We would like to provide a way to rescue an extension blocked by unintended permission updates or the accidental removal of permissions_behavior.updates. It should be possible to restore the extension by publishing an updated version of the extension with permissions_behavior.updates set to defer.

However, we cannot confirm the timeline of such a feature in this proposal. It remains for the browser vendor to decide if it's feasible to implement and when to implement it.

@carlosjeurissen
Copy link
Contributor

@oleksiilevzhynskyi alternative which would be backwards compatible is another key as discussed here:
#711 (comment)

However this can be confusing during the transition period.

@oleksiilevzhynskyi
Copy link
Author

@oleksiilevzhynskyi alternative which would be backwards compatible is another key as discussed here: #711 (comment)

However this can be confusing during the transition period.

Agreed. The proposed change will result in a suboptimal experience for users of older browsers that do not support it.

Your comment reminded me about the "Hybrid permissions" proposal. The idea is similar to permissions_on_install from your comment and is backward compatible. The concern about it was that the new permissions key adds an ambiguity and may cause everyone to abandon the permissions key at all.

@Rob--W
Copy link
Member

Rob--W commented May 8, 2025

Do you anticipate more keys in permissions_behavior?

I'm wondering whether it makes more sense to specify the update_behavior instead. For this, I can see more general utility, e.g. specifying a desired minimum supported extension version. For example, a dev could use this if they know older versions to be harmfully broken (e.g. breaking websites or security issues), or simply if they want to discontinue support for ancient versions.

Example of revised object:

  "update_behavior": {
    "new_permissions_are_optional": true
  }

The following is NOT a must-have, but just for illustration why it would be useful for update_behavior to be the top-level key:

  "update_behavior": {
    "minimum_extension_version": "1.2.3",
    "new_permissions_are_optional": false
  }

The minimum_extension_version in the above example would default to "0" in Firefox (to accept any previous extension),
whereas in Chrome it could default to the new extension's version (disable older versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal for a change or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants