Closed Bug 1626486 Opened 4 years ago Closed 4 years ago

Use structured field value parser for COOP and COEP

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: agektmr, Assigned: valentin)

References

(Blocks 4 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4100.0 Safari/537.36

Steps to reproduce:

Go to https://first-party-test.glitch.me/?coep=require-corp
This website demonstrates how COOP and COEP works. In this state, following header is attached:
cross-origin-embedder-policy: require-corp

In the UI, check 'Reporting' checkbox at the top to enable reporting feature. Following COEP header will be received:
cross-origin-embedder-policy: require-corp; report-to="coep"

Actual results:

COEP is ignored and cross-origin resources are loaded and displayed.

Expected results:

Even though reporting api is not implemented in Firefox yet, it should ignore the report-to annotation and block the cross-origin resources without CORP / CORS.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Eiji, I agree that we should probably do this, are you aware of WPT parser tests here? It would be good to have extensive coverage before attempting to change this. (Same for COOP I suppose.)

Valentin, let's use this as tracking bug for that parser issue I mentioned.

Jens, we might need to do this before shipping. Not marking as a blocker for now, but it would probably be good to have this covered as otherwise sites that deploy with reporting would not get their policy enforced in Firefox.

Blocks: 1563480
Priority: -- → P3
Depends on: 1631722

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

The moment we have a structured field value parser (see bug 1631722) we should start using it for COOP and COEP.

Blocks: 1648450
Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Priority: P3 → P2
Summary: COEP header is ignored when `report-to` is included. → Use structured field value parser for COOP and COEP
Version: 76 Branch → Trunk
Blocks: 1652926

New parsing tests are almost ready:

Valentin, is this something you can pick up? Hopefully it's relatively straightforward now we have a structured field value library?

Flags: needinfo?(valentin.gosu)

Yes. I already wrote the patch for COOP. COEP should be easy too.

Assignee: nobody → valentin.gosu
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ad066d1a0def
Use structured field value parser for COOP and COEP r=kershaw,annevk,necko-reviewers
Backout by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/02450e51825b
Backed out changeset ad066d1a0def for causing wpt failures in header-parsing.https.html
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b78a4c92aae2
Use structured field value parser for COOP and COEP r=kershaw,annevk,necko-reviewers
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Blocks: 1661440
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: