Skip to content
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

deviceId and Clear-Site-Data #836

Open
dontcallmedom opened this issue Dec 8, 2021 · 6 comments
Open

deviceId and Clear-Site-Data #836

dontcallmedom opened this issue Dec 8, 2021 · 6 comments
Assignees

Comments

@dontcallmedom
Copy link
Member

The spec requires that

User Agents MUST rotate per-origin device identifiers when other persistent storage are cleared

One of the mechanisms that exist to clear persistent storage is the Clear-Site-Data header.

As far as I can tell, neither Chrome nor Firefox rotate deviceId when they encounter that header - I have a test that shows it for the cookies value of the header, but I've verified that it remains true for *. (Safari doesn't implement that header).

I think it would be useful to confirm or infirm whether Clear-Site-Data is expected to impact deviceId rotation (I would argue the current wording implies that it is expected), and if so, to specify under what bucket of the header (I could imagine either cookies or storage).

@jan-ivar
Copy link
Member

jan-ivar commented Jan 6, 2022

gUM is designed to recognize deviceIds an app may have stored in cookies or localStorage, so once both cookies and storage have been cleared, the reason to keep track of them is gone (and they can be rotated).

@jan-ivar jan-ivar self-assigned this Feb 24, 2022
@alvestrand
Copy link
Contributor

We already have language on deviceId:

Since deviceId may persist across browsing sessions and to reduce its potential as a fingerprinting mechanism, deviceId is to be treated as other persistent storage mechanisms such as cookies [COOKIES], in that User Agents MUST NOT persist device identifiers for sites that are blocked from using cookies, and User Agents MUST rotate per-origin device identifiers when other persistent storage are cleared.

So the question is if "other persistent storage are cleared" covers the Clear-Site-Data header. If it does, it's an implementation bug.

@dontcallmedom
Copy link
Member Author

I don't think "other persistent storage are cleared" has a precise definition, which is part of what we need to address.

@youennf
Copy link
Contributor

youennf commented Jun 20, 2022

I guess we could either refer to https://w3c.github.io/webappsec-clear-site-data/#abstract-opdef-clear-dom-accessible-storage-for-origin et al.
Or we could define a data type and a hook in the spec to clear that data type
https://w3c.github.io/webappsec-clear-site-data/ would then call this hook when any of the other data type is cleared.

@youennf
Copy link
Contributor

youennf commented Jun 20, 2022

See also #675

@guidou
Copy link
Contributor

guidou commented Sep 25, 2023

FWIW, Chrome is implementing rotating device IDs with Clear-Site-Data: cookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants