Skip to content

Commit abafb9b

Browse files
authored
Merge pull request #216 from dmcardle/add-max-contributions
[spec] Enable per-context contribution limits for Private Aggregation
2 parents cdd6eb0 + e98524b commit abafb9b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec.bs

+11
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ spec: private-aggregation-api; urlPrefix: https://patcg-individual-drafts.github
133133
for: pre-specified report parameters
134134
text: context ID
135135
text: filtering ID max bytes
136+
text: max contributions
136137
text: batching scope
137138
text: debug scope
138139
text: process contributions for a batching scope
@@ -579,11 +580,20 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
579580
1. If |filteringIdMaxBytes| is not the [=default filtering ID max bytes=] or
580581
|contextId| is not null, return a new {{DOMException}} with name
581582
"`DataError`".
583+
1. Let |maxContributions| be null.
584+
1. If
585+
|privateAggregationConfig|["{{SharedStoragePrivateAggregationConfig/maxContributions}}"]
586+
[=map/exists=], set |maxContributions| to
587+
|privateAggregationConfig|["{{SharedStoragePrivateAggregationConfig/maxContributions}}"].
588+
1. If |maxContributions| is zero, return a new {{DOMException}} with name
589+
"`DataError`".
582590
1. Return a new [=pre-specified report parameters=] with the items:
583591
: <a spec="private-aggregation-api" for="pre-specified report parameters">context ID</a>
584592
:: |contextId|
585593
: [=pre-specified report parameters/filtering ID max bytes=]
586594
:: |filteringIdMaxBytes|
595+
: [=pre-specified report parameters/max contributions=]
596+
:: |maxContributions|
587597
</div>
588598

589599
<div algorithm>
@@ -1604,6 +1614,7 @@ On the other hand, methods for getting data from the [=shared storage database=]
16041614
USVString aggregationCoordinatorOrigin;
16051615
USVString contextId;
16061616
[EnforceRange] unsigned long long filteringIdMaxBytes;
1617+
[EnforceRange] unsigned long long maxContributions;
16071618
};
16081619

16091620
dictionary SharedStorageRunOperationMethodOptions {

0 commit comments

Comments
 (0)