Report a predictable storage quota from StorageManager's estimate API for sites that do not have unlimited storage permissions. It is possible to detect a user's browsing mode via the reported storage quota because the storage space made available is significantly smaller in incognito mode than in regular mode. This is a mitigation that prevents detection of a user's browsing mode via the storage API by reporting an artificial quota, equal to usage + 10 Gib, in all browsing modes for sites with limited storage permissions. Sites with unlimited storage permissions will be unaffected. Enforced quota will also be unaffected.
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Shipping on desktop | 133 |
Shipping on Android | 133 |
Shipping on WebView | 133 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneOn 12/6/24 5:48 AM, Chromestatus wrote:
Contact emails
ree...@chromium.org
Specification
None
Summary
Report a predictable storage quota from StorageManager's estimate API for sites that do not have unlimited storage permissions. It is possible to detect a user's browsing mode via the reported storage quota because the storage space made available is significantly smaller in incognito mode than in regular mode. This is a mitigation that prevents detection of a user's browsing mode via the storage API by reporting an artificial quota, equal to usage + 10 Gib, in all browsing modes for sites with limited storage permissions. Sites with unlimited storage permissions will be unaffected. Enforced quota will also be unaffected.
Blink component
Blink>Storage>Quota
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Thanks Reema - these are helpful answers. And it seems you're
most of the way to an I2S here - I think "PSA" was probably the
incorrect category.
> We have manually looked at how sites seem to be using
navigator.storage.estimate() and most of the cases we’ve seen seem
to be using it for incognito detection.
I'd like to better understand the risk to sites who are not using this for incognito detection. Could you do a random sampling of say, 10 non-FP usages of quota estimation and see if they are in fact handling QuotaExceededErrors?
One more question: what are the actual Quota limits for storage
on mobile (including low-end devices), and WebView? Are any of
them lower than 10GiB?
We discussed this in our OWNERs meeting, and agreed this should
be an I2S that requires 3LGTMs to ship. But, we can just use this
thread - no need to send more mail. Some other folks have other
questions, but I'll let them send them independently.
We discussed this in our OWNERs meeting, and agreed this should be an I2S that requires 3LGTMs to ship. But, we can just use this thread - no need to send more mail. Some other folks have other questions, but I'll let them send them independently.
On 12/13/24 12:57 PM, Mike Taylor wrote:
Thanks Reema - these are helpful answers. And it seems you're most of the way to an I2S here - I think "PSA" was probably the incorrect category.
> We have manually looked at how sites seem to be using navigator.storage.estimate() and most of the cases we’ve seen seem to be using it for incognito detection.
I'd like to better understand the risk to sites who are not using this for incognito detection. Could you do a random sampling of say, 10 non-FP usages of quota estimation and see if they are in fact handling QuotaExceededErrors?
One more question: what are the actual Quota limits for storage on mobile (including low-end devices), and WebView? Are any of them lower than 10GiB?
On 12/12/24 1:41 PM, Reema A wrote:
Thanks for the feedback. Wrote out some more details and answers to questions that have been asked below:
Problem:
It is trivially easy to detect if a user is in incognito mode through the Storage Manager’s estimate API because the amount of storage made available in incognito mode is significantly smaller than in regular mode. We have found some libraries that seem to be taking advantage of this fact and using navigator.storage.estimate() to detect if a user is in incognito mode.
Goals:
Mitigate detecting incognito mode through navigator.storage.estimate() and navigator.storageBuckets.estimate()
Reduce fingerprinting value of the estimate() API
Allow estimate() to still be functional for sites with unlimited storage permissions
Leave quota enforcement unaffected
Minimize potential site breakages
Non-goals:
Mitigating all possible methods of incognito mode detection
Mitigating detecting incognito mode through quota exhausted errors
Relevant spec:
The storage spec defines quota as follows: “The storage quota of a storage shelf is an implementation-defined conservative estimate of the total amount of bytes it can hold. This amount should be less than the total storage space on the device. It must not be a function of the available storage space on the device.”
Current state:
The value returned by estimate() is already just an estimate and in some cases the actual amount of space available to use may be different.
Proposed change:
Return an artificial quota equal to usage + 10 GiB in the Storage Manager and Storage Bucket APIs estimate() method in both incognito mode and regular mode. However, continue to return the old value returned if the site has unlimited storage permission. Additionally, enforced quota will be unaffected.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/866e1227-d7b2-4a7c-bb9e-026cdfc376f7%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Sorry for the delayed response!> One more question: what are the actual Quota limits for storage on mobile (including low-end devices), and WebView? Are any of them lower than 10GiB?Quota is 60% of total disk space per origin. For UMA-enabled Chrome installations on Android, ~3% of weekly active clients have less than 16.67GB of total storage and thus less than 10GB of quota.
For WebView, we can't get per-device quota numbers; we can only get data about the number of UMA records, which means some devices will be counted multiple times. With that caveat, <4% of UMA records come from devices with less than 10GB of quota. The fraction of low quota devices may be similar to the fraction of records, but this cannot be verified.> I'd like to better understand the risk to sites who are not using this for incognito detection. Could you do a random sampling of say, 10 non-FP usages of quota estimation and see if they are in fact handling QuotaExceededErrors?I looked at a few examples.
Methodology:
- I searched in the Sources tab in Developer Tools for scripts using estimate() and checked if the same script had references to QuotaExceededErrors.
- I skipped scripts that seemed to just be logging the quota estimate to the console.
- I skipped scripts that seemed to be fingerprinting, which was the majority of examples.
Major caveat: It’s very hard to tell what these sites are doing due to code minification, obfuscation, the lack of context, etc.
I found 9 examples I looked at that were not obviously fingerprinting, although I couldn’t always tell what they were using the API for. Of these, I saw references to QuotaExceededErrors in 5 instances.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Did you happen to test the sites w/ the feature on and off, per
Yoav's suggestion?
Hey Reema,
Very sorry that you've been on hold here.
Thank you for doing some manual investigation, but I'm still a bit worried about the compat implications. 4 out of 9 sites not handling QuotaExceededError could be bad luck, or could be a sign of trouble down the road.
I'm also worried about knee-capping the API, if it will be
possible to return estimates that over-promise what's available
(the case where a device or WebView instance has < 10GiB
available, but the API tells the application that it has more). I
don't have approval to share the disk size metrics for Clank and
WebView, but it's high enough that we should re-think the
approach, or try to run an experiment.
Maybe we can meet to discuss next steps, and come up with a plan
together?
later,
Mike
Any updates on this?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/87e83d3f-af2e-48f1-a92b-5f56070b2d83n%40chromium.org.
Any updates on this?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/866e1227-d7b2-4a7c-bb9e-026cdfc376f7%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Any updates on this?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/675211ae.050a0220.55f02.00d8.GAE%40google.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/866e1227-d7b2-4a7c-bb9e-026cdfc376f7%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
I think there's a non-zero risk here, but it's fairly small and
Reema's newest proposal minimizes the risk in an acceptable way -
and, importantly, we can killswitch it if we get it wrong.
LGTM3.