[Connection-Allowlist] Implement allowlist integration with WebRTC. [chromium/src : main]

0 views
Skip to first unread message

Andrew Verge (Gerrit)

unread,
Feb 17, 2026, 4:30:16 PM (14 days ago) Feb 17
to Chromium LUCI CQ, AyeAye, Shivani Sharma, Xiaochen Zhou, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
Attention needed from Andrew Verge

Message from Andrew Verge

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Verge
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I100597ae63d8fda9e1b28974dd2f2ce73c699d90
Gerrit-Change-Number: 7535718
Gerrit-PatchSet: 15
Gerrit-Owner: Andrew Verge <ave...@chromium.org>
Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
Gerrit-CC: Xiaochen Zhou <xiaoc...@chromium.org>
Gerrit-Attention: Andrew Verge <ave...@chromium.org>
Gerrit-Comment-Date: Tue, 17 Feb 2026 21:30:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrew Verge (Gerrit)

unread,
Feb 18, 2026, 1:45:43 PM (13 days ago) Feb 18
to Xiaochen Zhou, Harald Alvestrand, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
Attention needed from Harald Alvestrand and Xiaochen Zhou

Andrew Verge added 1 comment

Patchset-level comments
File-level comment, Patchset 20 (Latest):
Andrew Verge . unresolved

Hi Harald,

I'm seeking some WebRTC expertise on this CL. The rough idea is:

  • A document is served with a Connection-Allowlist header. No socket should be created to any network endpoint that is not allowlisted by this header.
  • The network service holds a `network_restrictions_id` per document, and maps this ID to a list of URLPatterns for network endpoints in the allowlist.
  • This allowlist mechanism should apply to WebRTC peer connections, DNS resolution, and signaling.
  • Signaling is not specified, and can be done with HTTP, Websockets, etc. So that's out of scope for this CL.
  • That leaves P2P sockets and DNS, which are covered by this CL.

I'm trying to understand a few things:

1. If the changes I have made here are sufficient to prevent any network requests related to WebRTC from going out. My assumption is yes, since no P2P sockets can be created for peers, and no DNS requests can be made in the establishment of P2P connections.

2. How often DNS is actually used for the initiation of peer connections, or if it's more common for peers to be identified in terms of IP+Port pairs. Even if we can block connections to specific IP+Port pairs, it's not super realistic to expect site developers to allowlist specific IP addresses, vs. more human-understood constructs like hostnames.

3. If this behavior is even worth pursuing due to the complexity involved. IIUC in order for a WebRTC connection to work, we'd have to allowlist:

  • The signaling server for communicating data between peers
  • Every possible candidate (direct connection IP, outcome of STUN request, TURN servers, etc)

If in practice, developers can't reliably enumerate all of these endpoints, then maybe we need an alternative approach that isn't "allowlist a select few endpoints."

