arkenfox / TZP

TorZillaPrint: Firefox & Tor Browser fingerprint testing
https://arkenfox.github.io/TZP
MIT License
194 stars 27 forks source link

Privacy Preserving Attribution #319

Closed sertonix closed 2 months ago

sertonix commented 2 months ago

When PPA is disabled the functions are a no-op. This skips the argument checking too so it is possible to detect whenever or not PPA is enabled. From what I have seen it should be possible to hide whenever PPA is enabled or disabled.

let enabled = false;
try {
  // The ~ is considered an invalid url and will cause an error when PPA is enabled.
  navigator.privateAttribution.saveImpression({ type: "view", index: 6, ad: "shoes", target: "~" });
} catch (e) {
  if (e instanceof DOMException)
    enabled = true;
}

Since PPA is an Origin Trial you currently need to set dom.origin-trials.private-attribution.state: 1 for the API to be available on any website.

Thorin-Oakenpants commented 2 months ago

AFAICT ... when this becomes available on any website ... this is not a thing

sertonix commented 2 months ago

Then this is a bug in firefox. Made a report here https://bugzilla.mozilla.org/show_bug.cgi?id=1908470

Thorin-Oakenpants commented 2 months ago

sorry, I have a lot going on and am not really following this

Thorin-Oakenpants commented 2 months ago

I honestly can't quite follow this - I tried the other day in nightly with it enabled and not enabled and couldn't detect a difference (using console on live web sites)

edit: OK I needed to flip the pref for all sites? right?

sertonix commented 2 months ago

Setting dom.origin-trials.private-attribution.state to 1 enables the API for all sites. This is needed cause the API is experimental (and the other options are too complicated).

Thorin-Oakenpants commented 2 months ago

okie dokie - soz, am super busy with TB stuff - ESR128 is a huge jump :)

Thorin-Oakenpants commented 2 months ago

ok, so being a Origin Trial (OT) this currently doesn't make a viable FP as it's not universal. And once 1908470 is fixed then when OT becomes obsolete (i.e enabled universally?) it's no longer a FP vector. So closing. But good catch