Skip to content

Client Hint delegation to multiple subdomains #479

@nicjansma

Description

@nicjansma

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:

accept-ch: Sec-CH-UA-Platform-Version

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 beacon

So 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:

permissions-policy: ch-ua-platform-version=(self "https://*.akstat.io" "https://c.go-mpulse.net") 

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 be abcd1234.akstat.io for one visitor and efgh5678.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 the Permissions-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:

  1. Delegate to all subdomains: ch-ua-platform-version=(self "*")
    • This is not ideal, as it sends whatever Client Hints we're requesting to other 3P domains that aren't requesting it
    • This will take additional bandwidth on all other 3P requests
    • For the sake of privacy, we would like to avoid doing this.
  2. Explicitly list all of the potential subdomains: ch-ua-platform-version=(self "https://abcd1234.akastat.io" "https://efgh5678.akastat.io" ...)
    • We have 100s of potential subdomains, so maintaining this list would be a challenge
    • It would waste a lot of bandwidth
  3. Use the JavaScript high-entropy API to get this data instead (in boomerang.js, the JS library that our customers use)
    • We are planning on doing this, but our customers are slow/hesitant to upgrade their boomerang.js versions so it may be years before they do so

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:

CSP allows much richer wildcards than feature policy currently does -- If FP adopted some of the same parsing logic, then you could cut it down to

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:

permissions-policy: ch-ua-platform-version=(self "subdomains:https://akstat.io" "https://c.go-mpulse.net") 

Anyways, we're just trying to do the right thing and not request these hints and blast them all over!

Would love your thoughts,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions