Skip to content

Reloading frame after granted storage access to enable efficient site isolation #154

Open
@johnwilander

Description

@johnwilander

Apple WebKit is interested in exploring if we can allow browser engines to reload a cross-site frame after it is granted storage access through the Storage Access API. That would allow web engines on resource-constrained platforms to only use site isolation for sub frames with access to unpartitioned storage.

There is a difference in data leakage risk between cross-site frames with partitioned storage and cross-site frames with unpartitioned storage. It's most important to isolate documents with personal content, and personal content almost always implies unpartitioned storage. Put differently, being logged in almost always implies access to first-party cookies.

The switch to an isolated process could be done either by a mandatory frame reload on granted storage access (crude) or in a way that's controlled by JavaScript in the frame (perhaps more elegant). For the latter, imagine this for cross-site frame X:

  1. X calls document.hasStorageAccess() and learns that it does not currently have access.
  2. X indicates with a button that the user needs to interact with the content to activate it.
  3. The user taps the button in X.
  4. X calls document.requestStorageAccess().
  5. The user has been prompted previously and opted in, so the browser automatically grants storage access.
  6. X gets the result back that it was granted storage access, but cookie access is not yet open.
  7. X calls document.reloadOnStorageAccess().
  8. The browser checks if X was granted storage access, and since it was, reloads it.

Two key things here:

  • In step 8, the engine can switch process for X and ensure site isolation before personal content is loaded.
  • Between step 6 and 7, we could consider allowing X to tell its server about the reload, for instance by supplying a same-site reload URL in the call to document.reloadOnStorageAccess(). This would forward information from X's partitioned state to its unpartitioned state which obviously has privacy implications. But it would allow for the frame reload to be part of a natural content flow.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions