Skip to content

Permissions-Policy-Report-Only and Reporting API updates#43853

Merged
chrisdavidmills merged 10 commits intomdn:mainfrom
hamishwillee:reporting_api_permissions_policy_addns
Apr 21, 2026
Merged

Permissions-Policy-Report-Only and Reporting API updates#43853
chrisdavidmills merged 10 commits intomdn:mainfrom
hamishwillee:reporting_api_permissions_policy_addns

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

This PR does a number of things:

  1. adds the Permissions-Policy-Report-Only HTTP header, to complement the Permissions-Policy header. The headers are the same really, the only difference being that the report version does not enforce the policy and has a different disposition in reports.
    • Given that it doesn't make sense to redocument everything, especially in his case which has so much content.
    • I think this is a better model that what we did for the other policy docs - suggest we copy it for the other too (? for reviewer)
  2. This then requires and update to cross link to Permissions-Policy and to the reporting object.
  3. Then I updated the Reporting API. The main change is a restructure to put the Reporting Types first. I will be turning that into a table in ReportingAPI: List of reports - draft #43782
  4. I also added a specific list in server endpoints of how you set the endpoint (moved out of the HTTP inteface section, as it is more general than that). This is useful as it shows how "diverse" the mechanisms are.

@chrisdavidmills I haven't checked this yet. Will take review, but might do a little tidy tomorrow.

@hamishwillee hamishwillee requested review from a team as code owners April 20, 2026 07:24
@hamishwillee hamishwillee requested review from pepelsbey and removed request for a team April 20, 2026 07:24
@github-actions github-actions bot added Content:WebAPI Web API docs Content:HTTP HTTP docs size/m [PR only] 51-500 LoC changed labels Apr 20, 2026
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

Preview URLs (6 pages)

Flaws (1)

Note! 5 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/API/CrashReportContext
Title: CrashReportContext
Flaw count: 1

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/fetch which is a redirect

(comment last updated: 2026-04-21 06:57:08)

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

@hamishwillee great work. I've got a few comments for you to look over, but nothing major. I definitely agree that this structure between a header and its report-only version is better.

Comment thread files/en-us/web/http/reference/headers/permissions-policy-report-only/index.md Outdated
Comment thread files/en-us/web/http/reference/headers/permissions-policy-report-only/index.md Outdated
Comment thread files/en-us/web/http/reference/headers/permissions-policy-report-only/index.md Outdated
Comment thread files/en-us/web/http/reference/headers/permissions-policy-report-only/index.md Outdated
Comment thread files/en-us/web/http/reference/headers/permissions-policy-report-only/index.md Outdated
Comment thread files/en-us/web/api/reporting_api/index.md Outdated
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md Outdated
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md Outdated
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md Outdated
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md
@hamishwillee hamishwillee force-pushed the reporting_api_permissions_policy_addns branch from e21e395 to bac066c Compare April 20, 2026 23:11
Comment thread files/en-us/web/api/permissionspolicyviolationreport/index.md Outdated
Comment on lines +48 to +57
| Type | Report object | Notes |
| ------------------------------ | ----------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `coep` | {{domxref("COEPViolationReport")}} | {{httpheader("Cross-Origin-Embedder-Policy")}} (COEP) violations |
| `coop` | `COOPViolationReport` | {{httpheader("Cross-Origin-Opener-Policy")}} (COOP) violations |
| `crash` | {{domxref("CrashReport")}} | Browser crash reports |
| `csp-violation` | {{domxref("CSPViolationReport")}} | [Content Security Policy (CSP)](/en-US/docs/Web/HTTP/Guides/CSP) violations |
| `deprecation` | {{domxref("DeprecationReport")}} | Deprecated features used by the site. |
| `integrity-violation` | {{domxref("IntegrityViolationReport")}} | {{httpheader("Integrity-Policy")}} violations |
| `intervention` | {{domxref("InterventionReport")}} | Features blocked by the user agent, such as ads that significantly impact page performance |
| `permissions-policy-violation` | {{domxref("PermissionsPolicyViolationReport")}} | {{httpheader("Permissions-Policy")}} violations |
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@chrisdavidmills Thanks for the review. I accepted all your suggestions bar one, which has a comment.

The only other change is I re-wrote this section on report types to have a clear list.

Note that this is the documented types. There are some I haven't tested yet, such as document policy and NetworkErrorReport. Those might require further updates - i.e. I have a feeling that NetworkErrorReport can't be sent to server endpoints so the text might need minor amendment.

I think this is good to go. Updating -Report-Only headers for other HTTP headers will be a separate task done right at the end.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yup, looks good to me.

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

LGTM. Nice wce work, @hamishwillee.

@chrisdavidmills chrisdavidmills removed the request for review from pepelsbey April 21, 2026 06:57
@chrisdavidmills chrisdavidmills merged commit dd1e828 into mdn:main Apr 21, 2026
9 checks passed
@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Thanks very much @chrisdavidmills . I feel like we're slowly getting there. I'm back on release tasks today, but once I have that in hand I'll look at Network errors, COOP reports, and Document-Policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants