-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds reporting API and other reports #10925
Conversation
@foolip Would you mind reviewing this instead? I think you're more tuned into BCD issues these days than I am. |
api/CSPViolationReportBody.json
Outdated
"spec_url": "https://www.w3.org/TR/CSP3/#cspviolationreportbody", | ||
"support": { | ||
"chrome": { | ||
"version_added": "69" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing in https://mdn-bcd-collector.appspot.com/tests/api/CSPViolationReportBody suggests this isn't shipped yet.
But that's because none of these interface objects are exposed. Without them, one would have to dig through Chromium source to figure out when each one shipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this API had actually landed in Chrome 74 as per https://storage.googleapis.com/chromium-find-releases-static/88d.html#88dcf893609cf4916ee33aef1f7658f18f13f760. @rachelandrew, do you mind updating this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@clelland this is a PR to add data for Report and *ReportBody APIs to BCD, for MDN compat tables. Due to https://crbug.com/1201273 it's hard to figure out when each part was shipped. Perhaps you know which runtime flags were involved here and when they were flipped? |
Hi, I'm a web devRel and have been working on this API. @clelland has details on this, but some info below that may help see the report structure: DemoWe've built recently this demo endpoint where reports of various types are sent and their structure can be visualized. This demo endpoint provides instructions on how to generate the reports. Supported reportsReports that I've seen (empirically) generated and properly sent in Chrome 92 in this demo are:
Permissions policy violation reports were generated too but AFAIK these are only experimental (source: @clelland). |
@rachelandrew Hi Rachel, does the demo help answer the initial question? If not, what would help unblock this? |
@maudnals it would be great to get this over the line, it's still not clear to me when each part of this was shipped. If I can get that info I can update the PR. |
Noted! @clelland, would you please help clarify when each part of this has shipped, so that this can be documented on MDN? [EDIT] Question: IIUC this means that:
Won't be documented on MDN for now, since they don't have a spec. Is this correct? One more question (this may not be in scope for this PR, so let me know if there's a better place to discuss this!): |
I dug into bugs, source control and config history for these, and I think I've teased out all of the relevant dates: The V0 reporting API shipped in Chrome 69, and at launch included:
Intervention reports shipped in Chrome 70 ReportingObserver shipped in workers in Chrome 84 Document Policy shipped in Chrome 86 (The COOP Reporting shipped in Chrome 89 Permissions Policy reporting has never actually shipped; it was an experiment (as Feature Policy reporting) in Chrome for a while, but was disabled after that. |
As far as the differences between v0 and v1, then yes that's something that could go onto MDN. It should also be represented in BCD, probably by including the availability of the I think probably the best thing to do right now is to make sure this PR, which represents things that are in specs is accurate and see if we can get it merged, then look at dealing with the other bits in separate PRs. Also, just a note that I'm happy to help get this over the line but it was part of work I was doing as a contractor, and I'm now a FT Googler so apologies for slowness of responses as I'm not spending 20 hours a week putting things on MDN right now. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is LGTM!
This PR updates and corrects version values for Chromium (Chrome, Opera, Samsung Internet, WebView Android) for the `CSPViolationReportBody` API, based upon results from the [mdn-bcd-collector](https://mdn-bcd-collector.gooborg.com) project (v7.1.2). Tests Used: https://mdn-bcd-collector.gooborg.com/tests/api/CSPViolationReportBody _Check out the [collector's guide on how to review this PR](https://github.com/GooborgStudios/mdn-bcd-collector#reviewing-bcd-changes)._ Note: this was originally set to "74" in mdn#10925 based upon commit history. However, while Chrome seems to have IDL for this feature, it's not exposed.
Making a PR I need to get some feedback on this.
The Reporting API is one of the things we're documenting over at Google and it was missing BCD.
This includes the Reporting API interfaces themselves, but also some reports which are now in separate specs (those Interfaces that are documented on MDN already refer to the old Reporting API spec which included them).
So this includes:
Report
ReportBody
Which are part of the Reporting API: https://w3c.github.io/reporting/#interface-reporting-observer
Chrome Status for the Reporting API: https://www.chromestatus.com/feature/4672626140119040
I believe that the original reports that were part of the Reporting API:
CrashReportBody
DeprecationReportBody
InterventionReportBody
were shipped at the same time, but I'm having trouble confirming.
I also have
PermissionsPolicyViolationReportBody
from the Permissions Policy Spec: https://w3c.github.io/webappsec-permissions-policy/#permissionspolicyviolationreportbodyChrome Status for the header/that spec although I know this has all recently changed from Feature Policy https://www.chromestatus.com/feature/5745992911552512
CSPViolationReportBody
from the Content Security Policy spec: https://www.w3.org/TR/CSP3/#cspviolationreportbodyThen there are two interfaces which seem to exist in Chrome IDLs but I can't find a spec for, so I haven't included them in this PR so far.
CoopViolationReportBody
which I only find mentioned in an explainer though it appears to have shipped in Chrome: https://www.chromestatus.com/feature/5755687994916864DocumentPolicyViolationReportBody
which I can't find anywhere.I did however find this issue: w3c/reporting#216
So that's where I got to, and I figured it might be easier to open this then ping relevant people to help me fill in the blanks.