Closed Bug 1811947 Opened 3 years ago Closed 3 years ago

[DNR] Add permission warning for declarativeNetRequestFeedback and allow it to be requested as an optional permission

Categories

(WebExtensions :: Request Handling, task, P2)

task

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

Currently, we only allow the declarativeNetRequestFeedback permission to be used when the extensions.dnr.feedback pref is set. Due to it being opt in via a pref, we didn't require a permission warning for it.

The declarativeNetRequestFeedback permission is currently only used by the testMatchOutcome method.

This does not match the intended behavior from Chrome and Safari.

The following features are dependent on declarativeNetRequestFeedback in Chrome:
The declarativeNetRequestFeedback permission is used to guard several features:

Presently, Chrome's declarativeNetRequest.testMatchOutcome() method does NOT depend on another permission. It is available by default to unpacked extensions.

Safari has also committed to implementing Chrome's behavior (described above) for getMatchedRules and setExtensionActionOptions. The other methods have not been implemented.

For compatibility, we should therefore make declarativeNetRequestFeedback available without pref and introduce a permission warning for it. To make sure that testMatchOutcome is unavailable by default, we could either reuse the pref for exactly the same purpose or introduce a new pref name for it, and/or lock it to temporarily installed extensions (which is Firefox's version of Chrome's unpacked extensions).

Assignee: nobody → rob
Status: NEW → ASSIGNED

FYI: Chrome's permission warning is "Read your browsing history".

Severity: -- → N/A
Priority: -- → P2

When Luca and I discussed this, we decided to continue requiring the declarativeNetRequestFeedback permission (or at least for the includeOtherExtensions option) for testMatchOutcome. We considered only exposing these APIs to temporarily loaded extensions, but decided to keep the pref for now.

... and make the permission available by default, not gated on the extra
pref, to make sure that the permission warning shows up.

In the future, the DNR API will also use this permission even for
non-debugging APIs (e.g. bug 1745772), as mentioned in the bug.

Summary: [DNR] Add permission warning for declarativeNetRequestFeedback and remove extensions.dnr.feedback pref requirement → [DNR] Add permission warning for declarativeNetRequestFeedback and allow it to be requested as an optional permission

Summary: [DNR] Add permission warning for declarativeNetRequestFeedback and remove extensions.dnr.feedback pref requirement → [DNR] Add permission warning for declarativeNetRequestFeedback and allow it to be requested as an optional permission

The new summary is fine, but note that the original summary was not inaccurate. The pref requirement for the permission was removed, which means that even without the pref enabled, that the user will see a permission warning.

Note that currently the main pref, extensions.dnr.enabled disables the permission and associated warning entirely.

Depends on: 1816184

(In reply to rbloor from comment #6)

See https://github.com/mdn/content/pull/22644/files#r1084315176 regarding documentation

Let's apply that suggested edit. The preference continues to be required.

Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/7cb02c2fd778 Add permission warning for declarativeNetRequestFeedback r=rpl,geckoview-reviewers,calu https://hg.mozilla.org/integration/autoland/rev/87d02f235df4 Make declarativeNetRequestFeedback optional r=rpl
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
See Also: → 1827855
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: