Skip to content

Commit

Permalink
Spec: add glue for Private Aggregation's per-context contribution limits
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcardle committed Jan 8, 2025
1 parent 7f754f0 commit e14b208
Showing 1 changed file with 47 additions and 9 deletions.
56 changes: 47 additions & 9 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ spec: private-aggregation-api; urlPrefix: https://patcg-individual-drafts.github
text: contribution cache entry; url: #contribution-cache-entry
text: contribution cache; url: #contribution-cache
text: default filtering id max bytes; url: #default-filtering-id-max-bytes
text: pre-specified report parameters
for: pre-specified report parameters
text: context ID
text: filtering ID max bytes
text: requested max contributions
text: set the pre-specified report parameters for a batching scope
spec: Shared Storage API; urlPrefix: https://wicg.github.io/shared-storage
type: dfn
text: shared-storage; url: #permissionspolicy-shared-storage
Expand Down Expand Up @@ -247,7 +253,12 @@ dictionary GenerateBidInterestGroup {
record<DOMString, sequence<DOMString>> sizeGroups;
};

dictionary ProtectedAudiencePrivateAggregationConfig {
dictionary ProtectedAudienceAuctionPrivateAggregationConfig {
USVString aggregationCoordinatorOrigin;
[EnforceRange] unsigned long long maxContributions;
};

dictionary ProtectedAudienceInterestGroupPrivateAggregationConfig {
USVString aggregationCoordinatorOrigin;
};

Expand All @@ -256,7 +267,7 @@ dictionary AuctionAdInterestGroup : GenerateBidInterestGroup {
record<DOMString, double> prioritySignalsOverrides;
required double lifetimeMs;
DOMString additionalBidKey;
ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
ProtectedAudienceInterestGroupPrivateAggregationConfig privateAggregationConfig;
};
</xmp>

Expand Down Expand Up @@ -772,7 +783,7 @@ dictionary AuctionAdConfig {
record<DOMString, AuctionReportBuyersConfig> auctionReportBuyers;
AuctionReportBuyerDebugModeConfig auctionReportBuyerDebugModeConfig;
sequence<DOMString> requiredSellerCapabilities;
ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
ProtectedAudienceAuctionPrivateAggregationConfig privateAggregationConfig;

record<DOMString, DOMString> requestedSize;
sequence<record<DOMString, DOMString>> allSlotsRequestedSizes;
Expand Down Expand Up @@ -1744,14 +1755,28 @@ To <dfn>check if required seller capabilities are permitted</dfn> given an [=auc
</div>

<div algorithm>
To <dfn>obtain the coordinator from a Private Aggregation config</dfn> given a
{{ProtectedAudiencePrivateAggregationConfig}} |config|, perform the following
steps. They return an [=aggregation coordinator=], null or a {{DOMException}}.

1. If |config|["{{ProtectedAudiencePrivateAggregationConfig/aggregationCoordinatorOrigin}}"]
does not [=map/exist=], return null.
To <dfn>obtain the coordinator from a Private Aggregation config</dfn> given a
{{ProtectedAudienceAuctionPrivateAggregationConfig}} or
{{ProtectedAudienceInterestGroupPrivateAggregationConfig=] |config|, perform the
following steps. They return an [=aggregation coordinator=], null or a
{{DOMException}}.

1. Let |originString| be null.
1. If |config| is a {{ProtectedAudienceAuctionPrivateAggregationConfig}}:
1. If
|config|["{{ProtectedAudienceAuctionPrivateAggregationConfig/aggregationCoordinatorOrigin}}"]
does not [=map/exist=], return null.
1. Set |originString| to
|config|["{{ProtectedAudienceAuctionPrivateAggregationConfig/aggregationCoordinatorOrigin}}"].
1. If |config| is a {{ProtectedAudienceInterestGroupPrivateAggregationConfig}}:
1. If
|config|["{{ProtectedAudienceInterestGroupPrivateAggregationConfig/aggregationCoordinatorOrigin}}"]
does not [=map/exist=], return null.
1. Set |originString| to
|config|["{{ProtectedAudienceInterestGroupPrivateAggregationConfig/aggregationCoordinatorOrigin}}"].
1. Return the result of [=obtaining the Private Aggregation coordinator=] given
|config|["{{ProtectedAudiencePrivateAggregationConfig/aggregationCoordinatorOrigin}}"].
|originString|.

</div>

Expand Down Expand Up @@ -4799,6 +4824,15 @@ an [=auction config=] |auctionConfig| and a [=reporting context=] |reportingCont
1. [=map/For each=] (|origin|, <var ignore>aggregationCoordinator</var>) →
|batchingScope| of |reportingContext|'s [=reporting context/private aggregation batching
scope map=]:
1. Let |preSpecifiedParams| be a new [=pre-specified report parameters=] with the items:
: <a spec="private-aggregation-api" for="pre-specified report parameters">context ID</a>
:: null
: [=pre-specified report parameters/filtering ID max bytes=]
:: [=default filtering ID max bytes=]
: [=requested max contributions=]
:: |auctionConfig|'s [=auction config/requested max contributions=]
1. [=Set the pre-specified report parameters for a batching scope=] given
|preSpecifiedParams| and |batchingScope|.
1. [=Process contributions for a batching scope=] given |batchingScope|, |origin|,
"<code>protected-audience</code>" and null.

Expand Down Expand Up @@ -8321,6 +8355,10 @@ An <dfn export>auction config</dfn> is a [=struct=] with the following [=struct/
:: A [=map=] from [=strings=] to {{AuctionReportBuyersConfig}}s. For buyer metrics delegated to be
reported to the seller via the [Private Aggregation API](https://github.com/patcg-individual-drafts/private-aggregation-api),
this determines how each metric bucket is chosen inside the buyer's space, and how to scale it.
: <dfn>requested max contributions</dfn>
:: Null or a positive integer. Used to override [Private Aggregation
API](https://github.com/patcg-individual-drafts/private-aggregation-api)'s
default number of contributions per report.
<!-- TODO: this should probably use enums instead -->
: <dfn>auction report buyer debug details</dfn>
:: A [=debug details=], initially a new one. Configures
Expand Down

0 comments on commit e14b208

Please sign in to comment.