-
Notifications
You must be signed in to change notification settings - Fork 36
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
Switch reporting to Structured Headers #177
Comments
Given an example from the existing spec (with a couple of other options added):
There seem to be a few ways that we can express this with SH:
|
I'm game for migrating to Structured Headers. We'll want to handle the migration from JSON to SH carefully, since the JSON format has been shipped in Chrome for almost a year now. Presumably a separate header name, so that site owners can provide both a legacy |
Chromium could probably support both in the same header; they should be easily distinguished; if the first non-whitespace character is '{', then parse as JSON, otherwise parse as SH. |
@mnot - the syntax in (3) is what I'd love to be able to use, but requires changes to Structured Headers. Do you know if HTTPWG would support such changes? |
Agree, (3) would be ideal. Wondering if we ought to take this discussion directly to httpwg/http-extensions#907 or open a new issue on httpwg/http-extensions: I think we'll get more visibility on this over there. |
Will consider on httpwg/http-extensions#907, but a couple of questions / thoughts:
|
There can be multiple endpoints with the same priority. Uploads will be balanced across all of them according to their |
I think we are considering moving the content into Origin Policy, but IIUI that just changes how the headers would be delivered, not the syntax of their contents, right? |
The split between CSP and HKPK endpoint groups was from the original example, and certainly isn't the only way that reporting could be split up; I could see scenarios where different kinds of reports get sent to different parts of an organization. I also expect that many site owners will just want to have one endpoint group defined and use that for all of the reports types, rather than having to re-state all of the endpoints for each type. Also, reporting allows you to define a 'default' endpoint group, where deprecation, intervention and crash reports are sent to, without having to have an actual header defined for each of those.
Origin policy is definitely a possibility, and it could change the syntax; it has moved from being just a pure header-delivery mechanism, to being able to define policies/configuration more directly. One thing that I definitely expect to see is that Network Error Logging will get its configuration from origin policy rather than the In that case, we might be able to move
which only requires inner-list parameters. |
httpwg/http-extensions#907 is closed now; the latest drafts of Structured Headers now support parameters on all Items, as well as on inner lists. This means that we can now actually implement the full syntax as a list serialization, as in example (3):
|
Yay, that's great! I guess that removes the last hurdle for us to make the switch.. 👍 |
This is great! Thanks for driving that forward. So it sounds like the backwards-compatibility story would that Chromium would support both formats in |
https://github.com/w3c/reporting/tree/structured-headers is a first attempt at switching to this (though it's currently rebased on top of #191, so it doesn't have, for example, One issue with the syntax as proposed is that dictionary entries must have a key, so it's not possible to simply have 'default' assumed if it is missing. A group explicitly named 'default' must currently be defined in order to enable crash/deprecation/intervention reports. |
Re: #177 (comment), I've thought about it some more, and I don't think we can support two parsers for the same field in this case, and we definitely can't drop support for JSON until Origin Policy is available. It's not a problem with ambiguity, but the fact that until Origin Policy is ready, users are going to need to continue to be able to configure Network Error Logging endpoints with the In that case, we probably do need to define a |
FYI Structured Headers is in Working Group Last Call. |
Thanks, @mnot; I'm taking a look at the most recent draft now. It looks like its in pretty good shape; I've submitted issues for a couple of minor nits. The only thing that would be on my wish list, as far as reporting goes, would be that something like Is that worth opening an issue for, or is LC too late for that kind of change? |
Open an issue; worth a discussion.
… On 7 Feb 2020, at 5:18 am, Ian Clelland ***@***.***> wrote:
Thanks, @mnot; I'm taking a look at the most recent draft now.
It looks like its in pretty good shape; I've submitted issues for a couple of minor nits.
The only thing that would be on my wish list, as far as reporting goes, would be that something like * would be a valid dictionary member name (not just a token), to substitute for the previously implicit "default" endpoint.
Is that worth opening an issue for, or is LC too late for that kind of change?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Closed via 7da9f80. |
The header name was Report-To, not Reply-To. In any case, that's now being changed to the Reporting-Endpoints HTTP Response Header. https://w3c.github.io/reporting/#header w3c/reporting#177 CanIUse says the Report-To header is still supported by current Chrome and friends. https://caniuse.com/mdn-http_headers_report-to It doesn't have any data for the Reporting-Endpoints HTTP header, but this article says Chrome 96 supports it. https://web.dev/reporting-api/ (Even though that's come out one year ago, that's not compatible with Network Error Logging which's still using the Report-To version of the API) Signed-off-by: Thomas Citharel <[email protected]>
The header name was Report-To, not Reply-To. In any case, that's now being changed to the Reporting-Endpoints HTTP Response Header. https://w3c.github.io/reporting/#header w3c/reporting#177 CanIUse says the Report-To header is still supported by current Chrome and friends. https://caniuse.com/mdn-http_headers_report-to It doesn't have any data for the Reporting-Endpoints HTTP header, but this article says Chrome 96 supports it. https://web.dev/reporting-api/ (Even though that's come out one year ago, that's not compatible with Network Error Logging which's still using the Report-To version of the API) Signed-off-by: Thomas Citharel <[email protected]>
Per #158, we should consider switching to structured headers for the Report-To header
Using this issue as a bikeshed forum for SH concerns.
The text was updated successfully, but these errors were encountered: