#747: Shared Storage API
Discussions
2022-10-10
Hadley: Dan asked if it'll happen in privacy cg .. or privacy sandbox ...
Dan: there is a document we're working on ..
Hadley leaves comment
2023-02-20
Amy: Mozilla says no... It's more than storage - there are worklets involved... Even it was unparitioned storage...
Hadley: we left this ... do we want to change that?
Lea: what kind of storage?
Amy: replacement for cookies? Most of the use cases are ad related. The goal is a general purpose low level APi that can serve a number of use cases. We've been explcitly advising against that for replacement of 3rd party cookies..
Lea: how do web sites opt in? You have 2 cross origin web sites that want to use the same storage? what's the handshake / the opt in?
Amy: writing to the storage is open but reading is restricted by output gates.
Lea: I see what you mean about all the use cases being [targetted] ads. I don't have a problem with ads and I don't have a problem with targetted advertising with the user's consent.
discussion on what consent means
back to the API itself
Lea: it's complicated.
Amy: it's complicated.
Lea: maybe it needs this complexity? We definitely don't want a mechanism just to do 3rd party cookies in a more complicated way.
Peter: ..."privacy budget"...
Lea: we also should not be turning down things that come from privacy sandbox...
Amy: it mentions fenced frames a lot - and we've positively reviewed fenced frames.
Lea: nothing wrong with ads a general concept but not sure we should be adding features to the web platform just for that.
Amy: ..."single sign on as a use case" - but we have FedCM for that.
Peter: analagous to people want to open up general sockets instead of specific APIs... if anyone can write to the shared storage - that's still basically 3rd party cookies.
Dan: any relation to FPS?
Amy: not mentioned.
Amy: a reasonable comment might be "can you update us with how this proposal fits into the other proposals such as fedcm, fenced frames, storage access, topics API"? Also we could advise to not address general use cases...
Hadley: is that in the design principles?
Amy: it's 2.2. Consider tradeoffs between high level and low level APIs
Hadley: i think we should link out to it...
Dan: support asking them for an update and linking them to our relevant design principles.
Amy: Will draft a commment*
Peter: "prevent cross-site tracking of users" ... "over time we hope to add additional gates"... worrying.
Amy: also says "this is a privacy improvement over third party cookies" but we are comparing to the web without third party cookies.
Dan: Agree.
Peter: Agree.
Peter: we should tread carefully.
Hadley: I also think this.
2023-02-27
Amy: have been working on this async... Johann has come back with a clarification. I've written my comment based on the minutes.
Dan: I don't recall - it may be that we conflated wuth storage access API.
Amy: I will leave a comment.
2023-03-13
Hadley: this is the one we were happy with ...
Dan: i think Amy was going to leave a followup comment - let's
bumped to plenary
2023-04-10
Dan: Josh has responded to our questions...
Dan: Finding this difficult to parse … particularly the response to how this fits together with other privacy sandbox initiatives...
Rossen: clarification is warranted... also not seeing this from their explainer...
Dan: we're also reviewing requestStorageAccessFor
... I'm concerned about developer complexity. I still don't understand when a developer would use each of them...
Peter: Mozilla's standards position is negative... linked in the issue.
Peter: I'm concerned about output gating of this. Anyone can write into the shared storage but reading is restricted. Seems like the output gating is entirely based on budget. Budgeting approach here is completely inadiquate.
Dan: I'll also note the user needs are not well articulated in the explainer.
Peter: all the needs are advertising based...
Peter: my concern - i don't see how it protects user privacy. Budgeting just allows user privacy to be violated by a small set of entities...
Rossen: leaves comment
2023-07-03
Dan: Big response to our comments...
Dan: noting no multi-stakeholder buy in.
Amy: noting negative mozilla standards position.
Dan: leaves comment asking about multistaheolder.
2023-10-16
Amy: new information is that it's gated on this attestation mechanism - so google is the gatekeeper on who gets to use it... which seems problematic...
draft - to be completed at plenary
<blockquote> Hi folks - We're planning to close this as the concerns raised by us and in the [Mozilla standards position](https://github.com/mozilla/standards-positions/issues/646) have not been addressed. We're also noting that there is lack of multi-stakeholder feedback/support. We are sympathetic to the need to replace some of the functionality lost with the removal of third-party cookies; in this case we think it'd be better to address the use cases individually, with designed-for-purpose approaches, rather than adding a single underlying mechanism which has the potential to re-introduce the risks that the removal of third-party cookies were intended to mitigate in the first place.We're a little concerned by the addition of the attestation mechanism mentioned. Registering in order to use an API is not something we see having a place in the web platform.
Please let us know if there are any significant changes in the design going forward that would mitigate the issues raised.
</blockquote>agree to close as unsatisfied
OpenedJun 6, 2022
Braw mornin' TAG!
I'm requesting a TAG review of Shared Storage.
In order to prevent cross-site user tracking, browsers are partitioning all forms of storage (cookies, localStorage, caches, etc) by top-frame site. But, there are many legitimate use cases currently relying on unpartitioned storage that will not be fully met without the help of new web APIs. We’ve seen a number of APIs proposed to fill in these gaps (e.g., Attribution Reporting API, Private Click Measurement, Storage Access, Trust Tokens, FLEDGE, Topics) and some remain (including cross-origin A/B experiments and user measurement). We propose a general-purpose, low-level API that can serve a number of these use cases.
The idea is to provide a storage API (named Shared Storage) that is intended to be unpartitioned. Origins can write to it from their own contexts on any page. To prevent cross-site tracking of users, data in Shared Storage may only be read in a restricted environment that has carefully constructed output gates. Over time, we hope to design and add additional gates.
Explainer (minimally containing user needs and example code): https://github.com/pythagoraskitty/shared-storage/
Specification URL: https://wicg.github.io/shared-storage/
Tests: Internal platform tests exist, but they rely on Fenced Frames WPT infra which is temporarily internal.
User research:
Security and Privacy self-review: see below
GitHub repo (if you prefer feedback filed there): https://github.com/pythagoraskitty/shared-storage
Primary contacts (and their relationship to the specification): Yao Xiao (@xyaoinum), Cammie Smith-Barnes (@pythagoraskitty), Josh Karlin (@jkarlin), Eric Trouton (@etrouton)
Organization(s)/project(s) driving the specification: Google, Privacy Sandbox
Key pieces of existing multi-stakeholder review or discussion of this specification:
External status/issue trackers for this specification (publicly visible, e.g. Chrome Status): https://chromestatus.com/feature/6256348582903808
Further details:
[✓] I have reviewed the TAG's Web Platform Design Principles
Relevant time constraints or deadlines: N/A
The group where the work on this specification is currently being done: TBD
The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): TBD
Major unresolved issues with or opposition to this specification:
This work is being funded by: Google
We'd prefer the TAG provide feedback as (please delete all but the desired option):
☂️ open a single issue in our GitHub repo for the entire review
Security/Privacy Questionnaire
This section contains answers to the W3C TAG Security and Privacy Questionnaire. This can also be found here
What information might this feature expose to Web sites or other parties, and for what purposes is that exposure necessary?
Shared Storage is a JavaScript storage mechanism (much like localStorage, indexedDB, CacheStorage, etc.). Like those other storage mechanisms it’s partitioned by origin. But unlike the other storage mechanisms, which may eventually be partitioned by top-frame site as well, (depending on the browser), Shared Storage is designed to not need top-frame partitioning. The intention is to provide for a large number of cross-site use cases such as cross-site fraud and abuse detection, a/b testing (including lift measurement), reach measurement, and frequency capping of ads.
Do features in your specification expose the minimum amount of information necessary to enable their intended uses?
Yes. While cross-partition writing to Shared Storage is unbounded, reading is severely rate limited. Reading can only occur in isolated JavaScript worklet environments, called Shared Storage Worklets, and data can only leave these worklets via “output gates”. The two output gates in development are
selectURL
and Private Aggregation.The
selectURL
gate allows for the Shared Storage Worklet to select between one of n URLs supplied by the embedder using information available in Shared Storage. The URL can therefore represent up to log2(n) bits of cross-site information from Shared Storage. The returned url is opaque to the caller, and can only be read within a Fenced Frame, which is isolated from the embedding page. On Fenced Frame user activation, the Fenced Frame can navigate to a destination page, which ultimately could leak the log2(n) bits with the embedder’s URL to the destination page.The Private Aggregation API will allow for data in Shared Storage to be aggregated into histograms. The resulting histograms are noised and are differentially private.
Each output gate has a “budget”. The Private Aggregation’s budget is defined by its differential privacy parameters (e.g., the epsilon value). However, this budget must be reset periodically else Shared Storage becomes useless over time. The
selectURL
operation has a cap (budget) on the number of leaked bits per period. The bits are removed from the budget once the user has clicked on the Fenced Frame. Like with Private Aggregation, the budget is periodically reset.How do the features in your specification deal with personal information, personally-identifiable information (PII), or information derived from them?
Shared Storage does not place any limits on the types of information origins can write to shared storage.
How do the features in your specification deal with sensitive information?
Same answer as # 3.
Do the features in your specification introduce a new state for an origin that persists across browsing sessions?
Yes, similar to other storage mechanisms, with tracking mitigations provided in answer to # 2.
Do the features in your specification expose information about the underlying platform to origins?
No.
Does this specification allow an origin to send data to the underlying platform?
Shared Storage’s
selectURL
operation produces a urn:uuid that only a Fenced Frame can interpret.Do features in this specification allow an origin access to sensors on a user’s device
No.
What data do the features in this specification expose to an origin? Please also document what data is identical to data exposed by other features, in the same or different contexts.
Limited access to the origin’s cross-site data as described in answer # 2.
Do features in this specification enable new script execution/loading mechanisms?
Yes. The Shared Storage worklets are loaded and executed in separate JavaScript contexts without access to any web page or network.
Do features in this specification allow an origin to access other devices?
No.
Do features in this specification allow an origin some measure of control over a user agent’s native UI?
No.
What temporary identifiers do the features in this specification create or expose to the web?
None.
How does this specification distinguish between behavior in first-party and third-party contexts?
Shared Storage is intentionally provided to both first and third-parties on a page.
How do the features in this specification work in the context of a browser’s Private Browsing or Incognito mode?
The behavior is like other JavaScript storage mechanisms in incognito mode. That is, the storage is kept in a separate partition from normal browsing mode, and is cleared when the incognito session ends.
Does this specification have both "Security Considerations" and "Privacy Considerations" sections?
Yes.
Do features in your specification enable origins to downgrade default security protections?
No.
What should this questionnaire have asked?
N/A.