Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Modify CORP for COEP reporting #9

Merged
merged 4 commits into from
Mar 4, 2020

Conversation

yutakahirano
Copy link
Collaborator

Queue a report when CORP see potential failures due to COEP.
Discussed at whatwg/html#5100.

@yutakahirano
Copy link
Collaborator Author

@mikewest @annevk

@yutakahirano
Copy link
Collaborator Author

ping

1 similar comment
@yutakahirano
Copy link
Collaborator Author

ping

@yutakahirano
Copy link
Collaborator Author

I started implementation, and https://chromium-review.googlesource.com/c/chromium/src/+/2076223 has web platform tests.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 27, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 2, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 3, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass. Sorry this has taken so long. I'll try to get to the others today...

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated

1. Let |blocked url| be the first URL of |request|'s [=request/URL list=].

2. Set |blocked url|'s [=url/username=] to the empty string, and its [=url/password=] to `null`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I wonder if we should add some mechanism to the URL serializer to exclude credentials, as we do this kind of thing in a few places. Not for this PR, obviously...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIN.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated

4. Let |body| be a new object containing the following properties with keys:

* key: "`blocked`", value: |serialized blocked url|.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this enough context? It's not clear to me what @arturjanc and co. actually need (nor do I recall off the top of my head what the Reporting API provides on its own... Is https://w3c.github.io/reporting/#try-delivery up to date?).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the default url value provided by the Reporting API and the blocked URL here would be sufficient for developers to debug CORP violations.

BTW, I'm not sure if it's intentional but CSP uses blocked-uri as the key for resources that didn't load (as opposed to blocked here), so maybe there's some value in making this consistent?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another value that could potentially be useful is Request.destination (so the developer would know what kind of resource didn't load, e.g. they could prioritize fixing scripts) but this is a more of a nice-to-have than a necessity for debugging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: blocked-uri is deprecated. blocked-url (with an L, not an I) is preferred. :)

(I suspect @domenic would prefer that we follow the suggestions in https://w3ctag.github.io/design-principles/#casing-rules, using _ instead of -. Unfortunately, CSP is old and crusty and predates those good ideas.)

index.bs Outdated Show resolved Hide resolved
Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % the notes here. I think we can land this without waiting for @arturjanc, as we can always add bits and pieces later, and getting the infrastructure in place is more pressing.

index.bs Outdated Show resolved Hide resolved
Queue a report when CORP see potential failures due to COEP.
Discussed at whatwg/html#5100.
Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

I'd suggest that you just merge this, and discuss additional changes to the value of the report with @arturjanc, et al. in a separate PR that also introduces the COEPReportBody interface.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated

4. Let |body| be a new object containing the following properties with keys:

* key: "`blocked`", value: |serialized blocked url|.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: blocked-uri is deprecated. blocked-url (with an L, not an I) is preferred. :)

(I suspect @domenic would prefer that we follow the suggestions in https://w3ctag.github.io/design-principles/#casing-rules, using _ instead of -. Unfortunately, CSP is old and crusty and predates those good ideas.)

yutakahirano and others added 2 commits March 4, 2020 19:26
Co-Authored-By: Mike West <mike@mikewest.org>
@yutakahirano
Copy link
Collaborator Author

Done. Replaced "blocked" with "blocked-url", and added request's destination to the report.

@yutakahirano
Copy link
Collaborator Author

Oh sorry I overlooked your last comment. Removed the destinaion from the report.

I'd suggest that you just merge this

I think I don't have a commit access.

@mikewest
Copy link
Member

mikewest commented Mar 4, 2020

I'd suggest that you just merge this

I think I don't have a commit access.

Ah. Let's fix that. Invite's waiting in your inbox!

@yutakahirano yutakahirano merged commit 73865bf into WICG:master Mar 4, 2020
@yutakahirano
Copy link
Collaborator Author

Thank you! Merged.

@yutakahirano yutakahirano deleted the yhirano/report-to-corp branch March 4, 2020 10:49
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 4, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 4, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 4, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747176}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Mar 5, 2020
1: [this]
2: https://crrev.com/c/2075002
3: https://crrev.com/c/2076223

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL introduces network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter.

Bug: 1052764
Change-Id: I7ccce3e39c760393bf2d1b73786cf2a7ae838fde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074177
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747170}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: [this]
3: https://crrev.com/c/2076223

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL implements the reporting logic in the CORP check.

Bug: 1052764
Change-Id: Ia3c4d3aec886c76be6dd32083809e9e447ce2a4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075002
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747172}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747176}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2020
1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747176}
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Mar 7, 2020
… a=testonly

Automatic update from web-platform-tests
Introduce COEP reporting for CORP (3/3)

1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747176}

--

wpt-commits: 0d183bf3945eda537d23f8d37afbde1dad982544
wpt-pr: 22005
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 7, 2020
… a=testonly

Automatic update from web-platform-tests
Introduce COEP reporting for CORP (3/3)

1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747176}

--

wpt-commits: 0d183bf3945eda537d23f8d37afbde1dad982544
wpt-pr: 22005
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Mar 9, 2020
… a=testonly

Automatic update from web-platform-tests
Introduce COEP reporting for CORP (3/3)

1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhiranochromium.org>
Reviewed-by: Kinuko Yasuda <kinukochromium.org>
Cr-Commit-Position: refs/heads/master{#747176}

--

wpt-commits: 0d183bf3945eda537d23f8d37afbde1dad982544
wpt-pr: 22005

UltraBlame original commit: 928df8a4bbe0707f3da7ee6ebb8516f2eab4b142
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Mar 9, 2020
… a=testonly

Automatic update from web-platform-tests
Introduce COEP reporting for CORP (3/3)

1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhiranochromium.org>
Reviewed-by: Kinuko Yasuda <kinukochromium.org>
Cr-Commit-Position: refs/heads/master{#747176}

--

wpt-commits: 0d183bf3945eda537d23f8d37afbde1dad982544
wpt-pr: 22005

UltraBlame original commit: 928df8a4bbe0707f3da7ee6ebb8516f2eab4b142
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Mar 10, 2020
… a=testonly

Automatic update from web-platform-tests
Introduce COEP reporting for CORP (3/3)

1: https://crrev.com/c/2074177
2: https://crrev.com/c/2075002
3: [this]

This series of CLs implements WICG/cross-origin-embedder-policy#9.
We introduce network::mojom::CrossOriginEmbedderPolicyReporter and
its implementation content::CrossOriginEmbedderPolicyReporter, implement
the reporting logic in content::CrossOriginEmbedderPolicyReporter and
the CORP check, and plumb the mojo interface.

This CL creates CrossOriginEmbedderPolicyReport during the frame
navigation and dedicated worker initialization, and give it to the
network service so that (possibly potential) CORP blocks are reported.

Bug: 1052764
Change-Id: Ia39ff8277eb23d96025f5e6fba4e5a4fa6ffde70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076223
Commit-Queue: Yutaka Hirano <yhiranochromium.org>
Reviewed-by: Kinuko Yasuda <kinukochromium.org>
Cr-Commit-Position: refs/heads/master{#747176}

--

wpt-commits: 0d183bf3945eda537d23f8d37afbde1dad982544
wpt-pr: 22005

UltraBlame original commit: 928df8a4bbe0707f3da7ee6ebb8516f2eab4b142
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants