From 95665ad088d32de103abd0f2276cfdfc96be3a1c Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Fri, 23 Jun 2023 21:22:10 +0000 Subject: [PATCH 1/7] Reverting changes --- bounce-tracking-explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bounce-tracking-explainer.md b/bounce-tracking-explainer.md index d4e1e86..f53468f 100644 --- a/bounce-tracking-explainer.md +++ b/bounce-tracking-explainer.md @@ -71,7 +71,7 @@ This tracking scenario will be mitigated by this effort by wiping the tracker do Another tracking scenario involves a source site redirecting all outgoing links through a tracker domain. Again, the tracker domain is able to access first-party storage in this scenario and has no first-party relationship with the user. -![Diagram 2](diagrams/explainer_diagram_2.png) +![Diagram 2](~/diagrams/explainer_diagram_2.png) This tracking scenario will be mitigated by this effort by wiping the tracker domain's storage. From 39d15ccad880a90e0ba47f986b9120a82ad513f9 Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Fri, 23 Jun 2023 21:22:57 +0000 Subject: [PATCH 2/7] Revert markdown change --- bounce-tracking-explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bounce-tracking-explainer.md b/bounce-tracking-explainer.md index f53468f..d4e1e86 100644 --- a/bounce-tracking-explainer.md +++ b/bounce-tracking-explainer.md @@ -71,7 +71,7 @@ This tracking scenario will be mitigated by this effort by wiping the tracker do Another tracking scenario involves a source site redirecting all outgoing links through a tracker domain. Again, the tracker domain is able to access first-party storage in this scenario and has no first-party relationship with the user. -![Diagram 2](~/diagrams/explainer_diagram_2.png) +![Diagram 2](diagrams/explainer_diagram_2.png) This tracking scenario will be mitigated by this effort by wiping the tracker domain's storage. From c12ecba730d92053ef3f096bb34b7979a58c9c47 Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Tue, 11 Jul 2023 02:27:29 +0000 Subject: [PATCH 3/7] Fix document storage access navigables and impl for workers --- index.bs | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/index.bs b/index.bs index 327443d..1dfb51a 100644 --- a/index.bs +++ b/index.bs @@ -580,25 +580,16 @@ but this will be refactored to support [=service workers=] which attempt to acce when updating the [=bounce tracking record/storage access set=]. 2. Let |origin| be |environment|'s [=environment/top-level origin=]. -3. If |origin| is null or an [=opaque origin=], then abort these steps. -4. Let |global| be |environment|'s [=environment settings object/realm execution context=]'s [=global object=]. -5. Let |navigables| be an [=set/empty=] [=set=] of [=navigables=]. -6. If |global| is a [=Window=] object, [=set/append=] |global|'s [=associated document=]'s [=node navigable=] onto |navigables|. -7. Otherwise, if |global| is a {{WorkerGlobalScope}} object, - 1. Let |ownerQueue| be an [=queue/empty=] [=queue=] of [=document=] or {{WorkerGlobalScope}} objects. - 1. [=queue/Enqueue=] |global| onto |ownerQueue|. - 1. [=iteration/While=] |ownerQueue| is not [=queue/empty=], - 1. [=queue/Dequeue=] |owner| from |ownerQueue|. +1. If |origin| is null or an [=opaque origin=], then abort these steps. +1. Let |global| be |environment|'s [=environment settings object/realm execution context=]'s [=global object=]. +1. Let |navigables| be an [=set/empty=] [=set=] of [=navigables=]. +1. If |global| is a [=Window=] object, [=set/append=] |global|'s [=associated document=]'s [=node navigable=] onto |navigables|. +1. Otherwise, if |global| is a {{WorkerGlobalScope}} object, + 1. Let |ownerSet| be |global|'s [=WorkerGlobalScope/owner set=]. + 1. [=set/For each=] |owner| in |ownerSet|: 1. If |owner| is a [=document=] object, [=set/append=] |owner|'s [=node navigable=] onto |navigables|. - 1. If |owner| is a {{WorkerGlobalScope}} object, then [=set/For each=] |owner| in |global|'s [=WorkerGlobalScope/owner set=], - [=queue/enqueue=] |owner| onto |ownerQueue|. - -Note: Handling {{WorkerGlobalScope}} covers all storage access from a dedicated worker ({{DedicatedWorkerGlobalScope}}) or a shared worker -({{SharedWorkerGlobalScope}}). This doesn't apply to service workers, which rely on [=process a fetch storage access for bounce tracking mitigations=] -during Fetch events and [=process a general storage access for bounce tracking mitigations=] with a [=Window=] object when a service worker is -accessed using navigator.serviceWorker.getRegistration(). - -8. [=set/For each=] |navigable| in |navigables|: + 1. If |owner| is a {{WorkerGlobalScope}} object, [=set/append=] |owner| onto |ownerSet|. +1. [=set/For each=] |navigable| in |navigables|: 1. If |navigable| is not a [=top-level traversable=], then abort these steps. 1. If |navigable|'s [=top-level traversable/bounce tracking record=] is null, then abort these steps. 1. Let |site| be the result of running [=obtain a site=] given |origin|. From ae0fe4f2bb6260eaee69253a34597e5f1982997a Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Tue, 11 Jul 2023 02:45:15 +0000 Subject: [PATCH 4/7] Change owner set to queue --- index.bs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 1dfb51a..474f08a 100644 --- a/index.bs +++ b/index.bs @@ -585,10 +585,13 @@ when updating the [=bounce tracking record/storage access set=]. 1. Let |navigables| be an [=set/empty=] [=set=] of [=navigables=]. 1. If |global| is a [=Window=] object, [=set/append=] |global|'s [=associated document=]'s [=node navigable=] onto |navigables|. 1. Otherwise, if |global| is a {{WorkerGlobalScope}} object, - 1. Let |ownerSet| be |global|'s [=WorkerGlobalScope/owner set=]. - 1. [=set/For each=] |owner| in |ownerSet|: + 1. Let |ownerQueue| be an [=queue/empty=] [=queue=] of [=document=] or {{WorkerGlobalScope}} objects. + 1. [=queue/Enqueue=] |global| onto |ownerQueue|. + 1. [=iteration/While=] |ownerQueue| is not [=queue/empty=], + 1. [=queue/Dequeue=] |owner| from |ownerQueue|. 1. If |owner| is a [=document=] object, [=set/append=] |owner|'s [=node navigable=] onto |navigables|. - 1. If |owner| is a {{WorkerGlobalScope}} object, [=set/append=] |owner| onto |ownerSet|. + 1. If |owner| is a {{WorkerGlobalScope}} object, then [=set/For each=] |owner| in |global|'s [=WorkerGlobalScope/owner set=], + [=queue/enqueue=] |owner| onto |ownerQueue|. 1. [=set/For each=] |navigable| in |navigables|: 1. If |navigable| is not a [=top-level traversable=], then abort these steps. 1. If |navigable|'s [=top-level traversable/bounce tracking record=] is null, then abort these steps. From 562fceff3254176f4660bad596aee3f1f51af4f1 Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Wed, 12 Jul 2023 17:01:06 +0000 Subject: [PATCH 5/7] Adding note for dedicated/shared/service workers --- index.bs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 474f08a..2f63e84 100644 --- a/index.bs +++ b/index.bs @@ -580,11 +580,11 @@ but this will be refactored to support [=service workers=] which attempt to acce when updating the [=bounce tracking record/storage access set=]. 2. Let |origin| be |environment|'s [=environment/top-level origin=]. -1. If |origin| is null or an [=opaque origin=], then abort these steps. -1. Let |global| be |environment|'s [=environment settings object/realm execution context=]'s [=global object=]. -1. Let |navigables| be an [=set/empty=] [=set=] of [=navigables=]. -1. If |global| is a [=Window=] object, [=set/append=] |global|'s [=associated document=]'s [=node navigable=] onto |navigables|. -1. Otherwise, if |global| is a {{WorkerGlobalScope}} object, +3. If |origin| is null or an [=opaque origin=], then abort these steps. +4. Let |global| be |environment|'s [=environment settings object/realm execution context=]'s [=global object=]. +5. Let |navigables| be an [=set/empty=] [=set=] of [=navigables=]. +6. If |global| is a [=Window=] object, [=set/append=] |global|'s [=associated document=]'s [=node navigable=] onto |navigables|. +7. Otherwise, if |global| is a {{WorkerGlobalScope}} object, 1. Let |ownerQueue| be an [=queue/empty=] [=queue=] of [=document=] or {{WorkerGlobalScope}} objects. 1. [=queue/Enqueue=] |global| onto |ownerQueue|. 1. [=iteration/While=] |ownerQueue| is not [=queue/empty=], @@ -592,7 +592,12 @@ when updating the [=bounce tracking record/storage access set=]. 1. If |owner| is a [=document=] object, [=set/append=] |owner|'s [=node navigable=] onto |navigables|. 1. If |owner| is a {{WorkerGlobalScope}} object, then [=set/For each=] |owner| in |global|'s [=WorkerGlobalScope/owner set=], [=queue/enqueue=] |owner| onto |ownerQueue|. -1. [=set/For each=] |navigable| in |navigables|: + +Note: Handling {{WorkerGlobalScope}} covers all storage access from a dedicated worker ({{DedicatedWorkerGlobalScope}}) or a shared worker +({{SharedWorkerGlobalScope}}). This doesn't apply to shared workers, which rely on [=process a fetch storage access for bounce tracking mitigations=] +during Fetch events and [=process a general storage access for bounce tracking mitigations=] with a [=Window=] object for general storage access. + +8. [=set/For each=] |navigable| in |navigables|: 1. If |navigable| is not a [=top-level traversable=], then abort these steps. 1. If |navigable|'s [=top-level traversable/bounce tracking record=] is null, then abort these steps. 1. Let |site| be the result of running [=obtain a site=] given |origin|. From e78315633f6d428a81043a02a9241604e9f60b92 Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Thu, 13 Jul 2023 14:43:52 +0000 Subject: [PATCH 6/7] Resolving comments --- index.bs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 2f63e84..327443d 100644 --- a/index.bs +++ b/index.bs @@ -594,8 +594,9 @@ when updating the [=bounce tracking record/storage access set=]. [=queue/enqueue=] |owner| onto |ownerQueue|. Note: Handling {{WorkerGlobalScope}} covers all storage access from a dedicated worker ({{DedicatedWorkerGlobalScope}}) or a shared worker -({{SharedWorkerGlobalScope}}). This doesn't apply to shared workers, which rely on [=process a fetch storage access for bounce tracking mitigations=] -during Fetch events and [=process a general storage access for bounce tracking mitigations=] with a [=Window=] object for general storage access. +({{SharedWorkerGlobalScope}}). This doesn't apply to service workers, which rely on [=process a fetch storage access for bounce tracking mitigations=] +during Fetch events and [=process a general storage access for bounce tracking mitigations=] with a [=Window=] object when a service worker is +accessed using navigator.serviceWorker.getRegistration(). 8. [=set/For each=] |navigable| in |navigables|: 1. If |navigable| is not a [=top-level traversable=], then abort these steps. From 1bd9ae6f03dd5110c3cbe8eb72778651376dd68d Mon Sep 17 00:00:00 2001 From: Anton Maliev Date: Thu, 28 Dec 2023 21:12:53 +0000 Subject: [PATCH 7/7] Add user activation set --- index.bs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 327443d..8a56643 100644 --- a/index.bs +++ b/index.bs @@ -50,7 +50,7 @@ spec: RFC6265; urlPrefix: https://tools.ietf.org/html/rfc6265/ type: dfn text: cookie store; url: section-5.3 text: domain-match; url: section-5.1.3 -spec: RFC7234; urlPrefix: https://tools.ietf.org/html/rfc7234/ +spec: RFC9111; urlPrefix: https://tools.ietf.org/html/rfc9111/ type: dfn text: network cache; url: section-2 @@ -353,6 +353,8 @@ A bounce tracking record is a [=struct=] whose items are:
A [=set=] of [=sites=]' [=hosts=]. All server-side and client-side redirects hit during this [=extended navigation=].
storage access set
A [=set=] of [=sites=]' [=hosts=]. All sites which accessed storage during this [=extended navigation=].
+
user activation set
+
A [=set=] of [=sites=]' [=hosts=]. All sites which received a user activation during this [=extended navigation=].

Constants

@@ -405,6 +407,9 @@ the following steps: 1. Set [=user activation map=][|host|] to |topDocument|'s [=relevant settings object=]'s [=environment settings object/current wall time=]. +1. If |navigable|'s [=top-level traversable/bounce tracking record=] is not null: + 1. [=set/Append=] |host| to |navigable|'s [=top-level traversable/bounce tracking record=]'s + [=bounce tracking record/storage access set=]. @@ -493,6 +498,8 @@ Note: This includes the case where the current navigation was initiated by anoth 1. Run [=record stateful bounces for bounce tracking=] given |navigable|'s [=navigable/active document=]'s [=relevant global object=]. 1. Set |navigable|'s [=top-level traversable/bounce tracking record=] to a new [=bounce tracking record=] with [=bounce tracking record/initial host=] set to |initialHost|. + 1. [=set/Append=] |initialHost| to |navigable|'s [=top-level traversable/bounce tracking record=]'s + [=bounce tracking record/user activation set=]. 1. Otherwise, add |initialHost| to |navigable|'s [=top-level traversable/bounce tracking record=]'s [=bounce tracking record/bounce set=].