Implement StorageArea.setAccessLevel to separate extension storage for privileged extension principals and unprivileged content scripts
Categories
(WebExtensions :: Storage, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: robwu, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [mv3-future])
The storage extension API (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage) is allows extensions to store and retrieve data as key-value pairs.
Unlike most extension APIs, this API is also available to content scripts. This has two downsides:
- Security: The extension storage API is not exclusive to privileged extension contexts; unprivileged contexts can access and modify the data too.
- Performance: Any changes to the storage need to be broadcast to all (content) processes, since content scripts can potentially run everywhere.
We should look into a way to separate the storage by default, with an opt-in for reverting to the current behavior. This would be a breaking change, which we could do as part of manifest V3.
Chromium is investigating a similar feature: https://bugs.chromium.org/p/chromium/issues/detail?id=1227410
| Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
The storage.session API is supposedly restricted to extension processes (not content scripts) by default (https://developer.chrome.com/docs/extensions/reference/storage/#storage-areas)
When storage.session (bug 1687778) is implemented, we should at least implement the storage.session.setAccessLevel API, which should be documented as StorageArea.setAccessLevel .
Updated•2 years ago
|
Description
•