-
Notifications
You must be signed in to change notification settings - Fork 173
Wildcards in Permissions Policy Origins #516
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
Conversation
This change harnesses [Content Security Policy matching](https://www.w3.org/TR/CSP3/#matching-urls) to allow wildcards in the origins of Permissions Policy allowlists. The goal of this is to provide greater granularity in permissions to better balance the ease and risk of a wildcard permission against what might otherwise be a long list of similar, yet distinct origins. The only wildcard allowed before was *, which matched all origins. Wildcards will now be supported for: * https://example.com:\* (ports, any port for example.com over https) * https://\*.com (hosts, any https origin ending in .com) * https: (scheme-only, any https origin) Feature: https://chromestatus.com/feature/5101218029895680 closes #479
clelland
left a comment
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.
I think this is looking pretty good -- a couple of issues with allow parsing though.
|
Thanks -- I think this looks good -- can you file an issue on CSP to export the three terms that we use here? (That shouldn't block merging this, but it would be good cleanup for later) The only thing that we might want to do to tighten it up a bit would be to give Allowlist two actual properties, so that we don't have to keep referring to "the origin representing (Not necessary right now; this is functionally equivalent, but if you wanted to do that before merging, let me know and I'll hold off) |
|
Filed w3c/webappsec-csp#604 I think this can merge as is, I can circle back on that cleanup when the DFNs are exported by CSP. |
SHA: dbb0ffb Reason: push, by arichiv Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Specifically: `scheme-source`, `host-source`, and `Does url match expression in origin with redirect count?`. These are used in w3c/webappsec-permissions-policy#516 closes #604
Specifically: `scheme-source`, `host-source`, and `Does url match expression in origin with redirect count?`. These are used in w3c/webappsec-permissions-policy#516 closes #604
This change harnesses Content Security Policy matching to allow wildcards in the origins of Permissions Policy allowlists. The goal of this is to provide greater granularity in permissions to better balance the ease and risk of a wildcard permission against what might otherwise be a long list of similar, yet distinct origins.
The only wildcard allowed before was *, which matched all origins.
Wildcards will now be supported for:
Feature: https://chromestatus.com/feature/5101218029895680
closes #479
Preview | Diff