Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to (top-level site, embedded site) keying (closes #147, #156) #159

Merged
merged 3 commits into from
Mar 29, 2023

Conversation

johannhof
Copy link
Member

@johannhof johannhof commented Jan 23, 2023

This updates the permission key for storage-access to (site, site), and also removes the concept of the "partitioned storage key", which was origin-keyed as well. The storage key was only used for running the implementation-defined steps that are supposed to be removed as of #156.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

privacycg#156)

This updates the permission key for storage-access to (site, site), and
also removes the concept of the "partitioned storage key", which was
origin-keyed as well. The storage key was only used for running the
implementation-defined steps that are supposed to be removed as of privacycg#156.
@johannhof johannhof requested a review from annevk January 23, 2023 10:29
@annevk
Copy link
Collaborator

annevk commented Jan 24, 2023

For future context:

  • This is the first time a permission is scoped wider than an origin. Though at the same time it's constrained by the top-level site, which is a thing that other permissions don't need as they are restricted to the top-level origin.
  • This satisfies an important aspect of Improving the Storage Access API security model #113 as this will continue to require each document to call requestStorageAccess(). So one document cannot directly impact another.

Copy link
Collaborator

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, modulo example and tests. I'd prefer we follow https://github.com/whatwg/meta/blob/main/COMMITTING.md for our commit messages. E.g., issues that get closed should go in the commit body, not the title.

storage-access.bs Outdated Show resolved Hide resolved
johannhof added a commit to johannhof/storage-access that referenced this pull request Jan 26, 2023
(closes privacycg#156)

This was originally part of privacycg#159 but I'm submitting it separately since
this is a rather editorial change that we can probably fast-track
without including it in the other PR which still needs WPT etc.
johannhof added a commit that referenced this pull request Jan 27, 2023
(closes #156)

This was originally part of #159 but I'm submitting it separately since
this is a rather editorial change that we can probably fast-track
without including it in the other PR which still needs WPT etc.
@johannhof
Copy link
Member Author

Merged with #161 but I still need to write tests for this and update the example for the permission key.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 9, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 9, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 14, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 15, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 16, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 20, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 20, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 21, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 21, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
aarongable pushed a commit to chromium/chromium that referenced this pull request Mar 21, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 21, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 21, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Mar 29, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
@johannhof
Copy link
Member Author

We have WPT for this now, I filed a bug with Firefox and I added back the example, so merging this now.

@johannhof johannhof merged commit ceca554 into privacycg:main Mar 29, 2023
@johannhof johannhof deleted the site-site branch March 29, 2023 12:19
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Apr 8, 2023
This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 13, 2023
Automatic update from web-platform-tests
Use (site, site) for SAA grants

This updates storage-access permissions to apply on an (embedded site,
top-level site) scope as detailed in
privacycg/storage-access#159.

For adding WPT tests, I patched up the web_test_permission_manager to
special-case the storage-access permission to (site, site) scope. I kept
things intentionally simple for now but we could consider abstracting
out the scope into a "permission key" concept in that file, as it is
done in the permissions spec now.

There's follow-up work here to make this (and the existing top-level
site scope) sync up with the scope that is defined in content settings,
see https://crbug.com/1422971

Bug: 1418470

Change-Id: I316f682d24d962f79fcac332365790bca383c6ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307251
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Johann Hofmann <johannhof@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120269}

--

wpt-commits: b070171e29a18891540d1a600ac649098b5571a2
wpt-pr: 38908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants