-
Notifications
You must be signed in to change notification settings - Fork 68
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
base: main
Are you sure you want to change the base?
Proposal "Allow to change permissions behavior on extension updates" #798
Conversation
There was a problem hiding this 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.
@xeenon, thank you; that's a great point! Enum 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. |
There was a problem hiding this 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" |
There was a problem hiding this comment.
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.
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
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. |
@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
|
@oleksiilevzhynskyi alternative which would be backwards compatible is another key as discussed here: 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 |
Do you anticipate more keys in I'm wondering whether it makes more sense to specify the 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": {
"minimum_extension_version": "1.2.3",
"new_permissions_are_optional": false
} The |
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 newpermissions
. When set todefer
, new permissions will behave as if specified inoptional_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:
To use the original browser's behavior, use "auto" or omit
"updates"
or"permissions_behavior"
properties:or
{ "permissions_behavior": {} }
Open questions