Skip to content

Commit

Permalink
[COOP report] Add support for report-only
Browse files Browse the repository at this point in the history
This adds the support for report-only COOP triggered Browsing context
group switches.
During navigation, besides computing whether COOP triggers a BCG switch,
this also computes if any of the report-only policies would also trigger
a switch if they were effective, the resulting values are stored in
booleans within |CrossOriginOpenerPolicyStatus|.
This booleans are then used to trigger the navigation reports, and in a
follow up to trigger access reports.

Explainer [WIP]:
https://github.com/camillelamy/explainers/blob/master/coop_reporting.md

Specification [WIP]:
whatwg/html#5518

Bug: 1099208
Change-Id: I2cb66ec5cdcd9d5b4658c28f0608bc6b52d0da6b
  • Loading branch information
ParisMeuleman authored and chromium-wpt-export-bot committed Jul 15, 2020
1 parent 7c86d3e commit f876e61
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
SAME_ORIGIN,
"",
"",
`same-origin; report-to="${popupReportEndpoint.name}"`,
`same-origin; report-to="${popupReportOnlyEndpoint.name}"`,
"require-corp",
[
{
Expand All @@ -127,7 +127,22 @@
"url": `${location.href}`,
"type": "coop"
}
},]
},
{
"endpoint": popupReportOnlyEndpoint,
"report": {
"body": {
"disposition": "reporting",
"document-uri": /uuid=EXECUTOR_UUID$/,
"effective-policy": "same-origin-plus-coep",
"navigation-uri": `${location.href}`,
"violation-type": "navigation-to-document"
},
"url": /uuid=EXECUTOR_UUID$/,
"type": "coop"
}
}
]
],
// Open a cross-origin popup with a same-origin COOP report only. A report is
// sent to both this page's endpoint and the popup's.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,22 @@
"",
`same-origin; report-to="${popupReportOnlyEndpoint.name}"`,
"",
[]
[
{
"endpoint": popupReportOnlyEndpoint,
"report": {
"body": {
"disposition": "reporting",
"document-uri": /uuid=EXECUTOR_UUID$/,
"effective-policy": "same-origin",
"navigation-uri": `${location.href}`, // referrer
"violation-type": "navigation-to-document"
},
"url": /uuid=EXECUTOR_UUID$/,
"type": "coop"
}
}
]
],
];

Expand Down

0 comments on commit f876e61

Please sign in to comment.