@@ -1870,13 +1870,13 @@ and a [=real time reporting contributions map=] |realTimeContributionsMap|:
1870
1870
[=get direct from seller signals for a seller=] given |topLevelDirectFromSellerSignals|.
1871
1871
1. Set |topLevelDirectFromSellerSignalsRetrieved| to true.
1872
1872
1. If |compWinnerInfo|'s [=leading bid info/leading bid=] is not null, then run
1873
- [=score and rank a bid=] with |auctionConfig|, |reportingContextMap|[auctionConfig],
1873
+ [=score and rank a bid=] with |auctionConfig|, |reportingContextMap|[| auctionConfig| ],
1874
1874
|compWinnerInfo|'s [=leading bid info/leading bid=], |leadingBidInfo|,
1875
1875
|decisionLogicFetcher|, |trustedScoringSignalsBatcher|, null, "top-level-auction", null,
1876
1876
and |topLevelOrigin|.
1877
1877
1. If |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=]
1878
1878
is not null, then run [=score and rank a bid=] with |auctionConfig|, |reportingContextMap|[
1879
- auctionConfig], |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=],
1879
+ | auctionConfig| ], |compWinnerInfo|'s [=leading bid info/leading non-k-anon-enforced bid=],
1880
1880
|leadingBidInfo|, |decisionLogicFetcher|, |trustedScoringSignalsBatcher|,
1881
1881
|topLevelDirectFromSellerSignalsForSeller|, null, "top-level-auction", null, |topLevelOrigin|,
1882
1882
and |realTimeContributionsMap|.
@@ -3137,17 +3137,20 @@ a [=list=] of [=interest groups=] |bidIgs|, and a [=reporting context map=]
3137
3137
[=bid debug reporting info/bidder debug loss report url=] to |maybeDebugReportUrl|.
3138
3138
1. Set |bidDebugReportingInfo|'s [=bid debug reporting info/server filtered debugging only reports=]
3139
3139
to [=server auction response/server filtered debugging only reports=].
3140
- 1. Set |reportingContextMap|[|auctionConfig|]'s [=reporting context/debug reporting info=] to
3140
+ 1. Let |reportingContext| be |reportingContextMap|[|auctionConfig|].
3141
+ 1. Set |reportingContext|'s [=reporting context/debug reporting info=] to
3141
3142
|bidDebugReportingInfo|.
3142
3143
1. Let |reportingId| be a [=reporting bid key=] with the following [=struct/items=]:
3143
3144
: [=reporting bid key/context=]
3144
- :: |reportingContextMap|[|auctionConfig|]
3145
+ :: |reportingContext|
3145
3146
: [=reporting bid key/source=]
3146
3147
:: [=reporting bid source/bidding-and-auction-services=]
3147
3148
: [=reporting bid key/bidder origin=]
3148
3149
:: |response|'s [=server auction response/interest group owner=]
3149
3150
: [=reporting bid key/bid identifier=]
3150
3151
:: |response|'s [=server auction response/interest group name=]
3152
+ 1. [=Handle server response private aggregation fields=] given |response|, |requestContext| and
3153
+ |reportingId|.
3151
3154
1. Let |winningBid| be a new [=generated bid=] with the following [=struct/items=]:
3152
3155
: [=generated bid/reporting id=]
3153
3156
:: |reportingId|
@@ -3247,6 +3250,67 @@ a [=list=] of [=interest groups=] |bidIgs|, and a [=reporting context map=]
3247
3250
3248
3251
</div>
3249
3252
3253
+ <div algorithm>
3254
+ To <dfn>handle server response private aggregation fields</dfn> given a [=server auction response=]
3255
+ |response|, a [=reporting context=] |reportingContext|, and a [=reporting bid key=] |reportingId|:
3256
+
3257
+ 1. [=Assert=] that these steps are running [=in parallel=].
3258
+ 1. [=Commit server response private aggregation contributions=] given |response|'s
3259
+ [=server auction response/component win private aggregation contributions=], |reportingContext|,
3260
+ and |reportingId|.
3261
+ 1. [=Commit server response private aggregation contributions=] given |response|'s
3262
+ [=server auction response/server filtered private aggregation reserved contributions=],
3263
+ |reportingContext|, and |reportingId|.
3264
+ 1. [=Commit server response private aggregation contributions=] given |response|'s
3265
+ [=server auction response/server filtered private aggregation non reserved contributions=],
3266
+ |reportingContext|, and |reportingId|.
3267
+
3268
+ </div>
3269
+
3270
+ <div algorithm>
3271
+ To <dfn>commit server response private aggregation contributions</dfn> given a [=map=] from a
3272
+ [=server auction private aggregation contribution key=] to a [=list=] of [=on event contribution entries=]
3273
+ |contributionsMap|, a [=reporting context=] |reportingContext|, and a [=reporting bid key=]
3274
+ |reportingId|:
3275
+
3276
+ 1. [=map/For each=] |key| → |contributions| of |contributionsMap|:
3277
+ 1. Let |reportingOrigin| be |key|'s [=server auction private aggregation contribution key/reporting origin=].
3278
+ 1. Let |event| be |key|'s [=server auction private aggregation contribution key/event=].
3279
+ 1. Let |coordinator| be |key|'s [=server auction private aggregation contribution key/coordinator=].
3280
+ 1. If |coordinator| is null, set |coordinator| to the [=default aggregation coordinator=].
3281
+ 1. Let |eventToContributionsMap| be a new [=Private Aggregation contributions=].
3282
+ 1. Let |batchingScope| be null.
3283
+ 1. If |event| [=string/starts with=] "`reserved.`", set |batchingScope| to the
3284
+ result of running [=get or create a batching scope=] given |reportingOrigin|, |coordinator| and
3285
+ |reportingContext|.
3286
+
3287
+ Note: Each non-reserved |event| will have a different [=batching scope=] that is created later.
3288
+ 1. [=list/For each=] |contribution| of |contributions|:
3289
+ 1. [=Assert=] |contribution|["{{PAExtendedHistogramContribution/bucket}}"] is a {{bigint}} and
3290
+ is [=set/contained=] in [=the exclusive range|the range=] 0 to 2<sup>128</sup>, exclusive.
3291
+ 1. [=Assert=] |contribution|["{{PAExtendedHistogramContribution/value}}"] is a {{long}}.
3292
+
3293
+ Note: All {{PAExtendedHistogramContribution/bucket}} and {{PAExtendedHistogramContribution/value}}
3294
+ have been calculated on server side already.
3295
+ 1. Let |entry| be a new [=on event contribution entry=] with the items:
3296
+ : [=on event contribution entry/contribution=]
3297
+ :: |contribution|
3298
+ : [=on event contribution entry/batching scope=]
3299
+ :: |batchingScope|
3300
+ : [=on event contribution entry/debug scope=]
3301
+ :: A new [=debug scope=].
3302
+ : [=on event contribution entry/worklet function=]
3303
+ :: "`generate-bid`" (it does not matter for server returned contributions)
3304
+ : [=on event contribution entry/origin=]
3305
+ :: |reportingOrigin|
3306
+ 1. If |eventToContributionsMap|[|event|] does not [=map/exist=], set
3307
+ |eventToContributionsMap|[|event|] to « |entry| ».
3308
+ 1. Otherwise, [=list/append=] |entry| to |eventToContributionsMap|[|event|].
3309
+ 1. [=Commit private aggregation contributions=] given |eventToContributionsMap|, |reportingId| and
3310
+ |reportingContext|.
3311
+
3312
+ </div>
3313
+
3250
3314
<h3 id="canloadadauctionfencedframe">canLoadAdAuctionFencedFrame()</h3>
3251
3315
3252
3316
*This first introductory paragraph is non-normative.*
@@ -3478,6 +3542,21 @@ A <dfn>server auction response</dfn> is a [=struct=] that contains auction resul
3478
3542
:: Null or [=server auction reporting info=].
3479
3543
: <dfn>component seller reporting</dfn>
3480
3544
:: Null or [=server auction reporting info=].
3545
+ : <dfn>component win private aggregation contributions</dfn>
3546
+ :: A [=map=] whose [=map/keys=] are [=server auction private aggregation contribution keys=], and
3547
+ whose [=map/values=] are [=lists=] of [=on event contribution entries=]. Private aggregation
3548
+ contributions from winners of component auctions run on trusted auction servers. These need to
3549
+ be filtered by the client based on the top level auction's outcome.
3550
+ : <dfn>server filtered private aggregation reserved contributions</dfn>
3551
+ :: A [=map=] whose [=map/keys=] are [=server auction private aggregation contribution keys=], and
3552
+ whose [=map/values=] are [=lists=] of [=on event contribution entries=]. Server filtered private
3553
+ aggregation contributions with reserved event types (already set to "reserved.always"), which
3554
+ are not dependent on the final auction result and should always be reported.
3555
+ : <dfn>server filtered private aggregation non reserved contributions</dfn>
3556
+ :: A [=map=] whose [=map/keys=] are [=server auction private aggregation contribution keys=], and
3557
+ whose [=map/values=] are [=lists=] of [=on event contribution entries=]. Server filtered private
3558
+ aggregation contributions with non reserved event types, which are not dependent on the final
3559
+ auction result and should always be reported.
3481
3560
: <dfn>component win debugging only reports</dfn>
3482
3561
:: A [=map=] whose [=map/keys=] are [=server auction debug report keys=], and whose [=map/values=]
3483
3562
are [=lists=] of [=urls=].
@@ -3502,6 +3581,17 @@ a <dfn>server auction debug report key</dfn> is a [=struct=] with the following
3502
3581
:: A [=boolean=].
3503
3582
</dl>
3504
3583
3584
+ a <dfn>server auction private aggregation contribution key</dfn> is a [=struct=] with the following
3585
+ [=struct/items=]:
3586
+ <dl dfn-for="server auction private aggregation contribution key">
3587
+ : <dfn>reporting origin</dfn>
3588
+ :: The [=origin=] of the script that contributed the contribution.
3589
+ : <dfn>coordinator</dfn>
3590
+ :: Null or an [=aggregation coordinator=].
3591
+ : <dfn>event</dfn>
3592
+ :: A [=string=].
3593
+ </dl>
3594
+
3505
3595
<div algorithm="getInterestGroupAdAuctionData()">
3506
3596
3507
3597
The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> method steps are:
@@ -3531,18 +3621,22 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m
3531
3621
1. Set |config|'s [=auction data config/encryption key=] to |key|.
3532
3622
1. Set |config|'s [=auction data config/encryption key id=] to |keyId|.
3533
3623
1. Let |igMap| be a new [=map=] whose [=map/keys=] are [=origins=] and [=map/values=] are [=lists=].
3624
+ 1. Let |igPAggCoordinatorMap| be a new [=map=] whose [=map/keys=] are tuples of ([=origins=], [=strings=])
3625
+ and [=map/values=] are [=origins=].
3534
3626
1. Let |startTime| be a [=moment=] equal to the [=current coarsened wall time=].
3535
3627
1. [=list/For each=] |ig| of the [=user agent=]'s [=interest group set=]:
3536
3628
1. If |ig|'s [=interest group/ads=] is null or [=list/is empty=], [=iteration/continue=].
3537
3629
1. Let |owner| be |ig|'s [=interest group/owner=].
3630
+ 1. Let |name| be |ig|'s [=interest group/name=].
3538
3631
1. If |config|'s [=auction data config/per buyer config=] [=map/is not empty=] and
3539
3632
|config|'s [=auction data config/per buyer config=][|owner|] does not
3540
3633
[=map/exist=], then [=iteration/continue=].
3541
3634
1. If |igMap|[|owner|] does not [=map/exist=], then [=map/set=] |igMap|[|owner|] to a new [=list=].
3542
3635
1. Let |ads| be a new [=list=].
3543
3636
1. [=list/For each=] |ad| in |ig|'s [=interest group/ads=], [=list/append=] |ad|'s [=interest group ad/ad render ID=] to |ads|.
3544
3637
1. Let |components| be a new [=list=].
3545
- 1. [=list/For each=] |component| in |ig|'s [=interest group/ad components=], [=list/append=] |component|'s [=interest group ad/ad render ID=] to |components|.
3638
+ 1. [=list/For each=] |component| in |ig|'s [=interest group/ad components=], [=list/append=]
3639
+ |component|'s [=interest group ad/ad render ID=] to |components|.
3546
3640
1. Let |prevWins| be a new <code>[=sequence=]<[=server auction previous win=]></code>.
3547
3641
1. [=list/For each=] |prevWin| of |ig|'s [=interest group/previous wins=] for all days within the
3548
3642
the last 30 days:
@@ -3567,7 +3661,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m
3567
3661
:: |prevWins|
3568
3662
1. Let |serverIg| be a new [=server auction interest group=] with the following [=struct/items=]:
3569
3663
: [=server auction interest group/name=]
3570
- :: |ig|'s [=interest group/ name=]
3664
+ :: |name|
3571
3665
: [=server auction interest group/bidding signals keys=]
3572
3666
:: |ig|'s [=interest group/trusted bidding signals keys=]
3573
3667
: [=server auction interest group/user bidding signals=]
@@ -3581,11 +3675,13 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m
3581
3675
: [=server auction interest group/priority=]
3582
3676
:: |ig|'s [=interest group/priority=]
3583
3677
1. [=list/Append=] |serverIg| to |igMap|[|owner|].
3678
+ 1. If |ig|'s [=interest group/Private Aggregation coordinator=] is not null, then [=map/set=]
3679
+ |igPAggCoordinatorMap|[(|owner|, |name|)] to it.
3584
3680
1. Let |result| be a new {{AdAuctionData}}.
3585
3681
1. Let |requestId| be the [=string representation=] of a [=version 4 UUID=].
3586
3682
1. [=map/Set=] |result|["{{AdAuctionData/requestId}}"] to |requestId|.
3587
- 1. Let (|requestBlob|, |context|) be the result of serializing |igMap| using
3588
- |config |. The serialization method may follow that described in
3683
+ 1. Let (|requestBlob|, |context|) be the result of serializing |igMap| with |config| and
3684
+ |igPAggCoordinatorMap |. The serialization method may follow that described in
3589
3685
[Section 2.2.4 of Bidding and Auction Services](https://privacysandbox.github.io/draft-ietf-bidding-and-auction-services/draft-ietf-bidding-and-auction-services.html#name-generating-a-request).
3590
3686
1. Set |result|["{{AdAuctionData/request}}"] to |requestBlob|.
3591
3687
1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to
@@ -4206,8 +4302,7 @@ A signal base value is one of the following:
4206
4302
: "<dfn><code>bid-reject-reason</code></dfn>"
4207
4303
:: The numeric value is an integer representing the reason a bid was rejected.
4208
4304
4209
- Note: this mapping to an integer is defined in [=determine a signal's
4210
- numeric value=].
4305
+ Note: this mapping to an integer is defined in [=determine a signal's numeric value=].
4211
4306
4212
4307
: "<dfn><code>average-code-fetch-time</code></dfn>"
4213
4308
:: The numeric value is the average time it took to fetch code resources (JavaScript or WebAssembly)
@@ -4423,7 +4518,7 @@ runs; this method exists as an abstraction to help add that.
4423
4518
</div>
4424
4519
4425
4520
<div algorithm>
4426
- To <dfn>commit private aggregation contributions</dfn> given an [=Private Aggregation
4521
+ To <dfn>commit private aggregation contributions</dfn> given a [=Private Aggregation
4427
4522
contributions=] |onEventMap|, a [=reporting bid key=] |bidKey|, and a [=reporting context=]
4428
4523
|reportingContext|:
4429
4524
1. [=map/For each=] |event| → |contributions| of |onEventMap|:
@@ -4465,6 +4560,7 @@ To <dfn>process the Private Aggregation contributions</dfn> given an [=auction c
4465
4560
<div algorithm>
4466
4561
To <dfn>process the Private Aggregation contributions for an auction</dfn> given
4467
4562
an [=auction config=] |auctionConfig| and a [=reporting context=] |reportingContext|:
4563
+
4468
4564
1. If |auctionConfig|'s [=auction config/aborted=] is true, return.
4469
4565
1. Let |winnerId| be |reportingContext|'s [=reporting context/winner reporting id=]
4470
4566
1. Let |leadingBidInfo| be |reportingContext|'s [=reporting context/local leader info=].
@@ -4474,12 +4570,13 @@ an [=auction config=] |auctionConfig| and a [=reporting context=] |reportingCont
4474
4570
1. Let |sellerOnceRep| be null.
4475
4571
1. If |reportingContext|'s [=reporting context/seller participants=] [=set/is not empty=],
4476
4572
set |sellerOnceRep| to a random [=set/item=] of [=reporting context/seller participants=].
4477
- 1. [=map/For each=] (|bidId|, |event|) → |contributions| of
4478
- |reportingContext|'s [=reporting context/private aggregation on event contributions=]:
4479
- 1. If |event| is "`reserved.win`" or does not [=string/start with=] "`reserved.`":
4480
- 1. If |bidId| is not |winnerId|, [=iteration/continue=].
4481
- 1. If |event| is "`reserved.loss`" and |bidId| is |winnerId|, [=iteration/continue=].
4573
+ 1. [=map/For each=] (|bidId|, |event|) → |contributions| of |reportingContext|'s
4574
+ [=reporting context/private aggregation on event contributions=]:
4482
4575
1. [=list/For each=] |onEventEntry| of |contributions|:
4576
+ 1. [=iteration/Continue=] if any of the following conditions hold:
4577
+ * |event| is "`reserved.win`" and |bidId| is not |winnerId|;
4578
+ * |event| does not [=string/start with=] "`reserved.`" and |bidId| is not |winnerId|;
4579
+ * |event| is "`reserved.loss`" and |bidId| is |winnerId|.
4483
4580
1. If |event| is "`reserved.once`":
4484
4581
1. If |onEventEntry|'s [=on event contribution entry/worklet function=] is [=worklet function/
4485
4582
generate-bid=]:
@@ -6072,6 +6169,8 @@ event, PAExtendedHistogramContribution contribution)</dfn> method steps are:
6072
6169
6073
6170
Note: It is not currently possible to set a non-default filtering ID max
6074
6171
bytes for Protected Audience.
6172
+ 1. If |event| does not [=string/start with=] "`reserved.`", and |function| is
6173
+ [=worklet function/score-ad=] or [=worklet function/report-result=], return.
6075
6174
1. Let |batchingScope| be null.
6076
6175
1. If |event| [=string/starts with=] "`reserved.`", set |batchingScope| to the
6077
6176
result of running |scopingDetails|' <a spec="private-aggregation-api" for="scoping details">
0 commit comments