From 9d89b6e07ba75e6c8c93dcb18d996ffaacb081cc Mon Sep 17 00:00:00 2001 From: Alex Turner Date: Thu, 22 Feb 2024 22:28:59 +0000 Subject: [PATCH] Spec: auctionBuyerKeys reporting (#117) SHA: b09c9c4888966971d29466c54ab1baf2835a19a9 Reason: push, by alexmturner Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 2865 ++++++++++++++++++++++++++++------------------------ 1 file changed, 1533 insertions(+), 1332 deletions(-) diff --git a/index.html b/index.html index e29e2c6..16fb446 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@ Private Aggregation API - + - + +

Private Aggregation API

-

Unofficial Proposal Draft,

+

Unofficial Proposal Draft,

More details about this document
@@ -733,7 +730,7 @@

Private Aggregation API

-

[Exposed=(InterestGroupScriptRunnerGlobalScope,SharedStorageWorklet), SecureContext] interface PrivateAggregation { - undefined contributeToHistogram(PAHistogramContribution contribution); - undefined enableDebugMode(optional PADebugModeOptions options = {}); + undefined contributeToHistogram(PAHistogramContribution contribution); + undefined enableDebugMode(optional PADebugModeOptions options = {}); }; dictionary PAHistogramContribution { @@ -1068,12 +1065,12 @@

3. were performed given the entry’s debug scope before the process contributions for a batching scope steps are performed given the entry’s batching scope.

4. Structures

-

4.1. Batching scope

+

4.1. Batching scope

A batching scope is a unique internal value that identifies which PAHistogramContributions should be sent in the same aggregatable report unless their debug details differ.

Unique internal value is not an exported definition. See infra/583.

-

4.2. Debug scope

+

4.2. Debug scope

A debug scope is a unique internal value that identifies which PAHistogramContributions should have their debug details affected by the presence or absence of a call to enableDebugMode() in the same period of execution. @@ -1097,7 +1094,7 @@

An unsigned 64-bit integer or null. The key must be null if enabled is false.

-

4.5. Contribution cache entry

+

4.5. Contribution cache entry

A contribution cache entry is a struct with the following items:
contribution @@ -1867,7 +1864,7 @@

POST - /session/{session id}/private-aggregation/localtestingmode + /session/{session id}/private-aggregation/localtestingmode

The remote end steps are:

@@ -1896,12 +1893,12 @@

SharedStoragePrivateAggregationConfig { - USVString aggregationCoordinatorOrigin; - USVString contextId; + USVString aggregationCoordinatorOrigin; + USVString contextId; }; partial dictionary SharedStorageRunOperationMethodOptions { - SharedStoragePrivateAggregationConfig privateAggregationConfig; + SharedStoragePrivateAggregationConfig privateAggregationConfig; };

The privateAggregation getter steps are @@ -2178,9 +2175,21 @@

Exposed=InterestGroupScriptRunnerGlobalScope, SecureContext] partial interface PrivateAggregation { undefined contributeToHistogramOnEvent( - DOMString event, PAExtendedHistogramContribution contribution); + DOMString event, PAExtendedHistogramContribution contribution); +}; + +dictionary AuctionReportBuyersConfig { + required bigint bucket; + required double scale; +}; + +partial dictionary AuctionAdConfig { + sequence<bigint> auctionReportBuyerKeys; + record<DOMString, AuctionReportBuyersConfig> auctionReportBuyers; }; +

Note: requiredSellerCapabilities is defined in the Protected + Audience spec.

Do we want to align naming with implementation?

The privateAggregation getter steps are to get the privateAggregation given this.

The contributeToHistogramOnEvent(DOMString @@ -2203,7 +2212,7 @@

baseValue"] is not a valid signal base value, throw a TypeError.

  • -

    If bucket["offset"] is not a bigint, throw a TypeError.

    +

    If bucket["offset"] is not a bigint, throw a TypeError.

  • Let value be contribution["value"].

    @@ -2214,7 +2223,7 @@

    baseValue"] is not a valid signal base value, throw a TypeError.

  • -

    If value["offset"] is a bigint, throw a TypeError.

    +

    If value["offset"] is a bigint, throw a TypeError.

  • Let batchingScope be null.

    @@ -2264,13 +2273,13 @@

    Consider accepting an array of contributions. [Issue #44]

    11.2. WebIDL modifications

    -

    The AuctionAdConfig and AuctionAdInterestGroup dictionaries are +

    The AuctionAdConfig and AuctionAdInterestGroup dictionaries are modified to add a new field:

    dictionary ProtectedAudiencePrivateAggregationConfig {
       USVString aggregationCoordinatorOrigin;
     };
     
    -partial dictionary AuctionAdConfig {
    +partial dictionary AuctionAdConfig {
       ProtectedAudiencePrivateAggregationConfig privateAggregationConfig;
     };
     
    @@ -2278,6 +2287,8 @@ 
    +

    Note: sellerCapabilities is defined in the Protected + Audience spec

    11.3. Structures

    11.3.1. Extending auction config

    Extend the auction config struct to add new fields:

    @@ -2290,15 +2301,23 @@

    batching scope map

    A map from a tuple consisting of an origin (an origin) and a coordinator (an aggregation -coordinator or null) to a batching scope.

    +coordinator) to a batching scope.

    Note: Does not include batching scopes for contributions conditional on non-reserved events.

    permissions policy state

    A permissions policy state.

    -
    seller Private Aggregation coordinator (default null) +
    seller Private Aggregation coordinator +
    +

    An aggregation coordinator. Defaults to the default aggregation +coordinator.

    +
    auction report buyer keys +
    +

    A map from buyer origins to bigints.

    +
    auction report buyers
    -

    An aggregation coordinator or null.

    +

    A map from strings to AuctionReportBuyersConfigs.

    +

    Consider replacing the strings above with specific enum types.

  • 11.3.2. Extending interest group

    Extend the interest group struct to add a new @@ -2379,7 +2398,7 @@

    A worklet function

    11.3.7. On event contribution cache

    - An on event contribution cache is a map from string to a list of on event contribution cache entries. + An on event contribution cache is a map from string to a list of on event contribution cache entries.

    11.3.8. Extending InterestGroupScriptRunnerGlobalScope

    Extend the global @@ -2439,9 +2458,57 @@

    Consider accepting an array of contributions. [Issue #44]
    +
    Consider replacing the strings above with specific enum types.
    Can this value be used in reportWin() or reportResult()?
    +
    Check behavior when an origin is repeated in interestGroupBuyers.
    +
    Should these strings be dash delimited?
    +
    Consider validating the case where the bucket used (after + summing) is too large. Currently, the implementation appears to + overflow. See protected-audience/1040.
    +
    Handle auctionReportBuyerDebugModeConfig here.
    Make all map indexing links (throughout the spec) where possible, i.e. matching this section.
    -
    Need to handle auctionReportBuyers and auctionReportBuyerKeys here or - in the Protected Audience API spec.
    Once protected-audience/615 is resolved, align the above monkey patch with how access to other functions is prevented in InterestGroupScriptRunnerGlobalScopes until the script’s initial execution is complete.
    @@ -3696,6 +3890,12 @@

    Once protected-audience/616 and any successors are landed, align integration and fill in fenced frame’s report a private aggregation event. +
    Handle overflow here or in validation. See protected-audience/1040.
    +
    More formally spec the values here.
    +
    Align behavior with seller capabilities handling once protected-audience/966 is resolved.
    +
    Handle auctionReportBuyerDebugModeConfig here, may need to pass an + override to mark a debug scope complete and possibly refactor to merge + handling with enableDebugMode().
    Verify interaction with component auctions.
    Use [=map/For each=] where possible.
    Consider disallowing this in the latter two worklet functions.
    @@ -3707,698 +3907,8 @@

    Tie enableDebugMode() to third-party cookie eligibility. [Issue #57] - - - + + - \ No newline at end of file