Set Ready For Review
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
Adding alexmos@ for content/browser OWNERS
Adding yyanagisawa@ for content/browser/worker_host OWNERS
Adding dom@ for VirtualTestSuites OWNERS
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
network::features::kConnectionAllowlists)) {Does this mean the feature should be enabled to run the origin trials? It sounds different from the usual OT?
/google/cog/cloud/averge/workerot/chromium/tools/origin_trials/generate_token.py:307: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).Is it intended to share the deprecation message here?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
In this CL, can we also enable the original feature flag by default, since the OT gates both documents and workers after this CL?
In this CL, can we also enable the original feature flag by default, since the OT gates both documents and workers after this CL?
Done.
network::features::kConnectionAllowlists)) {Does this mean the feature should be enabled to run the origin trials? It sounds different from the usual OT?
Yes, this is different than the usual OT. See explanation here and associated CL in blame: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;drc=289a7de98482b2a42af44d68c70e06f76a9b036b;l=1296
The complexity comes from the fact that Connection-Allowlist is implemented entirely in the browser/network service and needs to take effect before a response is sent to the renderer, when OT status is normally propagated.
This base::Feature will be default-enabled and used as a killswitch (see Shivani's comment below about flipping the flag in this CL). For the duration of the OT, we'll use the OT token header or a separate OT override flag to determine whether to actually populate the Connection-Allowlist or not.
CC @xiaoc...@chromium.org in case I missed anything here.
/google/cog/cloud/averge/workerot/chromium/tools/origin_trials/generate_token.py:307: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).Is it intended to share the deprecation message here?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adding bashi@ for network service features OWNERS
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
to ensure that worker content is also aware of the OT token.Let's mention that the feature flag is also enabled as part of this change
to ensure that worker content is also aware of the OT token.Let's mention that the feature flag is also enabled as part of this change
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Code-Review | +1 |
non-worker content/browser bits LGTM
bool ResponseContainsConnectionAllowlist(
const network::mojom::URLResponseHead* response_head);
// Returns true if the response enables connection allowlist origin trial.
bool ResponseEnablesConnectionAllowlistsOriginTrial(Optional: It seems that both of these are always called together in all current use cases, and there seems to be an assumption that the second one is always called before the first one (e.g., the first one checks for null response_head, and the second one assumes the headers are non-null). Would it be simpler to just have one helper function that does both checks? (I.e., the origin trial checks would be incorporated into ResponseContainsConnectionAllowlist?) Not sure if it makes with how you plan on using these going forward, though.
| Code-Review | +1 |
lgtm
network::features::kConnectionAllowlists)) {Andrew VergeDoes this mean the feature should be enabled to run the origin trials? It sounds different from the usual OT?
Yes, this is different than the usual OT. See explanation here and associated CL in blame: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;drc=289a7de98482b2a42af44d68c70e06f76a9b036b;l=1296
The complexity comes from the fact that Connection-Allowlist is implemented entirely in the browser/network service and needs to take effect before a response is sent to the renderer, when OT status is normally propagated.
This base::Feature will be default-enabled and used as a killswitch (see Shivani's comment below about flipping the flag in this CL). For the duration of the OT, we'll use the OT token header or a separate OT override flag to determine whether to actually populate the Connection-Allowlist or not.
CC @xiaoc...@chromium.org in case I missed anything here.
Acknowledged
bool ResponseContainsConnectionAllowlist(
const network::mojom::URLResponseHead* response_head);
// Returns true if the response enables connection allowlist origin trial.
bool ResponseEnablesConnectionAllowlistsOriginTrial(Optional: It seems that both of these are always called together in all current use cases, and there seems to be an assumption that the second one is always called before the first one (e.g., the first one checks for null response_head, and the second one assumes the headers are non-null). Would it be simpler to just have one helper function that does both checks? (I.e., the origin trial checks would be incorporated into ResponseContainsConnectionAllowlist?) Not sure if it makes with how you plan on using these going forward, though.
I think because of the weird caveats required for running this feature's OT, keeping the OT-specific behavior in its own function will make it easier to disentangle and clean up after the trial is finished.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adding dbaron@ for VirtualTestSuites OWNERS approval.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
`VirtualTestSuites` LGTM, with a few questions
"owners": [ "mk...@chromium.org" ],should one of the folks on this CL be an additional owner here?
"expires": "Jul 1, 2026"that's a relatively short expiration (just under a calendar quarter). Do you want a few quarters more than that before it bugs you?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"owners": [ "mk...@chromium.org" ],should one of the folks on this CL be an additional owner here?
Added Shivani as an owner of this suite ()
should one of the folks on this CL be an additional owner here?
Added Shivani to owners (on this suite and the one above it, since they are both Connection-Allowlist related).
that's a relatively short expiration (just under a calendar quarter). Do you want a few quarters more than that before it bugs you?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"owners": [ "mk...@chromium.org" ],Andrew Vergeshould one of the folks on this CL be an additional owner here?
Andrew VergeAdded Shivani as an owner of this suite ()
Marked as resolved.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@shiva...@chromium.org @ba...@chromium.org I had to make one network service change to unbreak a few tests when syncing to latest head. PTAL, thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
slgtm, thanks!
// Note that the network_revocation_exemptions_ check below which was addedminor nit: above
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Note that the network_revocation_exemptions_ check below which was addedAndrew Vergeminor nit: above
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// 1-2 milestones. return !patterns.has_value() ||could you also add a comment describing this change. Just want to make sure that an empty connection allowlist enforced list is still honored and all URLs are rejected.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can add a TODO(crbug.com/499191497) here
Done
could you also add a comment describing this change. Just want to make sure that an empty connection allowlist enforced list is still honored and all URLs are rejected.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
15 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: services/network/network_context.cc
Insertions: 6, Deletions: 1.
@@ -3778,7 +3778,7 @@
// be for a fenced frame. Given that there were no fenced frames exemptions
// detected above, we can just return false here. The fenced frame portion of
// this function is slated for removal, so this will be cleaned up within
- // 1-2 milestones.
+ // 1-2 milestones. TODO(crbug.com/499191497): Remove this check.
if (!restriction.enforced_allowlisted_patterns.has_value() &&
!restriction.report_only_allowlisted_patterns.has_value()) {
return false;
@@ -3799,6 +3799,11 @@
}
auto url_matches_patterns = [&url](auto& patterns) {
+ // If a Connection-Allowlist(-Report-Only) header was not provided, this
+ // optional will not have a value, so we don't need to examine it. If the
+ // header is provided but the list of patterns is empty, we will execute
+ // the second half of this statement, which will fail to find a pattern
+ // match.
return !patterns.has_value() ||
std::ranges::any_of(
*patterns,
```
[Connection-Allowlist] Set up Origin Trial for workers.
In order for the Connection-Allowlist origin trial to proceed, we need
to ensure that worker content is also aware of the OT token. We also
need the kConnectionAllowlists flag to be enabled by default, so that
the OT token and override are governing whether Connection-Allowlist
is enabled or not.
1. The OT token checks have been added to the
NetworkRestrictionsWorkerThrottle and worker script fetcher.
2. Refactoring: move the connection allowlists existence check and
token validation to two functions in connection_allowlist_gating.h/cc
I have tests for the following cases:
* Worker script fetch respects the document's connection allowlist
* Worker subresource fetch respects the main script fetcher's connection allowlist (when inheriting the allowlist via a local scheme).
I still need to add tests for:
* Worker script fetch returns its own Connection-Allowlist, and subresource requests respect that.
These tests are in a wpt_internal virtual suite because they require
special setup for our slightly-non-standard OT implementation. Given the
size of this CL, might make sense to split the other test cases into a
separate CL. This CL adds 2 virtual tests in total.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5599109869207552
Sample build with failed test: https://ci.chromium.org/b/8685525927317376705
Affected test(s):
[://\:blink_web_tests!webtest::http/tests/inspector-protocol/fetch#request-url-cross-origin.js](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_web_tests%21webtest::http%2Ftests%2Finspector-protocol%2Ffetch%23request-url-cross-origin.js?q=VHash%3Afe35cfb6dbc13663)
[://\:blink_wpt_tests!webtest::wpt_internal/speculation-rules/prefetch/no-vary-search#prefetch-single-non-immediate-with-hint.https.html?2-2](https://ci.chromium.org/ui/test/chromium/:%2F%2F%5C:blink_wpt_tests%21webtest::wpt_internal%2Fspeculation-rules%2Fprefetch%2Fno-vary-search%23prefetch-single-non-immediate-with-hint.https.html%3F2-2?q=VHash%3A6201ddcf3914f436)
A revert for this change was not created because the builder that this CL broke is not watched by gardeners, therefore less important. You can consider revert this CL, fix forward or let builder owners resolve it themselves.
If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5599109869207552&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F7688831&type=BUG
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |