Bug 174153 - Web Inspector: Incorrect storage details for partitioned hosts (cookies)
Summary: Web Inspector: Incorrect storage details for partitioned hosts (cookies)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-07-05 00:57 PDT by Mike West
Modified: 2018-01-09 15:22 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike West 2017-07-05 00:57:27 PDT
It appears that there's a disconnect between the cookies sent out with a given request, and the cookies displayed in the "Storage" pane of the Web Inspector for that request's host. In particular, it seems to be the case that when storage is partitioned, the "Storage" pane displays the cookies associated with that host in the top level. The same seems to apply to things like `localStorage`, which also don't seem to be showing partitioned values.

It would be helpful if there was a mechanism to inspect the cookie jar associated with a given partition for a given host.
Comment 1 Radar WebKit Bug Importer 2017-07-05 10:04:14 PDT
<rdar://problem/33136349>
Comment 2 Joseph Pecoraro 2018-01-09 14:42:26 PST
Yep, this is a pretty ugly case.

We'd be showing cookies that aren't actually the cookies applying to requests.
Comment 3 Joseph Pecoraro 2018-01-09 15:22:35 PST
Some notes after talking with johnwilander:

Cookie partitioning can happen per-frame and can change dynamically throughout the lifetime of the frame.

Some examples of dynamically changing:

  (a) Default iframe cookies are not partitioned
  (b) Tracker classified frames are partitions
    - User Interaction in a frame can dynamically change that frame's cookies to be not partitioned
  (c) New Storage Access APIs
    - If user allowed can dynamically change that frame's cookies to be not partitioned

There may also be the case that a time period expires and cookies go back to being partitioned.

The fact that this is per-frame raises a few interesting points for Web Inspector. There may be an A.com page with multiple B.com subframes, and one of the B.com subframes can be dynamically promoted to not partitioned. In this case Web Inspector would want to show both the (B) non-partitioned cookies and the (A/B) partitioned cookies.