Bug 1710839 - [remote] Remove remote.enabled preference. r=remote-protocol-reviewers,Gijs,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D115239
This commit is contained in:
Henrik Skupin 2021-05-17 20:20:15 +00:00
Родитель 2f484063ff
Коммит d546c8341c
21 изменённых файлов: 5 добавлений и 70 удалений

Просмотреть файл

@ -4484,10 +4484,6 @@ pref("marionette.port", 2828);
pref("marionette.prefs.recommended", true);
#if defined(ENABLE_REMOTE_AGENT)
// Indicates whether the remote agent is enabled.
// If it is false, the remote agent will not be loaded.
pref("remote.enabled", true);
// Limits remote agent to listen on loopback devices,
// e.g. 127.0.0.1, localhost, and ::1.
pref("remote.force-local", true);

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
chrome-remote-interface.js
head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -22,7 +22,6 @@ function add_agent_task(originalTask) {
await RemoteAgent.close();
await originalTask();
} finally {
Preferences.reset("remote.enabled");
Preferences.reset("remote.force-local");
}
};
@ -74,17 +73,6 @@ add_agent_task(async function listen() {
);
});
add_agent_task(async function listenWhenDisabled() {
Preferences.set("remote.enabled", false);
try {
await RemoteAgent.listen(URL);
fail("listen() did not return exception");
} catch (e) {
is(e.result, Cr.NS_ERROR_NOT_AVAILABLE);
is(e.message, "Disabled by preference");
}
});
// TODO(ato): https://bugzil.la/1590829
add_agent_task(async function listenTakesString() {
await RemoteAgent.listen("http://localhost:0");

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -1,8 +1,6 @@
[DEFAULT]
tags = remote
subsuite = remote
prefs =
remote.enabled=true
support-files =
!/remote/cdp/test/browser/chrome-remote-interface.js
!/remote/cdp/test/browser/head.js

Просмотреть файл

@ -23,7 +23,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
XPCOMUtils.defineLazyGetter(this, "logger", () => Log.get());
const ENABLED = "remote.enabled";
const FORCE_LOCAL = "remote.force-local";
const LOOPBACKS = ["localhost", "127.0.0.1", "[::1]"];
@ -46,12 +45,6 @@ class RemoteAgentClass {
}
listen(url) {
if (!Preferences.get(ENABLED, false)) {
throw Components.Exception(
"Disabled by preference",
Cr.NS_ERROR_NOT_AVAILABLE
);
}
if (Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
throw Components.Exception(
"May only be instantiated in parent process",

Просмотреть файл

@ -42,8 +42,6 @@ interface nsIRemoteAgent : nsISupports
* A "remote-listening" system observer notification with the URL
* of the main target's WebSocket will be emitted once listening.
*
* @throws NS_ERROR_NOT_AVAILABLE
* When disabled by the remote.enabled preference.
* @throws NS_ERROR_LAUNCHED_CHILD_PROCESS
* When called from a child process.
* @throws NS_ERROR_ILLEGAL_VALUE

Просмотреть файл

@ -7,14 +7,6 @@ There are a couple of preferences associated with the remote agent:
Configurable preferences
------------------------
### `remote.enabled`
Indicates whether the remote agent is enabled. When the remote
agent is enabled, it exposes a [`--remote-debugging-port` flag] for Firefox.
When set to false, the remote agent will not be loaded on startup.
[`--remote-debugging` flag]: Usage.html
### `remote.force-local`
Limits the remote agent to be allowed to listen on loopback devices,

Просмотреть файл

@ -25,12 +25,6 @@ flag. Connections are by default restricted to loopback devices
(such as localhost and 127.0.0.1), but this can be overridden with
the `remote.force-local` preference.
The feature as a whole is guarded behind the `remote.enabled`
preference. This preference serves as a way to gate the remote
agent component through release channels, and potentially for
remotely disabling the remote agent through Normandy if the need
should arise.
Since the remote agent is not an in-document web feature, the
security concerns we have for this feature are essentially different
to other web platform features. The primary concern is that the
@ -91,9 +85,8 @@ It is our assumption that if an attacker has shell access to the
user account, there is little we can do to prevent secrets from
being accessed or leaked.
The preference `remote.enabled` is true on the Firefox Nightly
release channel. The [security review] was completed in November
2019.
The remote agent is available on all release channels.
The [security review] was completed in November 2019.
[security review]: https://bugzilla.mozilla.org/show_bug.cgi?id=1542229

Просмотреть файл

@ -14,7 +14,7 @@ three different programs/components running simultaneously:
* and the __target__, which is the web document being debugging.
The remote agent ships in [Firefox Nightly] only.
Since Firefox 86 the remote agent ships in all Firefox releases by default.
To check if your Firefox binary has the remote agent enabled, you
can look in its help message for this:

Просмотреть файл

@ -530,8 +530,8 @@ class FirefoxLauncher implements ProductLauncher {
'privacy.trackingprotection.enabled': false,
// Enable Remote Agent
// https://bugzilla.mozilla.org/show_bug.cgi?id=1544393
// Can be removed once Firefox 89 is no longer supported
// https://bugzilla.mozilla.org/show_bug.cgi?id=1710839
'remote.enabled': true,
// Don't do network connections for mitm priming

Просмотреть файл

@ -88,7 +88,6 @@ const PREFS_WHITELIST = [
"plugin.",
"plugins.",
"privacy.",
"remote.enabled",
"security.",
"services.sync.declinedEngines",
"services.sync.lastPing",