Skip to content

Refactoring environment origin, top-level site, etc into policy container #8302

@wanderview

Description

@wanderview

At TPAC there was a discussion about moving various authority information from the environment into a policy container owned by the environment. This would ensure the information is copied around correctly.

I started looking into this, but there are a couple issues I see with doing this:

  1. The policy container is currently on environment settings object and not on environment. This is a problem since we need the authority information on environments in order to construct a StorageKey during navigations in order to pick a service worker.
  2. It seems an environment settings object for a window doesn't even own the policy container. Instead it references the document's policy container.

Also, I'm wondering if policy containers are truly copied or just a reference is passed around. I haven't verified which yet. But if a reference is passed around it becomes difficult to modify values. For example, a cross-origin iframe should inherit the top-level site but will have a different origin value. But maybe the containers are copied and not referenced.

@annevk Any thoughts on these issues and what a good path forward would be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions