Closed Bug 2082353 Opened 1 month ago Closed 1 month ago

[firefox-devtools-mcp] Restrict remaining commands updating browser configuration

Categories

(Remote Protocol :: WebDriver BiDi, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Depends on 1 open bug)

Details

Bug 2072964 and its dependencies restrict WebDriver BiDi sessions to the dedicated container (remote-control-container), behind the hidden pref remote.experimental.dynamicstart.container-isolation-enabled. Bug 2081129 restricts events and global operations which rely on session data.

Some commands still pick their targets or defaults on their own, and reach other containers when no target is provided. For a session restricted to a single container:

  • network.setExtraHeaders without targets should only add headers to requests from the container. Today the default headers are added to all requests.
  • network.addDataCollector without targets should only collect data for requests from the container. Today a global collector matches all requests.
  • permissions.setPermission without userContext should use the user context of the session. Today it changes the permission for the default user context.
  • Storage commands (storage.getCookies, storage.setCookie, storage.deleteCookies) without a user context in the partition should use the user context of the session. Today the partition key has no user context, so cookies of all containers are matched.
  • network.setCacheBehavior without contexts should throw unsupported operation. It cannot be restricted to the container: the command has no userContexts variant, so tabs opened later in the container would not get the behavior. Clients can still pass contexts.

Global operations apply to the container of the session, and operations which cannot be restricted to it are rejected.

Not needed for now. Bug 2081128 rejects all commands which are not needed by firefox-devtools-mcp in sessions restricted to a container, which includes all the commands listed here. network.addDataCollector requires contexts or userContexts in such sessions.

If we need to support some of these commands later, we can reopen.

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → WONTFIX
Points: 2 → ---
Whiteboard: [webdriver:m22]
You need to log in before you can comment on or make changes to this bug.