Skip to content

Commit

Permalink
Merge pull request #216 from dmcardle/add-max-contributions
Browse files Browse the repository at this point in the history
[spec] Enable per-context contribution limits for Private Aggregation
  • Loading branch information
jkarlin authored Jan 28, 2025
2 parents cdd6eb0 + e98524b commit abafb9b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ spec: private-aggregation-api; urlPrefix: https://patcg-individual-drafts.github
for: pre-specified report parameters
text: context ID
text: filtering ID max bytes
text: max contributions
text: batching scope
text: debug scope
text: process contributions for a batching scope
Expand Down Expand Up @@ -579,11 +580,20 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
1. If |filteringIdMaxBytes| is not the [=default filtering ID max bytes=] or
|contextId| is not null, return a new {{DOMException}} with name
"`DataError`".
1. Let |maxContributions| be null.
1. If
|privateAggregationConfig|["{{SharedStoragePrivateAggregationConfig/maxContributions}}"]
[=map/exists=], set |maxContributions| to
|privateAggregationConfig|["{{SharedStoragePrivateAggregationConfig/maxContributions}}"].
1. If |maxContributions| is zero, return a new {{DOMException}} with name
"`DataError`".
1. Return a new [=pre-specified report parameters=] with the items:
: <a spec="private-aggregation-api" for="pre-specified report parameters">context ID</a>
:: |contextId|
: [=pre-specified report parameters/filtering ID max bytes=]
:: |filteringIdMaxBytes|
: [=pre-specified report parameters/max contributions=]
:: |maxContributions|
</div>

<div algorithm>
Expand Down Expand Up @@ -1604,6 +1614,7 @@ On the other hand, methods for getting data from the [=shared storage database=]
USVString aggregationCoordinatorOrigin;
USVString contextId;
[EnforceRange] unsigned long long filteringIdMaxBytes;
[EnforceRange] unsigned long long maxContributions;
};

dictionary SharedStorageRunOperationMethodOptions {
Expand Down

0 comments on commit abafb9b

Please sign in to comment.