Closed Bug 1462352 Opened 7 years ago Closed 6 years ago

Allow permanent webrtc permissions on moz-extension protocol scheme urls

Categories

(WebExtensions :: Untriaged, enhancement)

60 Branch
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1408033

People

(Reporter: rpl, Unassigned)

References

Details

While I was looking into Bug 1459613 I noticed that on moz-extensions urls we don't currently allow to permanent set the webrtc permissions. The permanent permission can be actually stored, but webrtcUI.jsm doesn't currently take it into account because the moz-extensions urls are not currently considered "secure" by the MediaManager, which currently only send a webrtc permission request with the "secure" parameter to true for https urls: - https://searchfox.org/mozilla-central/rev/00dd116638001772fe354b081353b73f1cad405d/browser/modules/webrtcUI.jsm#457-462 - https://searchfox.org/mozilla-central/rev/00dd116638001772fe354b081353b73f1cad405d/dom/media/MediaManager.cpp#2904-2905 - https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/webidl/GetUserMediaRequest.webidl#17,24 In the past we have made sure that other webAPI/behaviors that are only available to secure contexts (basically only "https web pages") are also allowed from a moz-extension url (e.g. storageManager is one of this cases, https://developer.mozilla.org/en-US/docs/Web/API/StorageManager), and so it seems reasonable to evaluate if we want to do it for the MediaManager's permission requests as well. Nevertheless I feel that it is better to keep it separated from the original Bug 1459613 scope, and file it as a separate issue so that we can evaluate if we want it and which is the best (and safer, from a "security concerns" point of view) strategy to achieve it.
See Also: → 1459613
Isn't the WebExtension principal the same for the background page? I remember we had concerns around WebExtensions being able to use the camera in the background without the page being open, but maybe that's not possible for a different reason. It would be good if that reason wasn't just a bug in WebRTC code but rather an explicit decision. :)
(In reply to Johann Hofmann [:johannh] from comment #1) > Isn't the WebExtension principal the same for the background page? I > remember we had concerns around WebExtensions being able to use the camera > in the background without the page being open, but maybe that's not possible > for a different reason. It would be good if that reason wasn't just a bug in > WebRTC code but rather an explicit decision. :) Yeah. If we do this, we should make sure it doesn't make it possible for background pages to silently use WebRTC
See Also: → 1303919
Product: Toolkit → WebExtensions
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.