@@ -164,8 +164,9 @@ contributeToHistogram(PAHistogramContribution contribution)</dfn> method steps
164
164
are:
165
165
</div>
166
166
167
- 1. If |contribution|["{{PAHistogramContribution/bucket}}"] is not in the range
168
- [0, 2<sup>128</sup>−1] , [=exception/throw=] a {{RangeError}} .
167
+ 1. If |contribution|["{{PAHistogramContribution/bucket}}"] is not [=set/
168
+ contained=] in [=the exclusive range|the range=] 0 to 2<sup> 128</sup> ,
169
+ exclusive, [=exception/throw=] a {{RangeError}} .
169
170
1. If |contribution|["{{PAHistogramContribution/value}}"] is negative,
170
171
[=exception/throw=] a {{RangeError}} .
171
172
1. Let |scopingDetails| be [=this=] 's [=PrivateAggregation/scoping details=] .
@@ -212,10 +213,10 @@ enableDebugMode(optional PADebugModeOptions options)</dfn> method steps are:
212
213
[=debug scope=] .
213
214
1. Let |debugKey| be null.
214
215
1. If |options| was given:
215
- 1. If |options|["{{PADebugModeOptions/debugKey}}] is not in the range
216
- [0, 2<sup>64</sup>−1] , [=exception/throw=] a " {{DataError}} "
217
- {{DOMException}} .
218
- 1. Set |debugKey| to |options|["{{PADebugModeOptions/debugKey}}] .
216
+ 1. If |options|["{{PADebugModeOptions/debugKey}}" ] is not [=set/contained=]
217
+ in [=the exclusive range|the range=] 0 to 2<sup> 64</sup> , exclusive,
218
+ [=exception/throw=] a " {{DataError}} " {{DOMException}} .
219
+ 1. Set |debugKey| to |options|["{{PADebugModeOptions/debugKey}}" ] .
219
220
1. Let |debugDetails| be a new [=debug details=] with the items:
220
221
: [=debug details/enabled=]
221
222
:: true
@@ -659,8 +660,10 @@ null |timeout|:
659
660
1. Otherwise, set |truncatedContributions| to |contributions|.
660
661
1. Let |contributionSum| be 0.
661
662
1. [=set/iterate|For each=] |contribution| of |truncatedContributions|:
662
- 1. [=Assert=] : |contribution|["|value|"] is non-negative.
663
- 1. Add |contribution|["|value|"] to |contributionSum|.
663
+ 1. [=Assert=] : |contribution|["{{PAHistogramContribution/value}}"] is
664
+ non-negative.
665
+ 1. Add |contribution|["{{PAHistogramContribution/value}}"] to
666
+ |contributionSum|.
664
667
1. Let |currentWallTime| be the [=current wall time=] .
665
668
1. Let |sufficientBudget| be the result of [=consuming budget if permitted=]
666
669
given |contributionSum|, |reportingOrigin|, |api| and |currentWallTime|.
@@ -1104,12 +1107,14 @@ To <dfn algorithm>obtain the aggregation coordinator</dfn> given a
1104
1107
{{SharedStorageRunOperationMethodOptions}} |options|, perform the following
1105
1108
steps. They return an [=aggregation coordinator=] , null or a {{DOMException}} :
1106
1109
1107
- 1. If |options|["`privateAggregationConfig`"] does not [=map/exist=] , return
1108
- null.
1109
- 1. If |options|["`privateAggregationConfig`"]["`aggregatonCoordinatorOrigin`"]
1110
+ 1. If
1111
+ |options|["{{SharedStorageRunOperationMethodOptions/privateAggregationConfig}}"]
1112
+ does not [=map/exist=] , return null.
1113
+ 1. If
1114
+ |options|["{{SharedStorageRunOperationMethodOptions/privateAggregationConfig}}"]["{{SharedStoragePrivateAggregationConfig/aggregationCoordinatorOrigin}}"]
1110
1115
does not [=map/exist=] , return null.
1111
1116
1. Let |url| be the result of running the [=URL parser=] on
1112
- |options|["` privateAggregationConfig` "]["`aggregatonCoordinatorOrigin` "] .
1117
+ |options|["{{SharedStorageRunOperationMethodOptions/ privateAggregationConfig}} "]["{{SharedStoragePrivateAggregationConfig/aggregationCoordinatorOrigin}} "] .
1113
1118
1. If |url| is failure or null, return a new {{DOMException}} with name
1114
1119
"`SyntaxError`".
1115
1120
@@ -1395,8 +1400,8 @@ event, PAExtendedHistogramContribution contribution)</dfn> method steps are:
1395
1400
1. If |bucket|["{{PASignalValue/offset}}"] is not a {{bigint}} , [=exception/
1396
1401
throw=] a {{TypeError}} .
1397
1402
1. Otherwise, if |contribution|["{{PAExtendedHistogramContribution/bucket}}"] is
1398
- not in the range [0, 2<sup>128</sup>−1] , [=exception/throw=] a
1399
- {{TypeError}} .
1403
+ not [=set/contained=] in [= the exclusive range|the range=] 0 to
1404
+ 2 <sup> 128 </sup> , exclusive, [=exception/throw=] a {{TypeError}} .
1400
1405
1401
1406
Issue: Make the error type consistent with
1402
1407
{{PrivateAggregation/contributeToHistogram(contribution)}} .
@@ -1406,7 +1411,7 @@ event, PAExtendedHistogramContribution contribution)</dfn> method steps are:
1406
1411
value=] , [=exception/throw=] a {{TypeError}} .
1407
1412
1. If |value|["{{PASignalValue/offset}}"] is a {{bigint}} , [=exception/
1408
1413
throw=] a {{TypeError}} .
1409
- 1. Otherwise, if |contribution|["{{PAHistogramContribution /value}}"] is
1414
+ 1. Otherwise, if |contribution|["{{PAExtendedHistogramContribution /value}}"] is
1410
1415
negative, [=exception/throw=] a {{TypeError}} .
1411
1416
1. If |contribution|["{{PAExtendedHistogramContribution/filteringId}}"] is
1412
1417
not [=set/contained=] in [=the exclusive range|the range=] 0 to
@@ -1631,11 +1636,11 @@ The {{Navigator/joinAdInterestGroup()}} method steps are modified to add the
1631
1636
following steps at the end of the scope nested under step 5 ("Validate the given
1632
1637
<var ignore> group</var> and ..."):
1633
1638
<div algorithm="protected-audience-joinadig-monkey-patch">
1634
- 17. If |group|[{{AuctionAdInterestGroup/privateAggregationConfig}}]
1639
+ 17. If |group|[" {{AuctionAdInterestGroup/privateAggregationConfig}}" ]
1635
1640
[=map/exists=] :
1636
1641
1. Let |aggregationCoordinator| be the result of [=obtaining the Private
1637
1642
Aggregation coordinator=] given
1638
- |group|[{{AuctionAdInterestGroup/privateAggregationConfig}}] .
1643
+ |group|[" {{AuctionAdInterestGroup/privateAggregationConfig}}" ] .
1639
1644
1. If |aggregationCoordinator| is a {{DOMException}} , then
1640
1645
[=exception/throw=] |aggregationCoordinator|.
1641
1646
1. Set <var ignore> interestGroup</var> 's [=interest group/Private
@@ -1660,19 +1665,19 @@ The <a spec="turtledove">validate and convert auction ad config</a> steps are
1660
1665
modified to add the following steps just before the last step ("Return
1661
1666
<var ignore> auctionConfig</var> "), renumbering the later step as appropriate:
1662
1667
<div algorithm="protected-audience-validate-config-monkey-patch">
1663
- 31. If |config|["<code>{{AuctionAdConfig/auctionReportBuyerKeys}}</code>"]
1664
- [=map/exists=] :
1668
+ 31. If |config|["{{AuctionAdConfig/auctionReportBuyerKeys}}"] [=map/exists=] :
1665
1669
1. Let |interestGroupBuyers| be |auctionConfig|'s <a spec="turtledove"
1666
1670
for="auction config">interest group buyers</a> .
1667
1671
1. If |interestGroupBuyers| is null, set |interestGroupBuyers| to a new
1668
1672
[=list=] .
1669
1673
1. [=list/For each=] |index| of [=the exclusive range|the range=] 0 to
1670
- |config|["<code> {{AuctionAdConfig/auctionReportBuyerKeys}}</code> "] 's
1671
- [=list/size=] , exclusive:
1674
+ |config|["{{AuctionAdConfig/auctionReportBuyerKeys}}"] 's [=list/size=] ,
1675
+ exclusive:
1672
1676
1. Let |key| be
1673
- |config|["<code>{{AuctionAdConfig/auctionReportBuyerKeys}}</code>"][|index|] .
1674
- 1. If |key| is not in the range [0, 2<sup>128</sup>−1] ,
1675
- [=exception/throw=] a {{TypeError}} .
1677
+ |config|["{{AuctionAdConfig/auctionReportBuyerKeys}}"][|index|] .
1678
+ 1. If |key| is not [=set/contained=] in [=the exclusive range|the
1679
+ range=] 0 to 2<sup> 128</sup> , exclusive, [=exception/throw=] a
1680
+ {{TypeError}} .
1676
1681
1. If |index| is equal to or greater than |interestGroupBuyers|' [=list/
1677
1682
size=] , [=iteration/continue=] .
1678
1683
@@ -1684,10 +1689,9 @@ modified to add the following steps just before the last step ("Return
1684
1689
1685
1690
Issue: Check behavior when an origin is repeated in
1686
1691
{{AuctionAdConfig/interestGroupBuyers}} .
1687
- 1. If |config|["<code>{{AuctionAdConfig/auctionReportBuyers}}</code>"] [=map/
1688
- exists=] :
1692
+ 1. If |config|["{{AuctionAdConfig/auctionReportBuyers}}"] [=map/exists=] :
1689
1693
1. [=map/For each=] |reportType| → |reportBuyerConfig| of
1690
- |config|["<code> {{AuctionAdConfig/auctionReportBuyers}}</code> "] :
1694
+ |config|["{{AuctionAdConfig/auctionReportBuyers}}"] :
1691
1695
1. If « "`interestGroupCount`", "`bidCount`",
1692
1696
"`totalGenerateBidLatency`", "`totalSignalsFetchLatency`" » does not
1693
1697
[=list/contain=] |reportType|, [=iteration/continue=] .
@@ -1697,9 +1701,9 @@ modified to add the following steps just before the last step ("Return
1697
1701
1698
1702
Issue: Should these strings be dash delimited?
1699
1703
1700
- 1. If |reportBuyerConfig|["<code> {{AuctionReportBuyersConfig
1701
- /bucket}} </code> "] is not in the range [0, 2<sup>128</sup>−1] ,
1702
- [=exception/throw=] a {{TypeError}} .
1704
+ 1. If |reportBuyerConfig|["{{AuctionReportBuyersConfig/bucket}}"] is not
1705
+ [=set/contained=] in [=the exclusive range| the range=] 0 to
1706
+ 2 <sup> 128 </sup> , exclusive, [=exception/throw=] a {{TypeError}} .
1703
1707
1704
1708
Issue: Consider validating the case where the bucket used (after
1705
1709
summing) is too large. Currently, the implementation appears to
@@ -1711,28 +1715,29 @@ modified to add the following steps just before the last step ("Return
1711
1715
1712
1716
1. Set |auctionConfig|'s [=auction config/auction report buyer debug details=]
1713
1717
to a new [=debug details=] .
1714
- 1. If |config|[{{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}]
1718
+ 1. If |config|[" {{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}" ]
1715
1719
[=map/exists=] :
1716
1720
1. Let |debugModeConfig| be
1717
- |config|[{{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}] .
1721
+ |config|[" {{AuctionAdConfig/auctionReportBuyerDebugModeConfig}}" ] .
1718
1722
1. Let |enabled| be
1719
- |debugModeConfig|[{{AuctionReportBuyerDebugModeConfig/enabled}}] .
1723
+ |debugModeConfig|[" {{AuctionReportBuyerDebugModeConfig/enabled}}" ] .
1720
1724
1. Let |debugKey| be
1721
- |debugModeConfig|[{{AuctionReportBuyerDebugModeConfig/debugKey}}] .
1725
+ |debugModeConfig|[" {{AuctionReportBuyerDebugModeConfig/debugKey}}" ] .
1722
1726
1. If |debugKey| is not null:
1723
- 1. If |debugKey| is not in the range [0, 2<sup>64</sup>−1] , [=exception/
1724
- throw=] a {{TypeError}} .
1727
+ 1. If |debugKey| is not [=set/contained=] in [=the exclusive range|the
1728
+ range=] 0 to 2<sup> 64</sup> , exclusive, [=exception/throw=] a
1729
+ {{TypeError}} .
1725
1730
1. If |enabled| is false, [=exception/throw=] a {{TypeError}} .
1726
1731
1. Set |auctionConfig|'s [=auction config/auction report buyer debug
1727
1732
details=] to a new [=debug details=] with the items:
1728
1733
: [=debug details/enabled=]
1729
1734
:: |enabled|
1730
1735
: [=debug details/key=]
1731
1736
:: |debugKey|
1732
- 1. If |config|[{{AuctionAdConfig/privateAggregationConfig}}] [=map/exists=] :
1737
+ 1. If |config|[" {{AuctionAdConfig/privateAggregationConfig}}" ] [=map/exists=] :
1733
1738
1. Let |aggregationCoordinator| be the result of [=obtaining the Private
1734
1739
Aggregation coordinator=] given
1735
- |config|[{{AuctionAdConfig/privateAggregationConfig}}] .
1740
+ |config|[" {{AuctionAdConfig/privateAggregationConfig}}" ] .
1736
1741
1. If |aggregationCoordinator| is a {{DOMException}} , return failure.
1737
1742
1. Set <var ignore> auctionConfig</var> 's [=auction config/seller Private
1738
1743
Aggregation coordinator=] to |aggregationCoordinator|.
@@ -1859,13 +1864,13 @@ renumbering the later step as appropriate:
1859
1864
Then, we modify the invocations of the above algorithms to plumb the new
1860
1865
parameters in:
1861
1866
1862
- The <a spec="turtledove">generate a bid </a> algorithm is modified to add a new
1863
- <a spec="turtledove">auction config</a> parameter |auctionConfig|. Additionally,
1864
- its last step is modified by adding the argument |auctionConfig| to the
1865
- invocation of <a spec="turtledove">evaluating a bidding script</a> . Further, the
1866
- <a spec="turtledove">generate and score bids</a> algorithm is modified by
1867
- adding the argument |auctionConfig| to both invocations of
1868
- <a spec="turtledove">generate a bid </a> .
1867
+ The <a spec="turtledove">generate potentially multiple bids </a> algorithm is
1868
+ modified to add a new <a spec="turtledove">auction config</a> parameter
1869
+ |auctionConfig|. Additionally, its last step is modified by adding the argument
1870
+ |auctionConfig| to the invocation of <a spec="turtledove">evaluating a bidding
1871
+ script</a> . Further, the <a spec="turtledove">generate and score bids</a>
1872
+ algorithm is modified by adding the argument |auctionConfig| to both invocations
1873
+ of <a spec="turtledove">generate potentially multiple bids </a> .
1869
1874
1870
1875
The <a spec="turtledove">score and rank a bid</a> algorithm is modified by
1871
1876
adding the argument |auctionConfig| to the invocation of
@@ -2122,7 +2127,8 @@ integer |maxAllowed| and a <a spec="turtledove">leading bid info</a>
2122
2127
truncating its fractional part.
2123
2128
1. If |value|["{{PASignalValue/offset}}"] [=map/exists=] , set |returnValue| to
2124
2129
the result of adding |returnValue| to |value|["{{PASignalValue/offset}}"] .
2125
- 1. Clamp |returnValue| to the range [0, |maxAllowed|] and return the result.
2130
+ 1. Clamp |returnValue| to [=the inclusive range|the range=] 0 to |maxAllowed|,
2131
+ inclusive, and return the result.
2126
2132
2127
2133
To <dfn>determine a signal's numeric value</dfn> given a [=signal base value=]
2128
2134
|signalBaseValue| and a <a spec="turtledove">leading bid info</a>
@@ -2305,17 +2311,17 @@ namely how many contributions are included. To protect against this, the payload
2305
2311
is padded to a fixed number of contributions.
2306
2312
### Temporary debugging mechanism ### {#temporary-debugging-mechanism}
2307
2313
2308
- The <code> {{PrivateAggregation/enableDebugMode()}} </code> method allows for many
2309
- of the protections of this API to be bypassed to ease testing and integration.
2314
+ The {{PrivateAggregation/enableDebugMode()}} method allows for many of the
2315
+ protections of this API to be bypassed to ease testing and integration.
2310
2316
Specifically, the contents of the payload, i.e. the histogram contributions, are
2311
2317
revealed in the clear when the debug mode is enabled. Optionally, a debug key
2312
2318
can also be set to associate the report with the calling context. In the future,
2313
2319
this mechanism will only be available for callers that are eligible to set
2314
2320
third-party cookies. In that case, the API caller already has the ability to
2315
2321
communicate information cross-site.
2316
2322
2317
- Issue(57): Tie <code> {{PrivateAggregation/enableDebugMode()}} </code> to
2318
- third-party cookie eligibility.
2323
+ Issue(57): Tie {{PrivateAggregation/enableDebugMode()}} to third-party cookie
2324
+ eligibility.
2319
2325
2320
2326
### Privacy parameters ### {#privacy-parameters}
2321
2327
0 commit comments