-
Notifications
You must be signed in to change notification settings - Fork 155
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
Client Hint delegation to multiple subdomains #479
Comments
@clelland @miketaylr - I'd love to hear your thoughts. Could we use site as the delegation boundary here, on top of origins? (with some keyword that tells the browser that) |
With CSP as a historical example, adding some sort of subdomain wildcard is probably reasonable. I'd like to understand why that doesn't exist in the current implementation, though: is there a good reason for the behavior we shipped, @clelland? |
This was originally specced this way (with just origin / (The original Feature Policy proposal also had both positive and negative assertions, and trying to support arbitrary configurations like
was a lot more complexity than was warranted) We could certainly add this now to the spec as a general mechanism. If we wanted parity with CSP, we'd end up supporting " The compatibility story might be complicated if we did that, though -- without consistent cross-browser support, you might not be able to use such wildcards on all features. It would look like a non-fatal syntax error on browsers which didn't support it, so you'd have to fall back to using " |
Oh, I somehow missed the fact that CSP's source lists can have wildcards. Matching that syntax would be ideal! |
|
Great! How do we make this happen? |
Let me see if someone on my team wants to tackle the spec PR + implementation work - does that sound OK @clelland? |
Certainly, I'm happy to review PRs! |
I'd be happy to send a PR and pursue this in Chrome for specifically the limited case: |
There is a new expansion of this proposal, specifically: Subdomain wildcards in allowlists provided some valuable flexibility, but differed from existing wildcard parsers and required novel code and spec work. This intent will reduce that overhead by reusing parts of the existing Content Security Policy spec and permitting ‘scheme + wildcard domain’ and ‘wildcard port’ in the allowlist. Specifically, this intent would adopt the definition of host-source and scheme-source instead of origin in the Allowlist definition while requiring that the path-part is empty (as Permissions Policies apply to matching origins). This would change three things from the prior wildcard implementation (all of which expand the range of allowed wildcards and none of which add new restrictions): (1) Removing the eTLD+1 requirement for subdomain wildcards (2) Allowing scheme restrictions on wildcard domains. (3) Allowing port wildcards. |
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
Hi everyone!
As part of the User Agent Reduction initiative (in Chrome), we (Akamai mPulse RUM) are implementing some changes for our product to request the information that will soon be frozen/removed from the UA string via Client Hints instead. For example, we would like to continue being able to classify RUM visitors by their Platform Version (and not just Platform, which is included as a default CH header).
For our customers, the Akamai CDN (or their origins) will be injecting the necessary
Accept-CH
headers, e.g:Our product interacts with a few domains that we would like the Platform Version sent to, such as:
c.go-mpulse.net
to fetch a configuration file*.akstat.io
to send the RUM beaconSo we were planning on including a
Permissions-Policy
header to delegate the requested Client Hints to those domains. For example, we were expecting to be able to send something like:This works fine for
c.go-mpulse.net
but our request of a wildcard in*.akstat.io
does not work.Our
*.akstat.io
domains receiving beacons have 100s+ subdomains mapping to specific paths we want the beacon to take, i.e. it may beabcd1234.akstat.io
for one visitor andefgh5678.akstat.io
for another. We don't know the domain at the time the HTML page is sent to the browser.We were hoping that a wildcard (subdomain) match for
*.akstat.io
in thePermissions-Policy
would work, but that does not seem to be the case (and isn't spec'd as such).Without making any changes to the spec, we brainstormed a few options to resolve this:
ch-ua-platform-version=(self "*")
ch-ua-platform-version=(self "https://abcd1234.akastat.io" "https://efgh5678.akastat.io" ...)
Instead, we are hoping a proposal to allow for subdomains to match PP would be feasible and secure.
There was a bit of previous discussion on wildcards and subdomains here:
#129
And even a note from @clelland:
But as far as I can tell, wildcards/subdomains didn't make it into the final Client Hints spec.
I understand that "star" wildcards (e.g.
*.akstat.io
) may have security concerns, but we were hoping some sort of syntax that might allow for any subdomain of an origin to get data, maybe something like this amateur attempt at a syntax:Anyways, we're just trying to do the right thing and not request these hints and blast them all over!
Would love your thoughts,
The text was updated successfully, but these errors were encountered: