From e14b208c755ecb0c2ef4197fdf5162428cf9e260 Mon Sep 17 00:00:00 2001 From: Dan McArdle Date: Wed, 8 Jan 2025 16:41:23 -0500 Subject: [PATCH] Spec: add glue for Private Aggregation's per-context contribution limits Explainer: https://github.com/patcg-individual-drafts/private-aggregation-api/pull/146 Spec change: https://github.com/patcg-individual-drafts/private-aggregation-api/pull/164 --- spec.bs | 56 +++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/spec.bs b/spec.bs index d70ba708e..d9e565bf3 100644 --- a/spec.bs +++ b/spec.bs @@ -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 @@ -247,7 +253,12 @@ dictionary GenerateBidInterestGroup { record> sizeGroups; }; -dictionary ProtectedAudiencePrivateAggregationConfig { +dictionary ProtectedAudienceAuctionPrivateAggregationConfig { + USVString aggregationCoordinatorOrigin; + [EnforceRange] unsigned long long maxContributions; +}; + +dictionary ProtectedAudienceInterestGroupPrivateAggregationConfig { USVString aggregationCoordinatorOrigin; }; @@ -256,7 +267,7 @@ dictionary AuctionAdInterestGroup : GenerateBidInterestGroup { record prioritySignalsOverrides; required double lifetimeMs; DOMString additionalBidKey; - ProtectedAudiencePrivateAggregationConfig privateAggregationConfig; + ProtectedAudienceInterestGroupPrivateAggregationConfig privateAggregationConfig; }; @@ -772,7 +783,7 @@ dictionary AuctionAdConfig { record auctionReportBuyers; AuctionReportBuyerDebugModeConfig auctionReportBuyerDebugModeConfig; sequence requiredSellerCapabilities; - ProtectedAudiencePrivateAggregationConfig privateAggregationConfig; + ProtectedAudienceAuctionPrivateAggregationConfig privateAggregationConfig; record requestedSize; sequence> allSlotsRequestedSizes; @@ -1744,14 +1755,28 @@ To check if required seller capabilities are permitted given an [=auc
-To obtain the coordinator from a Private Aggregation config 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 obtain the coordinator from a Private Aggregation config 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|.
@@ -4799,6 +4824,15 @@ an [=auction config=] |auctionConfig| and a [=reporting context=] |reportingCont 1. [=map/For each=] (|origin|, aggregationCoordinator) → |batchingScope| of |reportingContext|'s [=reporting context/private aggregation batching scope map=]: + 1. Let |preSpecifiedParams| be a new [=pre-specified report parameters=] with the items: + : context ID + :: 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|, "protected-audience" and null. @@ -8321,6 +8355,10 @@ An auction config 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. + : requested max contributions + :: 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. : auction report buyer debug details :: A [=debug details=], initially a new one. Configures