Implement IDBFactory.databases() to enumerate IndexedDB databases
Categories
(Core :: Storage: IndexedDB, enhancement, P3)
Tracking
()
People
(Reporter: daleharvey, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: dev-doc-needed, leave-open, Whiteboard: DWS_NEXT, [wptsync upstream])
Attachments
(3 files)
Updated•7 years ago
|
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Could we get indexedDB.databases() implemented please?
On Firefox it's not possible to remove indexedDB databases by domain. The reason is the lack of indexedDB.databases() support and chrome.browsingData.remove() doesn't support "hostnames" parameter for indexedDB (it only works for cookies and localStorage). So on Firefox WebExtensions can only remove ALL indexedDB databases for all websites or none.
The implication is that privacy related WebExtensions are seriously handicapped on Firefox compared to Chrome and Firefox is supposed to be the go-to-browser for people who care about privacy.
Chrome supports indexedDB.databases();
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Depends on D54141
Comment 6•5 years ago
|
||
Depends on D54142
Updated•5 years ago
|
Comment 10•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•4 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:jstutte, maybe it's time to close this bug?
Comment 13•4 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #12)
The leave-open keyword is there and there is no activity for 6 months.
:jstutte, maybe it's time to close this bug?
Simon?
Comment 15•4 years ago
|
||
The attached patches only provide a stub for the IDBFactory.databases
method right now, returning a rejected promise. They work as such, but landing them might confuse feature-detection code. Further work was halted as it turned out that we can't currently query the set of IndexedDB database for an origin from the quota manager in the parent process. Once the quota manager provides this capability, we can implement a an operation on PBackgroundIDBFactory
adding another variant to FactoryRequestParams
, and call that from the child process.
At the moment, the Storage view in DevTools makes up for this missing functionality by reading all the databases in the profile, which could of course break if the storage format changes.
It would be great to replace this once we have a standard way to list databases such as this API.
Comment hidden (advocacy) |
Comment 18•3 years ago
|
||
Quota manager is also used for centralized storage management (for example, the unified directory structure on disk), so it's not only about quotas. However, we might implement a workaround which doesn't depend on new quota manager features.
Updated•3 years ago
|
Comment 19•2 years ago
|
||
I was directed here from https://github.com/facebook/sapling/issues/148 because https://reviewstack.dev does not work in Firefox right now because this API is not supported.
From my perspective, I consider this a security issue because not being able to enumerate the databases means that a website has no API it can use to ensure it has removed all of a user's data when they run a "Logout" action of sorts within a web application.
It also prevents a website from removing all IndexedDB data when a user logs in to ensure they start from a clean state.
Comment 20•2 years ago
|
||
Note that the Clear-Site-Data header exists and when used with the "storage" key will comprehensively clear storage API data for the origin and should be preferred if the high level goal is to remove all of a user's data for an origin. This is the most reliable and comprehensive mechanism available. In the future, https://github.com/WICG/storage-buckets should allow more granular but still comprehensive clearing on a per-bucket basis as well.
Comment 21•2 years ago
|
||
(In reply to bolinfest from comment #19)
I was directed here from https://github.com/facebook/sapling/issues/148 because https://reviewstack.dev does not work in Firefox right now because this API is not supported.
From my perspective, I consider this a security issue because not being able to enumerate the databases means that a website has no API it can use to ensure it has removed all of a user's data when they run a "Logout" action of sorts within a web application.
It also prevents a website from removing all IndexedDB data when a user logs in to ensure they start from a clean state.
Surely a website knows the set of names it may or may not have created ... so can delete all whether they exist or not.
(Unless someone is naming their DBs in a non-deterministic way, which seems unlikely and unwise)
Comment 22•2 years ago
|
||
Surely a website knows the set of names it may or may not have created ... so can delete all whether they exist or not.
For a large complex application, this might be true in theory, but in practice keeping track of all databases and making sure they are all cleaned up on logout might not be very practical.
Comment 23•1 year ago
|
||
Came across this now, as I run tests on my company's webtools in various browsers and recently upgraded my code to remove all indexedDB databases to reset state. Why does Firefox lag behind every other browser in this regard?
Description
•