Implement cookies.getPartitionKey
Categories
(WebExtensions :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: robwu, Unassigned)
References
Details
(Whiteboard: [wecg])
When I introduced partitionKey to the cookies API, I anticipated that we might need a cookies.getPartitionKey method to enable extensions to query the relevant partitionKey for a given document / request context (comment in privacycg/CHIPS#8).
With the increased complexity in the shape of partitionKey, the cookies.getPartitionKey got specified in the WECG, at https://github.com/w3c/webextensions/pull/581, resulting in the proposal at https://github.com/w3c/webextensions/blob/main/proposals/hasCrossSiteAncestor.md#cookiesgetpartitionkey
Part 1 of the spec (partitionKey.hasCrossSiteAncestor) is implemented in bug 1873418.
Part 2 of the spec, cookies.getPartitionKey should be implemented as part of this bug.
During the design phase in WECG PR 581, the MVP converged towards a way to retrieve the partition key for a given document/tab/frame. To determine whether storage is actually partitioned, a content script could call document.hasStorageAccess (this was also mentioned in a thread in WECG PR 581). In Chrome, this makes sense because by default storage is nor partitioned. In Firefox, defaults include partitioned storage, so it would be nice if there is an option that enables extensions to query the active storage partition, without requiring content scripts.
Updated•1 year ago
|
| Reporter | ||
Comment 1•1 year ago
|
||
FYI Chrome has implemented this in Chrome 132 (https://issuetracker.google.com/issues/373361899). I'd like to implement this soon too.
Description
•