From 310e65dfcf7cf150ca0be2826d965abb6dbff086 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 16:25:19 -0400 Subject: [PATCH 1/7] Fix missing SharedWorker matching criteria We need to store sameSiteCookies in the global scope so that we can match against it. --- spec.bs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index a4bf818..e9f0f1d 100644 --- a/spec.bs +++ b/spec.bs @@ -204,7 +204,7 @@ Modify {{Document/requestStorageAccess()}} at step 14.1.1.1.1 to read: For all of the following getters and methods, consider the following modifications: -1. When attempting to [=obtain a storage key=] the returned key will use [[STORAGE-PARTITIONING#relaxing-additional-keying]] if the tuple does not simply contain an [=/origin=]. +1. When attempting to [=obtain a storage key for non-storage purposes=] the returned key will use [[STORAGE-PARTITIONING#relaxing-additional-keying]] if the tuple does not simply contain an [=/origin=]. Issue(19): Clarify client-side storage mechanism changes in more detail. @@ -310,6 +310,8 @@ dictionary SharedWorkerOptions : WorkerOptions { The default {{SharedWorkerOptions/sameSiteCookies}} is {{SameSiteCookiesType/all}} in [=first-party-site context=] and {{SameSiteCookiesType/none}} otherwise. +Modify {{SharedWorkerGlobalScope}} to have an associated {{SameSiteCookiesType}} |sameSiteCookies|. + Modify [=new SharedWorker=] to accept {{SharedWorkerOptions}} instead of {{WorkerOptions}}. Modify [=new SharedWorker=] to add a new step below step 1 as follows: @@ -317,6 +319,15 @@ Modify [=new SharedWorker=] to add a new step below step 1 as follows: 2. If |options|.{{SharedWorkerOptions/sameSiteCookies}} is {{SameSiteCookiesType/all}} and {{Window}}'s [=associated document=] is not [=first-party-site context=], then: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. +Modify [=new SharedWorker=] to add a new matching criteria in step 10.2.2 as follows: + +* |scope|'s |sameSiteCookies| equals |options|.{{SharedWorkerOptions/sameSiteCookies}}. + +Modify [=Processing Model=] to add a new step below step 10.4 as follows: + +5. Set |worker global scope|'s |sameSiteCookies| to |options|.{{SharedWorkerOptions/sameSiteCookies}}. + + Note: The {{SameSiteCookiesType}} is used to influence which cookies are sent or read during [=fetch=] based on the [=SameSite=] cookie attribute. {{SameSiteCookiesType/all}} is only available in [=first-party-site context=] and permits [=SameSite=] "None", "Lax", and "Strict" cookies to be included (if not blocked for some other reason). From 1e06ce60980f9d4397963de050c71ea5301627b1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 16:29:49 -0400 Subject: [PATCH 2/7] Create devcontainer.json --- .devcontainer/devcontainer.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c27ce32 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "postCreateCommand": "sudo -H pip3 install bikeshed" +} From 7aaeda904f4019fec6da105acce2b4a856e9273d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 20:39:34 +0000 Subject: [PATCH 3/7] fix --- .devcontainer/devcontainer.json | 4 ---- spec.bs | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index c27ce32..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "image": "mcr.microsoft.com/devcontainers/universal:2", - "postCreateCommand": "sudo -H pip3 install bikeshed" -} diff --git a/spec.bs b/spec.bs index e9f0f1d..9d53c55 100644 --- a/spec.bs +++ b/spec.bs @@ -31,6 +31,7 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/ text: new broadcastchannel; url: #dom-broadcastchannel text: shared workers; url: #shared-workers-and-the-sharedworker-interface text: new sharedworker; url: #dom-sharedworker + text: processing model; url: #worker-processing-model spec: storage-access; urlPrefix: https://privacycg.github.io/storage-access/ type: dfn for: environment @@ -321,11 +322,11 @@ Modify [=new SharedWorker=] to add a new step below step 1 as follows: Modify [=new SharedWorker=] to add a new matching criteria in step 10.2.2 as follows: -* |scope|'s |sameSiteCookies| equals |options|.{{SharedWorkerOptions/sameSiteCookies}}. +* scope's |sameSiteCookies| equals |options|.{{SharedWorkerOptions/sameSiteCookies}}. Modify [=Processing Model=] to add a new step below step 10.4 as follows: -5. Set |worker global scope|'s |sameSiteCookies| to |options|.{{SharedWorkerOptions/sameSiteCookies}}. +5. Set worker global scope's |sameSiteCookies| to |options|.{{SharedWorkerOptions/sameSiteCookies}}. Note: From 2aed74881584cd61f513ab6f9b88bddb801c4eb5 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 20:44:20 +0000 Subject: [PATCH 4/7] fix --- .devcontainer/devcontainer.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..6663bb3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,6 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + "ghcr.io/devcontainers-contrib/features/bikeshed:2": {} + } +} From 0ddb74adcf4e94a142c9310fc2de98492a5be912 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 20:45:16 +0000 Subject: [PATCH 5/7] fix --- .devcontainer/devcontainer.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6663bb3..f9cf74b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,5 +2,12 @@ "image": "mcr.microsoft.com/devcontainers/universal:2", "features": { "ghcr.io/devcontainers-contrib/features/bikeshed:2": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "GitHub.vscode-github-actions" + ] + } } } From da850d509709c75d8f6fdadd5fe59ff5d1f8b348 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 16:48:46 -0400 Subject: [PATCH 6/7] Update spec.bs --- spec.bs | 1 - 1 file changed, 1 deletion(-) diff --git a/spec.bs b/spec.bs index 9d53c55..364cf3f 100644 --- a/spec.bs +++ b/spec.bs @@ -328,7 +328,6 @@ Modify [=Processing Model=] to add a new step below step 10.4 as follows: 5. Set worker global scope's |sameSiteCookies| to |options|.{{SharedWorkerOptions/sameSiteCookies}}. - Note: The {{SameSiteCookiesType}} is used to influence which cookies are sent or read during [=fetch=] based on the [=SameSite=] cookie attribute. {{SameSiteCookiesType/all}} is only available in [=first-party-site context=] and permits [=SameSite=] "None", "Lax", and "Strict" cookies to be included (if not blocked for some other reason). From dfd7c2e9d0aa59a1c6d6a1a642b006906a5f0ff6 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 19 Mar 2024 20:53:42 +0000 Subject: [PATCH 7/7] fix --- spec.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index 364cf3f..6c356ca 100644 --- a/spec.bs +++ b/spec.bs @@ -311,7 +311,7 @@ dictionary SharedWorkerOptions : WorkerOptions { The default {{SharedWorkerOptions/sameSiteCookies}} is {{SameSiteCookiesType/all}} in [=first-party-site context=] and {{SameSiteCookiesType/none}} otherwise. -Modify {{SharedWorkerGlobalScope}} to have an associated {{SameSiteCookiesType}} |sameSiteCookies|. +Modify {{SharedWorkerGlobalScope}} to have an associated {{SameSiteCookiesType}} sameSiteCookies. Modify [=new SharedWorker=] to accept {{SharedWorkerOptions}} instead of {{WorkerOptions}}.