I added you since you're an OWNER of services/network/P2P, but feel free to assign additional reviewers or delegate. I'm also happy to discuss this offline, write a doc, etc, if that would be easier. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Harald Alvestrand
  • Xiaochen Zhou
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I100597ae63d8fda9e1b28974dd2f2ce73c699d90
    Gerrit-Change-Number: 7535718
    Gerrit-PatchSet: 20
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Attention: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Feb 2026 18:45:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Harald Alvestrand (Gerrit)

    unread,
    Feb 20, 2026, 3:30:12 AM (11 days ago) Feb 20
    to Andrew Verge, Danil Chapovalov, Mike West, Xiaochen Zhou, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Andrew Verge and Xiaochen Zhou

    Harald Alvestrand added 1 comment

    Patchset-level comments
    Harald Alvestrand . resolved

    I'd like to discuss the architecture of this proposal in relation to WebRTC before diving into code.

    The issue with WebRTC is that the peers *do not have hostnames*, and their IP addresses are unpredictable at runtime (resolved using the ICE probing mechanism and mdns for local connections).

    When we discussed this in the context of CSP, the more-or-less conclusion was that the only restriction that made sense was "restrict all" or "allow all". There's an intermediate stage of "restrict to known servers", which says that you can only use WebRTC in client/server mode, not P2P mode, but at the time of the CSP discussion, this was not seen as worth making.

    Do you have evidence that there's a customer demand for a restriction function that will allow WebRTC only in client/server mode?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Verge
    • Xiaochen Zhou
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I100597ae63d8fda9e1b28974dd2f2ce73c699d90
    Gerrit-Change-Number: 7535718
    Gerrit-PatchSet: 20
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-CC: Danil Chapovalov <dani...@chromium.org>
    Gerrit-CC: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Andrew Verge <ave...@chromium.org>
    Gerrit-Attention: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 08:29:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Harald Alvestrand (Gerrit)

    unread,
    Feb 20, 2026, 3:32:36 AM (11 days ago) Feb 20
    to Andrew Verge, Danil Chapovalov, Mike West, Xiaochen Zhou, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Andrew Verge and Xiaochen Zhou

    Harald Alvestrand added 1 comment

    Patchset-level comments
    Harald Alvestrand . resolved

    The CSP spec discussion ended up here, I think:

    https://github.com/w3c/webappsec-csp/pull/457

    Gerrit-Comment-Date: Fri, 20 Feb 2026 08:32:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Harald Alvestrand (Gerrit)

    unread,
    Feb 20, 2026, 3:46:58 AM (11 days ago) Feb 20
    to Andrew Verge, Danil Chapovalov, Mike West, Xiaochen Zhou, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Andrew Verge and Xiaochen Zhou

    Harald Alvestrand added 1 comment

    Patchset-level comments
    Harald Alvestrand . resolved

    Found the spec discussion in https://github.com/WICG/connection-allowlists/issues/6 - let's have a conclusion on that thread before attempting to land code.

    Gerrit-Comment-Date: Fri, 20 Feb 2026 08:46:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Verge (Gerrit)

    unread,
    Feb 20, 2026, 10:57:08 AM (11 days ago) Feb 20
    to Danil Chapovalov, Mike West, Xiaochen Zhou, Harald Alvestrand, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Harald Alvestrand and Xiaochen Zhou

    Andrew Verge added 2 comments

    Patchset-level comments
    Harald Alvestrand . resolved

    Found the spec discussion in https://github.com/WICG/connection-allowlists/issues/6 - let's have a conclusion on that thread before attempting to land code.

    Andrew Verge

    Sounds good, will continue further discussion there. Thank you!

    Harald Alvestrand . resolved

    I'd like to discuss the architecture of this proposal in relation to WebRTC before diving into code.

    The issue with WebRTC is that the peers *do not have hostnames*, and their IP addresses are unpredictable at runtime (resolved using the ICE probing mechanism and mdns for local connections).

    When we discussed this in the context of CSP, the more-or-less conclusion was that the only restriction that made sense was "restrict all" or "allow all". There's an intermediate stage of "restrict to known servers", which says that you can only use WebRTC in client/server mode, not P2P mode, but at the time of the CSP discussion, this was not seen as worth making.

    Do you have evidence that there's a customer demand for a restriction function that will allow WebRTC only in client/server mode?

    Andrew Verge

    The issue with WebRTC is that the peers do not have hostnames, and their IP addresses are unpredictable at runtime

    This was my suspicion (I mentioned it a bit more in the WICG issue you found), glad to hear it's as awkward to allowlist as it sounds!

    When we discussed this in the context of CSP, the more-or-less conclusion was that the only restriction that made sense was "restrict all" or "allow all".

    I think following the CSP pattern makes sense here as well.

    Do you have evidence that there's a customer demand for a restriction function that will allow WebRTC only in client/server mode?

    We don't have any specific WebRTC use cases in demand right now. I'm more concerned about preventing WebRTC from being a bypass for the Connection-Allowlist header, and it sounds like a "block all" flag provides an easy fix for that part.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harald Alvestrand
    • Xiaochen Zhou
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I100597ae63d8fda9e1b28974dd2f2ce73c699d90
    Gerrit-Change-Number: 7535718
    Gerrit-PatchSet: 20
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-CC: Danil Chapovalov <dani...@chromium.org>
    Gerrit-CC: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Attention: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Fri, 20 Feb 2026 15:57:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Harald Alvestrand <h...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Harald Alvestrand (Gerrit)

    unread,
    Feb 26, 2026, 7:38:47 AM (5 days ago) Feb 26
    to Andrew Verge, Code Review Nudger, Danil Chapovalov, Mike West, Xiaochen Zhou, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Andrew Verge and Xiaochen Zhou

    Harald Alvestrand added 1 comment

    Patchset-level comments
    Harald Alvestrand . resolved

    So should this CL go back to "WIP" status until the discussion on how it should behave has concluded?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Verge
    • Xiaochen Zhou
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I100597ae63d8fda9e1b28974dd2f2ce73c699d90
    Gerrit-Change-Number: 7535718
    Gerrit-PatchSet: 20
    Gerrit-Owner: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Andrew Verge <ave...@chromium.org>
    Gerrit-Reviewer: Harald Alvestrand <h...@chromium.org>
    Gerrit-Reviewer: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Danil Chapovalov <dani...@chromium.org>
    Gerrit-CC: Mike West <mk...@chromium.org>
    Gerrit-CC: Shivani Sharma <shiva...@chromium.org>
    Gerrit-Attention: Andrew Verge <ave...@chromium.org>
    Gerrit-Attention: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Thu, 26 Feb 2026 12:38:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Verge (Gerrit)

    unread,
    Feb 26, 2026, 1:29:59 PM (5 days ago) Feb 26
    to Code Review Nudger, Danil Chapovalov, Mike West, Xiaochen Zhou, Harald Alvestrand, Chromium LUCI CQ, AyeAye, Shivani Sharma, akingsb+wat...@google.com, hansberry+wa...@chromium.org, creis...@chromium.org, ajayramamurthy...@google.com, julietlevesque...@google.com, alexmo...@chromium.org, fenced-fra...@chromium.org, network-ser...@chromium.org, navigation...@chromium.org, jackshira+wa...@google.com, crisrael+wa...@google.com
    Attention needed from Harald Alvestrand and Xiaochen Zhou

    Andrew Verge added 1 comment

    Patchset-level comments
    Harald Alvestrand . resolved

    So should this CL go back to "WIP" status until the discussion on how it should behave has concluded?

    Andrew Verge

    yep sounds good for now.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harald Alvestrand
    • Xiaochen Zhou
    Gerrit-Attention: Harald Alvestrand <h...@chromium.org>
    Gerrit-Attention: Xiaochen Zhou <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Thu, 26 Feb 2026 18:29:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Harald Alvestrand <h...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages