From b485e1bcd95714dc6145f492f1d157482e91dc8f Mon Sep 17 00:00:00 2001 From: Russ Hamilton Date: Wed, 22 Jan 2025 21:53:44 +0000 Subject: [PATCH 1/7] Add spec for multi-seller getInterestGroupAdAuctionData --- spec.bs | 253 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 177 insertions(+), 76 deletions(-) diff --git a/spec.bs b/spec.bs index f9b19bc96..eb789c640 100644 --- a/spec.bs +++ b/spec.bs @@ -3025,7 +3025,7 @@ and a [=global object=] |global|: to |winner|'s [=generated bid/selected buyer and seller reporting ID=]. 1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=] is not null, [=map/set=] |browserSignals|["{{ReportingBrowserSignals/buyerAndSellerReportingId}}"] to it. - 1. Otherwise, if the result of running [=query reporting ID k-anonymity count=] with |winner|'s + 1. Otherwise, if the result of running [=query reporting ID k-anonymity count=] with |winner|'s [=generated bid/interest group=], |igAd|, and null is true: 1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=] is not null, [=map/set=] |browserSignals|["{{ReportingBrowserSignals/buyerAndSellerReportingId}}"] to it. @@ -3488,16 +3488,30 @@ partial interface Navigator { Promise getInterestGroupAdAuctionData(AdAuctionDataConfig config); }; +dictionary AdAuctionPerSellerData { + required USVString seller; + Uint8Array request; + DOMString error; +}; + dictionary AdAuctionData { - required Uint8Array request; required USVString requestId; + Uint8Array request; + sequence requests; }; -dictionary AdAuctionDataConfig { +dictionary AdAuctionOneSeller { required USVString seller; - required USVString coordinatorOrigin; + USVString coordinatorOrigin; +}; + +dictionary AdAuctionDataConfig { + USVString seller; + USVString coordinatorOrigin; + sequence<AdAuctionOneSeller> sellers; + unsigned long requestSize; record<USVString, AdAuctionDataBuyerConfig> perBuyerConfig; }; @@ -3507,10 +3521,19 @@ dictionary AdAuctionDataConfig { <dt>{{AdAuctionDataConfig/seller}} <dd>The seller that will be used as the {{AuctionAdConfig/seller}} in the following {{AuctionAdConfig}} passed to {{Window/navigator}}.{{Navigator/runAdAuction()}}. + Can not be specified with the {{AdAuctionDataConfig/sellers}} field. <dt>{{AdAuctionDataConfig/coordinatorOrigin}} <dd>The origin of the coordinator hosting public encryption keys for the server running the ad auction. The [=origin/scheme=] must be "`https`". An implementation may select which coordinators are acceptable. + Can not be specified with the {{AdAuctionDataConfig/sellers}} field. + <dt>{{AdAuctionDataConfig/sellers}} + <dd>A list of seller origins and, optionally, their corresponding coordinators. + When present, the {{AdAuctionData}} provided when the {{Promise}} returned + by {{Navigator/getInterestGroupAdAuctionData}} resolves contains the + {{AdAuctionData/requests}} field instead of the {{AdAuctionData/request}} field. + Can not be specified with the {{AdAuctionDataConfig/seller}} or + {{AdAuctionDataConfig/coordinatorOrigin}} fields. <dt>{{AdAuctionDataConfig/requestSize}} <dd>The desired size for the returned {{AdAuctionData/request}}. If any buyers are specified in {{AdAuctionDataConfig/perBuyerConfig}}, this will be the exact size of the returned {{AdAuctionData/request}}. @@ -3709,26 +3732,11 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. If |global|'s [=associated Document=] is not [=allowed to use=] the "[=run-ad-auction=]" [=policy-controlled feature=], then [=exception/throw=] a "{{NotAllowedError}}" {{DOMException}}. 1. Let |settings| be [=this=]'s [=relevant settings object=]. -1. Let |config| be the result of running [=parse and verify ad auction data config=] +1. Let |configs| be the result of running [=parse and verify ad auction data config=] on |configIDL| and |settings|'s [=environment/top-level origin=]. 1. Let |p| be [=a new promise=]. 1. Let |queue| be the result of [=starting a new parallel queue=]. 1. [=parallel queue/enqueue steps|Enqueue the following steps=] to |queue|: - 1. If |config|'s [=auction data config/coordinator=] is not one of the [=implementation-defined=] - coordinators supported by this [=user agent=]: - 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to - [=reject=] |p| with a {{TypeError}}. - 1. Abort these steps. - 1. Let |keyInfo| be the result of [=looking up the server encryption key=] - with |config|'s [=auction data config/seller=] and |config|'s - [=auction data config/coordinator=]. - 1. If |keyInfo| is failure: - 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to - [=reject=] |p| with a {{TypeError}}. - 1. Abort these steps. - 1. Let (|key|, |keyId|) be |keyInfo|. - 1. Set |config|'s [=auction data config/encryption key=] to |key|. - 1. Set |config|'s [=auction data config/encryption key id=] to |keyId|. 1. Let |igMap| be a new [=map=] whose [=map/keys=] are [=origins=] and [=map/values=] are [=lists=]. 1. Let |igPAggCoordinatorMap| be a new [=map=] whose [=map/keys=] are tuples of ([=origins=], [=strings=]) and [=map/values=] are [=origins=]. @@ -3786,20 +3794,72 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. [=list/Append=] |serverIg| to |igMap|[|owner|]. 1. If |ig|'s [=interest group/Private Aggregation coordinator=] is not null, then [=map/set=] |igPAggCoordinatorMap|[(|owner|, |name|)] to it. - 1. Let |result| be a new {{AdAuctionData}}. + 1. Let |results| be a new [=list=]. 1. Let |requestId| be the [=string representation=] of a [=version 4 UUID=]. + 1. [=list/For each=] |config| in |configs|: + 1. If |config|'s [=auction data config/coordinator=] is not one of the [=implementation-defined=] + coordinators supported by this [=user agent=]: + 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: + : [=auction data seller result/seller=] + :: |seller| + : [=auction data seller result/error=] + :: "invalid coordinator" + 1. [=list/Append=] |result| to |results|. + 1. [=iteration/Continue=]. + 1. Let |keyInfo| be the result of [=looking up the server encryption key=] + with |config|'s [=auction data config/seller=] and |seller|'s [=auction data config/coordinator=]. + 1. If |keyInfo| is failure: + 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: + : [=auction data seller result/seller=] + :: |seller| + : [=auction data seller result/error=] + :: "key lookup failed" + 1. [=list/Append=] |result| to |results|. + 1. [=iteration/Continue=]. + 1. Let (|key|, |keyId|) be |keyInfo|. + 1. Set |config|'s [=auction data config/encryption key=] to |key|. + 1. Set |config|'s [=auction data config/encryption key id=] to |keyId|. + 1. Let (|requestBlob|, |context|) be the result of serializing |igMap| with |config| and + |igPAggCoordinatorMap|. The serialization method may follow that described in + [Section 2.2.4 of Bidding and Auction Services](https://privacysandbox.github.io/draft-ietf-bidding-and-auction-services/draft-ietf-bidding-and-auction-services.html#name-generating-a-request). + 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: + : [=auction data seller result/seller=] + :: |seller| + : [=auction data seller result/request=] + :: |requestBlob| + 1. [=list/Append=] |result| to |results|. + 1. Let |requestContext| be a new [=server auction request context=]. + 1. Set |requestContext|'s [=server auction request context/request ID=] field to |requestId|. + 1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. + 1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] + [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. + 1. Let |result| be a new {{AdAuctionData}}. 1. [=map/Set=] |result|["{{AdAuctionData/requestId}}"] to |requestId|. - 1. Let (|requestBlob|, |context|) be the result of serializing |igMap| with |config| and - |igPAggCoordinatorMap|. The serialization method may follow that described in - [Section 2.2.4 of Bidding and Auction Services](https://privacysandbox.github.io/draft-ietf-bidding-and-auction-services/draft-ietf-bidding-and-auction-services.html#name-generating-a-request). - 1. Set |result|["{{AdAuctionData/request}}"] to |requestBlob|. + 1. If |configIDL|[{{AdAuctionDataConfig/seller}}] [=map/exists=]: + 1. Let |seller result| be |results|[0]. + 1. If |seller result|'s [=auction data seller result/error=] is not null: + 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to + [=reject=] |p| with a {{TypeError}}. + 1. Abort these steps. + 1. Set |result|["{{AdAuctionData/request}}"] to |requestBlob|. + 1. Otherwise: + 1. [=list/For each=] |seller result| in |results|: + 1. If |seller result|'s [=auction data seller result/error=] is not null: + 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} with the following [=struct/items=]: + : {{AdAuctionPerSellerData/seller}} + :: |seller result|'s [=auction data seller result/seller=] + : {{AdAuctionPerSellerData/error}} + :: |seller result|'s [=auction data seller result/error=] + 1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/requests}}"]. + 1. Otherwise: + 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} with the following [=struct/items=]: + : {{AdAuctionPerSellerData/seller}} + :: |seller result|'s [=auction data seller result/seller=] + : {{AdAuctionPerSellerData/request}} + :: |seller result|'s [=auction data seller result/request=] + 1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/requests}}"]. 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to resolve |p| with |result|. - 1. Let |requestContext| be a new [=server auction request context=]. - 1. Set |requestContext|'s [=server auction request context/request ID=] field to |result|["{{AdAuctionData/requestId}}"]. - 1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. - 1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] - [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. 1. Return p. </div> @@ -3808,32 +3868,59 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m To <dfn>parse and verify ad auction data config</dfn> given an {{AdAuctionDataConfig}} |configIDL| and [=origin=] |top_level_origin|: - 1. Let |seller| be the result of running [=parse an https origin=] on - |configIDL|["{{AdAuctionDataConfig/seller}}"]. - 1. Let |coordinator| be the result of running [=parse an https origin=] on - |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. - 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. - 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: - : [=auction data config/publisher=] - :: |top_level_origin| - : [=auction data config/seller=] - :: |seller| - : [=auction data config/coordinator=] - :: |coordinator| - : [=auction data config/request size=] - :: |configIDL|["{{AdAuctionDataConfig/requestSize}}"] if it [=map/exists=], null otherwise - : [=auction data config/per buyer config=] - :: The result of running [=parse per buyer auction data configs=] on - |configIDL|["{{AdAuctionDataConfig/perBuyerConfig}}"] - 1. If |config|'s [=auction data config/per buyer config=] [=map/is not empty=] - and |config|'s [=auction data config/request size=] is null: - 1. Let |requestSize| be 0. - 1. [=list/For each=] |buyerConfig| of |config|'s [=auction data config/per buyer config=]'s [=map/values=]: + 1. Let |configs| be a new empty [=list=]. + 1. Let |per buyer configs| be the result of running [=parse per buyer auction data configs=] on + |configIDL|["{{AdAuctionDataConfig/perBuyerConfig}}"]. + 1. Let |requestSize| be |configIDL|["{{AdAuctionDataConfig/requestSize}}"] if it [=map/exists=], null otherwise. + 1. If |per buyer configs| [=map/is not empty=] and |requestSize| is null: + 1. Set |requestSize| to 0. + 1. [=list/For each=] |buyerConfig| of |per buyer configs|'s [=map/values=]: 1. If |buyerConfig|'s [=auction data buyer config/size=] is null, then [=exception/throw=] a {{TypeError}}. 1. Set |requestSize| to |requestSize| + |buyerConfig|'s [=auction data buyer config/size=]. - 1. Set |config|'s [=auction data config/request size=] to |requestSize|. - 1. Return |config|. + 1. If |configIDL|["{{AdAuctionDataConfig/seller}}"] [=map/exists=]: + 1. Let |seller| be the result of running [=parse an https origin=] on + |configIDL|["{{AdAuctionDataConfig/seller}}"]. + 1. Let |coordinator| be the result of running [=parse an https origin=] on + |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. + 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. + 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: + : [=auction data config/publisher=] + :: |top_level_origin| + : [=auction data config/seller=] + :: |seller| + : [=auction data config/coordinator=] + :: |coordinator| + : [=auction data config/request size=] + :: |requestSize| + : [=auction data config/per buyer config=] + :: |per buyer configs| + 1. [=list/Append=] |config| to |configs|. + 1. Otherwise: + 1. If |configIDL|["{{AdAuctionDataConfig/sellers}}"] does not [=map/exist], then [=exception/throw=] a {{TypeError}}. + 1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists], then [=exception/throw=] a {{TypeError}}. + 1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: + 1. Let |seller| be the result of running [=parse an https origin=] on + |seller config|["{{AdAuctionOneSeller/seller}}"]. + 1. If |configs| already [=list/contains=] a [=auction data config=] whose + [=auction data config/seller=] is equal to |seller|, then + [=exception/throw=] a {{TypeError}}. + 1. Let |coordinator| be the result of running [=parse an https origin=] on + |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. + 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. + 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: + : [=auction data config/publisher=] + :: |top_level_origin| + : [=auction data config/seller=] + :: |seller| + : [=auction data config/coordinator=] + :: |coordinator| + : [=auction data config/request size=] + :: |requestSize| + : [=auction data config/per buyer config=] + :: |per buyer configs| + 1. [=list/Append=] |config| to |configs|. + 1. Return |configs|. </div> <div algorithm> @@ -5127,7 +5214,7 @@ dictionary StorageInterestGroup : AuctionAdInterestGroup { is a one-time canonical [=string=] representation of a [=version 4 UUID=] that is uniquely associated with a single call to {{Window/navigator}}.{{Navigator/runAdAuction()}}. For multi-seller auctions, a distinct auction nonce can be uniquely associated with each of the -{{AuctionAdConfig/componentAuctions}}. The auction nonce(s) will need to be passed back in via a +{{AuctionAdConfig/componentAuctions}}. The auction nonce(s) will need to be passed back in via a subsequent call to {{Window/navigator}}.{{Navigator/runAdAuction()}} via the {{AuctionAdConfig}}. This is currently only needed for [=auctions=] that use [=additional bids=], in which the auction nonce is combined with a [=signed additional bid with metadata/seller nonce=] to construct a bid @@ -5607,17 +5694,17 @@ from querying the server during an auction. 1. If [=query k-anonymity cache=] for |adHashCode| returns true: 1. If |igAd|'s [=interest group ad/selectable buyer and seller reporting IDs=] is not null: 1. Let |kAnonRestrictedSelectableReportingIds| be a new empty [=list=] of [=string=]s. - 1. [=list/For each=] |selectableReportingId| in |igAd|'s + 1. [=list/For each=] |selectableReportingId| in |igAd|'s [=interest group ad/selectable buyer and seller reporting IDs=]: 1. Let |reportingHashCode| be the result of [=query reporting ID k-anonymity count=] - given |ig|, |igAd|, and |selectableReportingId|. + given |ig|, |igAd|, and |selectableReportingId|. 1. If [=query k-anonymity cache=] for |reportingHashCode| returns true, then [=list/append=] |selectableReportingId| to |kAnonRestrictedSelectableReportingIds|. 1. Set |igAd|'s [=interest group ad/selectable buyer and seller reporting IDs=] to |kAnonRestrictedSelectableReportingIds|. 1. [=list/Append=] |igAd| to |kAnonRestrictedIG|'s [=interest group/ads=]. 1. If |ig|'s [=interest group/ad components=] is not null: - 1. Set |kAnonRestrictedIG|'s [=interest group/ad components=] to an empty [=list=] of + 1. Set |kAnonRestrictedIG|'s [=interest group/ad components=] to an empty [=list=] of [=interest group ad=]. 1. [=list/For each=] |igAdComponent| of |ig|'s [=interest group/ad components=]: 1. Let |adComponentHashCode| be the result of running [=compute the key hash of component ad=] given |ig| and @@ -5682,11 +5769,11 @@ from querying the server during an auction. * "SelectedBuyerAndSellerReportId" * |middle| * The result of [=compute the key part for one of multiple reporting ids=] given |selectedReportingId| - * The result of [=compute the key part for one of multiple reporting ids=] given |igAd|'s + * The result of [=compute the key part for one of multiple reporting ids=] given |igAd|'s [=interest group ad/buyer and seller reporting ID=] * The result of [=compute the key part for one of multiple reporting ids=] given |igAd|'s [=interest group ad/buyer reporting ID=] - 1. Otherwise: + 1. Otherwise: 1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=] is not null, set |keyString| to be the [=string/concatenation=] of the following strings separated with U+000A (LF): * "BuyerAndSellerReportId" @@ -7696,7 +7783,7 @@ The following algorithm will be added to the [[FETCH#fetching]] section: 1. Let |bidWithMetadata|'s [=signed additional bid with metadata/signed additional bid=] be |parts|[2]. 1. [=list/Append=] |bidWithMetadata| to |storedAdditionalBidsHeaders|[|auctionNonce|]. - 1. Otherwise, if |parts|'s [=list/size=] is 2: + 1. Otherwise, if |parts|'s [=list/size=] is 2: 1. Let |auctionNonce| be |parts|[0]. 1. If |auctionNonce|'s [=string/length=] is not 36, then [=iteration/continue=]. 1. Let |bidWithMetadata|'s [=signed additional bid with metadata/signed additional bid=] be @@ -7874,12 +7961,12 @@ dictionary ReportingBrowserSignals { and that value was [=query reporting ID k-anonymity count|jointly k-anonymous=] combined with interest group owner, bidding script URL, [=ad creative=] URL, and null. * Set if the wining bid had a [=generated bid/selected buyer and seller reporting ID=] and the - winning ad had a [=interest group ad/buyer and seller reporting ID=] set in its listing in the + winning ad had a [=interest group ad/buyer and seller reporting ID=] set in its listing in the interest group, and that value was [=query reporting ID k-anonymity count|jointly k-anonymous=] combined with interest group owner, bidding script URL, [=ad creative=] URL, the and winning bid's [=generated bid/selected buyer and seller reporting ID=]. <dt>{{ReportingBrowserSignals/selectedBuyerAndSellerReportingId}} - <dd>A selected reporting id returned by "`generateBid()`". + <dd>A selected reporting id returned by "`generateBid()`". Set if the winning bid had a [=generated bid/selected buyer and seller reporting ID=] set, and that value was [=query reporting ID k-anonymity count|jointly k-anonymous=] combined with [=interest group ad/buyer and seller reporting ID=], interest group owner, @@ -7948,7 +8035,7 @@ enum KAnonStatus { "passedAndEnforced", "passedNotEnforced", "belowThreshold", " and that value was [=query reporting ID k-anonymity count|jointly k-anonymous=] combined with interest group owner, bidding script URL, [=ad creative=] URL, and null. * Set if the wining bid had a [=generated bid/selected buyer and seller reporting ID=] and the - winning ad had a [=interest group ad/buyer reporting ID=] set in its listing in the + winning ad had a [=interest group ad/buyer reporting ID=] set in its listing in the interest group, and that value was [=query reporting ID k-anonymity count|jointly k-anonymous=] combined with interest group owner, bidding script URL, [=ad creative=] URL, [=interest group ad/buyer and seller reporting ID=], and @@ -8137,9 +8224,9 @@ An <dfn>interest group ad</dfn> is a [=struct=] with the following [=struct/item : <dfn>buyer and seller reporting ID</dfn> :: Null or a [=string=]. Will be passed in place of interest group name or [=interest group ad/buyer reporting ID=], or alongside the - [=generated bid/selected buyer and seller reporting ID=], to [=report win=] and - [=report result=], subject to [=k-anonymity=] checks. Also passed alongside - [=generated bid/selected buyer and seller reporting ID=] to `scoreAd()` if + [=generated bid/selected buyer and seller reporting ID=], to [=report win=] and + [=report result=], subject to [=k-anonymity=] checks. Also passed alongside + [=generated bid/selected buyer and seller reporting ID=] to `scoreAd()` if [=generated bid/selected buyer and seller reporting ID=] is present. Only meaningful in [=interest group/ads=], but ignored in [=interest group/ad components=]. : <dfn>selectable buyer and seller reporting IDs</dfn> @@ -8693,7 +8780,7 @@ together in the signals response. It's a [=struct=] with the following [=struct/ group. </dl> -A <dfn>bidding partition</dfn> is a collection of [=trusted bidding signals batcher/keys=] and +A <dfn>bidding partition</dfn> is a collection of [=trusted bidding signals batcher/keys=] and [=trusted bidding signals batcher/ig names=] that can be processed together by the service without any potential privacy leakage. It's a [=struct=] with the following [=struct/items=]: @@ -8926,7 +9013,7 @@ an {{unsigned short}}-or-null |experimentGroupId|, an [=origin=] |topLevelOrigin |coordinator|. 1. If |keyInfo| is failure, then return « null, null, null ». 1. Let (|requestBlob|, |context|) be the result of generating request with |keyInfo|, |metadata| and - |compressionGroups|. The generation method may follow that described in + |compressionGroups|. The generation method may follow that described in [Section 2.2.4 of the Protected Audience Key Value Services](https://privacysandbox.github.io/draft-ietf-protected-audience-key-value-service/draft-ietf-protected-audience-key-value-services.html#name-generating-a-request). 1. Return « |requestBlob|, |interestGroupIdMap|, |context| ». @@ -9036,7 +9123,7 @@ together in the signals response. It's a [=struct=] with the following [=struct/ group. </dl> -A <dfn>scoring partition</dfn> is a collection of [=trusted scoring signals request/render URLs=] and +A <dfn>scoring partition</dfn> is a collection of [=trusted scoring signals request/render URLs=] and [=trusted scoring signals request/ad component URLs=] that can be processed together by the service without any potential privacy leakage. It's a [=struct=] with the following [=struct/items=]: @@ -9045,7 +9132,7 @@ without any potential privacy leakage. It's a [=struct=] with the following [=st :: An integer indicates the index of this partition. : <dfn>namespace</dfn> :: A [=map=], whose [=map/keys=] are [=strings=] and [=map/values=] are [=list=] of - [=strings=]. A namespace contains all [=trusted scoring signals request/render URLs=] and + [=strings=]. A namespace contains all [=trusted scoring signals request/render URLs=] and [=trusted scoring signals request/ad component URLs=] in the partition. : <dfn>metadata</dfn> :: A [=map=], whose [=map/keys=] and [=map/values=] are [=strings=]. @@ -9366,11 +9453,11 @@ result of [=evaluating a bidding script=], or an [=additional bid=] provided by in the auction. Must be null if the interest group making this bid has a null [=interest group/ad components=] field. : <dfn>selected buyer and seller reporting ID</dfn> - :: Null or [=string=]. The selected reporting id from the + :: Null or [=string=]. The selected reporting id from the [=interest group ad/selectable buyer and seller reporting IDs=] within the [=generated bid/interest group=]. If present, this will be: * Passed alongside [=interest group ad/buyer reporting ID=] and - [=interest group ad/buyer and seller reporting ID=] to [=report win=] + [=interest group ad/buyer and seller reporting ID=] to [=report win=] subject to [=k-anonymity=] checks. * Passed alongside [=interest group ad/buyer and seller reporting ID=] to [=report result=] subject to [=k-anonymity=] checks. @@ -9447,13 +9534,13 @@ To <dfn>adjust bid list based on k-anonymity</dfn> given a [=list=] of [=generat 1. [=Apply any component ads target to a bid=] given |bidCopy|. 1. [=list/Append=] |bidCopy| to |bidsToScore| 1. Let |selectedReportingId| be a [=string=]-or-null that is set to null. - 1. If |generatedBid|'s [=generated bid/selected buyer and seller reporting ID=] is not null, set + 1. If |generatedBid|'s [=generated bid/selected buyer and seller reporting ID=] is not null, set |selectedReportingId| to it. 1. Let |igAd| be the [=interest group ad=] from |generatedBid|'s [=generated bid/interest group=]'s [=interest group/ads=] whose [=interest group ad/render url=] is |generatedBid|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=]. 1. Let |isBidKAnon| be the result of [=query generated bid k-anonymity count=] given |generatedBid|. - 1. If |isBidKAnon| is true and running [=query reporting ID k-anonymity count=] with |generatedBid|'s + 1. If |isBidKAnon| is true and running [=query reporting ID k-anonymity count=] with |generatedBid|'s [=generated bid/interest group=], |igAd|, |selectedReportingId| is true: 1. [=list/Append=] |generatedBid| to |bidsToScore|. @@ -9817,10 +9904,10 @@ An <dfn>auction data config</dfn> is a [=struct=] with the following [=struct/it :: The origin of the coordinator hosting public encryption keys for the server running the ad auction. The [=origin/scheme=] must be "`https`". : <dfn>encryption key</dfn> - :: A [=byte sequence=]. The public [[RFC9180|HPKE]] encryption key to be used + :: Null or a [=byte sequence=]. The public [[RFC9180|HPKE]] encryption key to be used to encrypt the request. : <dfn>encryption key id</dfn> - :: A [=byte=] containing the key ID corresponding to the [=auction data config/encryption key=]. + :: Null or a [=byte=] containing the key ID corresponding to the [=auction data config/encryption key=]. : <dfn>request size</dfn> :: {{unsigned long}} or null. An optional field, containing the desired size for the returned encrypted request blob. @@ -9828,6 +9915,20 @@ An <dfn>auction data config</dfn> is a [=struct=] with the following [=struct/it :: A [=map=] whose [=map/keys=] are [=origins=] and [=map/values=] are [=auction data buyer config=]. </dl> +An <dfn>auction data seller result</dfn> is a [=struct=] with the following [=struct/items=]: +<dl dfn-for="auction data seller result"> + : <dfn>seller</dfn> + :: The origin of the seller that this result corresponds to. Will match one of + the sellers in the [=auction data config=]. + : <dfn>request</dfn> + :: Null or a [=byte sequence=]. The encrypted request generated for this + [=auction data seller result/seller=]. Null indicates an error occured and + the [=auction data seller result/error=] field will contain additional information. + : <dfn>error</dfn> + :: Null or a [=string=]. Null when the request succeeds. Otherwise contains + additional information about the failure. +</dl> + An <dfn>auction data buyer config</dfn> is a [=struct=] with the following [=struct/items=]: <dl dfn-for="auction data buyer config"> : <dfn>size</dfn> From 6928455bd26bf2d0e8a381a396b81e1fd0971a8d Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Wed, 22 Jan 2025 21:56:56 +0000 Subject: [PATCH 2/7] Remove redundant filtering step --- spec.bs | 3 --- 1 file changed, 3 deletions(-) diff --git a/spec.bs b/spec.bs index eb789c640..65f26917c 100644 --- a/spec.bs +++ b/spec.bs @@ -3745,9 +3745,6 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. If |ig|'s [=interest group/ads=] is null or [=list/is empty=], [=iteration/continue=]. 1. Let |owner| be |ig|'s [=interest group/owner=]. 1. Let |name| be |ig|'s [=interest group/name=]. - 1. If |config|'s [=auction data config/per buyer config=] [=map/is not empty=] and - |config|'s [=auction data config/per buyer config=][|owner|] does not - [=map/exist=], then [=iteration/continue=]. 1. If |igMap|[|owner|] does not [=map/exist=], then [=map/set=] |igMap|[|owner|] to a new [=list=]. 1. Let |ads| be a new [=list=]. 1. [=list/For each=] |ad| in |ig|'s [=interest group/ads=], [=list/append=] |ad|'s [=interest group ad/ad render ID=] to |ads|. From d9621d339f559135b38bcdf6e9ade72db7bb17d5 Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Thu, 23 Jan 2025 17:47:28 +0000 Subject: [PATCH 3/7] Fix typo --- spec.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.bs b/spec.bs index 6b4b996a1..933bf730d 100644 --- a/spec.bs +++ b/spec.bs @@ -3894,8 +3894,8 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m :: |per buyer configs| 1. [=list/Append=] |config| to |configs|. 1. Otherwise: - 1. If |configIDL|["{{AdAuctionDataConfig/sellers}}"] does not [=map/exist], then [=exception/throw=] a {{TypeError}}. - 1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists], then [=exception/throw=] a {{TypeError}}. + 1. If |configIDL|["{{AdAuctionDataConfig/sellers}}"] does not [=map/exist=], then [=exception/throw=] a {{TypeError}}. + 1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists=], then [=exception/throw=] a {{TypeError}}. 1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: 1. Let |seller| be the result of running [=parse an https origin=] on |seller config|["{{AdAuctionOneSeller/seller}}"]. From 5ff27f19aef8f59af3136253d271338cd96e2462 Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Thu, 23 Jan 2025 21:48:24 +0000 Subject: [PATCH 4/7] Make getInterestGroupAdAuctionData argument optional --- spec.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index 933bf730d..f6d5b9e1d 100644 --- a/spec.bs +++ b/spec.bs @@ -3485,7 +3485,7 @@ The response along with the request ID can be then passed as part of an auction <xmp class="idl"> [SecureContext] partial interface Navigator { - Promise<AdAuctionData> getInterestGroupAdAuctionData(AdAuctionDataConfig config); + Promise<AdAuctionData> getInterestGroupAdAuctionData(optional AdAuctionDataConfig config = {}); }; dictionary AdAuctionPerSellerData { From 9027437ae643e79a00f4e000e444b3d2f4d749af Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Mon, 27 Jan 2025 22:22:36 +0000 Subject: [PATCH 5/7] Address comments --- spec.bs | 86 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/spec.bs b/spec.bs index f6d5b9e1d..81e18e528 100644 --- a/spec.bs +++ b/spec.bs @@ -3521,7 +3521,9 @@ dictionary AdAuctionDataConfig { <dt>{{AdAuctionDataConfig/seller}} <dd>The seller that will be used as the {{AuctionAdConfig/seller}} in the following {{AuctionAdConfig}} passed to {{Window/navigator}}.{{Navigator/runAdAuction()}}. - Can not be specified with the {{AdAuctionDataConfig/sellers}} field. + Can not be specified with the {{AdAuctionDataConfig/sellers}} field. Exactly + one of {{AdAuctionDataConfig/seller}} and {{AdAuctionDataConfig/sellers}} + must be specified. <dt>{{AdAuctionDataConfig/coordinatorOrigin}} <dd>The origin of the coordinator hosting public encryption keys for the server running the ad auction. The [=origin/scheme=] must be "`https`". An implementation @@ -3533,7 +3535,9 @@ dictionary AdAuctionDataConfig { by {{Navigator/getInterestGroupAdAuctionData}} resolves contains the {{AdAuctionData/requests}} field instead of the {{AdAuctionData/request}} field. Can not be specified with the {{AdAuctionDataConfig/seller}} or - {{AdAuctionDataConfig/coordinatorOrigin}} fields. + {{AdAuctionDataConfig/coordinatorOrigin}} fields. Exactly + one of {{AdAuctionDataConfig/seller}} and {{AdAuctionDataConfig/sellers}} + must be specified. <dt>{{AdAuctionDataConfig/requestSize}} <dd>The desired size for the returned {{AdAuctionData/request}}. If any buyers are specified in {{AdAuctionDataConfig/perBuyerConfig}}, this will be the exact size of the returned {{AdAuctionData/request}}. @@ -3791,25 +3795,26 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. [=list/Append=] |serverIg| to |igMap|[|owner|]. 1. If |ig|'s [=interest group/Private Aggregation coordinator=] is not null, then [=map/set=] |igPAggCoordinatorMap|[(|owner|, |name|)] to it. - 1. Let |results| be a new [=list=]. + 1. Let |results| be a new [=list=] of [=auction data per seller results=]. 1. Let |requestId| be the [=string representation=] of a [=version 4 UUID=]. - 1. [=list/For each=] |config| in |configs|: + 1. [=list/For each=] |config| of |configs|: + 1. Let |seller| be |config|'s [=auction data config/seller=]. 1. If |config|'s [=auction data config/coordinator=] is not one of the [=implementation-defined=] coordinators supported by this [=user agent=]: - 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: - : [=auction data seller result/seller=] + 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: + : [=auction data per seller result/seller=] :: |seller| - : [=auction data seller result/error=] + : [=auction data per seller result/error=] :: "invalid coordinator" 1. [=list/Append=] |result| to |results|. 1. [=iteration/Continue=]. 1. Let |keyInfo| be the result of [=looking up the server encryption key=] with |config|'s [=auction data config/seller=] and |seller|'s [=auction data config/coordinator=]. 1. If |keyInfo| is failure: - 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: - : [=auction data seller result/seller=] + 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: + : [=auction data per seller result/seller=] :: |seller| - : [=auction data seller result/error=] + : [=auction data per seller result/error=] :: "key lookup failed" 1. [=list/Append=] |result| to |results|. 1. [=iteration/Continue=]. @@ -3819,10 +3824,10 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Let (|requestBlob|, |context|) be the result of serializing |igMap| with |config| and |igPAggCoordinatorMap|. The serialization method may follow that described in [Section 2.2.4 of Bidding and Auction Services](https://privacysandbox.github.io/draft-ietf-bidding-and-auction-services/draft-ietf-bidding-and-auction-services.html#name-generating-a-request). - 1. Let |result| be a new [=auction data seller result=] with the following [=struct/items=]: - : [=auction data seller result/seller=] + 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: + : [=auction data per seller result/seller=] :: |seller| - : [=auction data seller result/request=] + : [=auction data per seller result/request=] :: |requestBlob| 1. [=list/Append=] |result| to |results|. 1. Let |requestContext| be a new [=server auction request context=]. @@ -3830,33 +3835,26 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. 1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. - 1. Let |result| be a new {{AdAuctionData}}. - 1. [=map/Set=] |result|["{{AdAuctionData/requestId}}"] to |requestId|. + 1. Let |IDLresults| be a new {{AdAuctionData}}. + 1. [=map/Set=] |IDLresults|["{{AdAuctionData/requestId}}"] to |requestId|. 1. If |configIDL|[{{AdAuctionDataConfig/seller}}] [=map/exists=]: 1. Let |seller result| be |results|[0]. - 1. If |seller result|'s [=auction data seller result/error=] is not null: + 1. If |seller result|'s [=auction data per seller result/error=] is not null: 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to [=reject=] |p| with a {{TypeError}}. 1. Abort these steps. - 1. Set |result|["{{AdAuctionData/request}}"] to |requestBlob|. + 1. Set |IDLresults|["{{AdAuctionData/request}}"] to |requestBlob|. 1. Otherwise: 1. [=list/For each=] |seller result| in |results|: - 1. If |seller result|'s [=auction data seller result/error=] is not null: - 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} with the following [=struct/items=]: - : {{AdAuctionPerSellerData/seller}} - :: |seller result|'s [=auction data seller result/seller=] - : {{AdAuctionPerSellerData/error}} - :: |seller result|'s [=auction data seller result/error=] - 1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/requests}}"]. + 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} |seller result|'s [=auction data per seller result/seller=]. + 1. If |seller result|'s [=auction data per seller result/error=] is not null: + 1. Set |IDLresult|["{{AdAuctionPerSellerData/error}}"] to |seller result|'s [=auction data per seller result/error=]. + 1. [=list/Append=] |IDLresult| to |IDLresults|["{{AdAuctionData/requests}}"]. 1. Otherwise: - 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} with the following [=struct/items=]: - : {{AdAuctionPerSellerData/seller}} - :: |seller result|'s [=auction data seller result/seller=] - : {{AdAuctionPerSellerData/request}} - :: |seller result|'s [=auction data seller result/request=] - 1. [=list/Append=] |IDLresult| to |result|["{{AdAuctionData/requests}}"]. + 1. Set |IDLresult|["{{AdAuctionPerSellerData/request}}"] to |seller result|'s [=auction data per seller result/request=]. + 1. [=list/Append=] |IDLresult| to |IDLresults|["{{AdAuctionData/requests}}"]. 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to - resolve |p| with |result|. + resolve |p| with |IDLresults|. 1. Return p. </div> @@ -3865,7 +3863,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m To <dfn>parse and verify ad auction data config</dfn> given an {{AdAuctionDataConfig}} |configIDL| and [=origin=] |top_level_origin|: - 1. Let |configs| be a new empty [=list=]. + 1. Let |configs| be a new empty [=list=] of [=auction data configs=]. 1. Let |per buyer configs| be the result of running [=parse per buyer auction data configs=] on |configIDL|["{{AdAuctionDataConfig/perBuyerConfig}}"]. 1. Let |requestSize| be |configIDL|["{{AdAuctionDataConfig/requestSize}}"] if it [=map/exists=], null otherwise. @@ -3878,8 +3876,11 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. If |configIDL|["{{AdAuctionDataConfig/seller}}"] [=map/exists=]: 1. Let |seller| be the result of running [=parse an https origin=] on |configIDL|["{{AdAuctionDataConfig/seller}}"]. - 1. Let |coordinator| be the result of running [=parse an https origin=] on - |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. + 1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists=]: + 1. Let |coordinator| be the result of running [=parse an https origin=] on + |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. + 1. Otherwise + 1. Let |coordinator| be the [=user agent=]'s default coordinator. 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: : [=auction data config/publisher=] @@ -3899,11 +3900,14 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: 1. Let |seller| be the result of running [=parse an https origin=] on |seller config|["{{AdAuctionOneSeller/seller}}"]. - 1. If |configs| already [=list/contains=] a [=auction data config=] whose + 1. If |configs| [=list/contains=] an [=auction data config=] whose [=auction data config/seller=] is equal to |seller|, then [=exception/throw=] a {{TypeError}}. - 1. Let |coordinator| be the result of running [=parse an https origin=] on - |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. + 1. If |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"] [=map/exists=]: + 1. Let |coordinator| be the result of running [=parse an https origin=] on + |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. + 1. Otherwise: + 1. Let |coordinator| be the [=user agent=]'s default coordinator. 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: : [=auction data config/publisher=] @@ -9912,15 +9916,15 @@ An <dfn>auction data config</dfn> is a [=struct=] with the following [=struct/it :: A [=map=] whose [=map/keys=] are [=origins=] and [=map/values=] are [=auction data buyer config=]. </dl> -An <dfn>auction data seller result</dfn> is a [=struct=] with the following [=struct/items=]: -<dl dfn-for="auction data seller result"> +An <dfn>auction data per seller result</dfn> is a [=struct=] with the following [=struct/items=]: +<dl dfn-for="auction data per seller result"> : <dfn>seller</dfn> :: The origin of the seller that this result corresponds to. Will match one of the sellers in the [=auction data config=]. : <dfn>request</dfn> :: Null or a [=byte sequence=]. The encrypted request generated for this - [=auction data seller result/seller=]. Null indicates an error occured and - the [=auction data seller result/error=] field will contain additional information. + [=auction data per seller result/seller=]. Null indicates an error occured and + the [=auction data per seller result/error=] field will contain additional information. : <dfn>error</dfn> :: Null or a [=string=]. Null when the request succeeds. Otherwise contains additional information about the failure. From d3e50ead65c9ddf3d99b71bf0eb6d3458435138b Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Tue, 28 Jan 2025 19:55:26 +0000 Subject: [PATCH 6/7] make variables camel case --- spec.bs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/spec.bs b/spec.bs index 81e18e528..358387594 100644 --- a/spec.bs +++ b/spec.bs @@ -3846,7 +3846,8 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Set |IDLresults|["{{AdAuctionData/request}}"] to |requestBlob|. 1. Otherwise: 1. [=list/For each=] |seller result| in |results|: - 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} |seller result|'s [=auction data per seller result/seller=]. + 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} + is |seller result|'s [=auction data per seller result/seller=]. 1. If |seller result|'s [=auction data per seller result/error=] is not null: 1. Set |IDLresult|["{{AdAuctionPerSellerData/error}}"] to |seller result|'s [=auction data per seller result/error=]. 1. [=list/Append=] |IDLresult| to |IDLresults|["{{AdAuctionData/requests}}"]. @@ -3863,13 +3864,13 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m To <dfn>parse and verify ad auction data config</dfn> given an {{AdAuctionDataConfig}} |configIDL| and [=origin=] |top_level_origin|: - 1. Let |configs| be a new empty [=list=] of [=auction data configs=]. - 1. Let |per buyer configs| be the result of running [=parse per buyer auction data configs=] on + 1. Let |configs| be a new [=list=] of [=auction data configs=]. + 1. Let |perBuyerConfigs| be the result of running [=parse per buyer auction data configs=] on |configIDL|["{{AdAuctionDataConfig/perBuyerConfig}}"]. 1. Let |requestSize| be |configIDL|["{{AdAuctionDataConfig/requestSize}}"] if it [=map/exists=], null otherwise. - 1. If |per buyer configs| [=map/is not empty=] and |requestSize| is null: + 1. If |perBuyerConfigs| [=map/is not empty=] and |requestSize| is null: 1. Set |requestSize| to 0. - 1. [=list/For each=] |buyerConfig| of |per buyer configs|'s [=map/values=]: + 1. [=list/For each=] |buyerConfig| of |perBuyerConfigs|'s [=map/values=]: 1. If |buyerConfig|'s [=auction data buyer config/size=] is null, then [=exception/throw=] a {{TypeError}}. 1. Set |requestSize| to |requestSize| + |buyerConfig|'s [=auction data buyer config/size=]. @@ -3880,7 +3881,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Let |coordinator| be the result of running [=parse an https origin=] on |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]. 1. Otherwise - 1. Let |coordinator| be the [=user agent=]'s default coordinator. + 1. Let |coordinator| be the [=user agent=]'s default Bidding and Auction Services coordinator. 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: : [=auction data config/publisher=] @@ -3892,22 +3893,22 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m : [=auction data config/request size=] :: |requestSize| : [=auction data config/per buyer config=] - :: |per buyer configs| + :: |perBuyerConfigs| 1. [=list/Append=] |config| to |configs|. 1. Otherwise: 1. If |configIDL|["{{AdAuctionDataConfig/sellers}}"] does not [=map/exist=], then [=exception/throw=] a {{TypeError}}. 1. If |configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"] [=map/exists=], then [=exception/throw=] a {{TypeError}}. - 1. [=list/For each=] |seller config| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: + 1. [=list/For each=] |sellerConfig| in |configIDL|["{{AdAuctionDataConfig/sellers}}"]: 1. Let |seller| be the result of running [=parse an https origin=] on - |seller config|["{{AdAuctionOneSeller/seller}}"]. + |sellerConfig|["{{AdAuctionOneSeller/seller}}"]. 1. If |configs| [=list/contains=] an [=auction data config=] whose [=auction data config/seller=] is equal to |seller|, then [=exception/throw=] a {{TypeError}}. - 1. If |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"] [=map/exists=]: + 1. If |sellerConfig|["{{AdAuctionOneSeller/coordinatorOrigin}}"] [=map/exists=]: 1. Let |coordinator| be the result of running [=parse an https origin=] on - |seller config|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. + |sellerConfig|["{{AdAuctionOneSeller/coordinatorOrigin}}"]. 1. Otherwise: - 1. Let |coordinator| be the [=user agent=]'s default coordinator. + 1. Let |coordinator| be the [=user agent=]'s default Bidding and Auction Services coordinator. 1. If |seller| or |coordinator| are failure, then [=exception/throw=] a {{TypeError}}. 1. Let |config| be a new [=auction data config=] with the following [=struct/items=]: : [=auction data config/publisher=] @@ -3919,7 +3920,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m : [=auction data config/request size=] :: |requestSize| : [=auction data config/per buyer config=] - :: |per buyer configs| + :: |perBuyerConfigs| 1. [=list/Append=] |config| to |configs|. 1. Return |configs|. </div> From 8896ee95d39f95455285be8b82a9a12f7c3e780c Mon Sep 17 00:00:00 2001 From: Russ Hamilton <behamilton@google.com> Date: Thu, 30 Jan 2025 15:24:12 +0000 Subject: [PATCH 7/7] Address more comments --- spec.bs | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/spec.bs b/spec.bs index 358387594..1897c11d9 100644 --- a/spec.bs +++ b/spec.bs @@ -3188,7 +3188,7 @@ a [=list=] of [=interest groups=] |bidIgs|, and a [=reporting context map=] 1. Let |requestId| be the value of |auctionConfig|'s [=auction config/server response id=]. 1. Let |requestContexts| be the value of |global|'s [=associated Document's=] [=node navigable's=] [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=]. -1. If |requestContexts|[|requestId|] does not [=map/exist=], return null. +1. If |requestContexts|[(|seller|,|requestId|)] does not [=map/exist=], return null. 1. Let |requestContext| be |requestContexts|[|requestId|]. 1. Let |response| be the [=server auction response=] which is the result of deserializing |auctionConfig|'s [=auction config/server response=] @@ -3800,7 +3800,7 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. [=list/For each=] |config| of |configs|: 1. Let |seller| be |config|'s [=auction data config/seller=]. 1. If |config|'s [=auction data config/coordinator=] is not one of the [=implementation-defined=] - coordinators supported by this [=user agent=]: + Bidding and Auction Services coordinators supported by this [=user agent=]: 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: : [=auction data per seller result/seller=] :: |seller| @@ -3811,13 +3811,13 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Let |keyInfo| be the result of [=looking up the server encryption key=] with |config|'s [=auction data config/seller=] and |seller|'s [=auction data config/coordinator=]. 1. If |keyInfo| is failure: - 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: - : [=auction data per seller result/seller=] - :: |seller| - : [=auction data per seller result/error=] - :: "key lookup failed" - 1. [=list/Append=] |result| to |results|. - 1. [=iteration/Continue=]. + 1. Let |result| be a new [=auction data per seller result=] with the following [=struct/items=]: + : [=auction data per seller result/seller=] + :: |seller| + : [=auction data per seller result/error=] + :: "key lookup failed" + 1. [=list/Append=] |result| to |results|. + 1. [=iteration/Continue=]. 1. Let (|key|, |keyId|) be |keyInfo|. 1. Set |config|'s [=auction data config/encryption key=] to |key|. 1. Set |config|'s [=auction data config/encryption key id=] to |keyId|. @@ -3834,25 +3834,25 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> m 1. Set |requestContext|'s [=server auction request context/request ID=] field to |requestId|. 1. Set |requestContext|'s [=server auction request context/request context=] field to |context|. 1. [=map/Set=] |global|'s [=associated Document's=] [=node navigable's=] - [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][|requestId|] to |requestContext|. + [=traversable navigable's=] [=traversable navigable/saved Bidding and Auction request context=][(|seller|,|requestId|)] to |requestContext|. 1. Let |IDLresults| be a new {{AdAuctionData}}. 1. [=map/Set=] |IDLresults|["{{AdAuctionData/requestId}}"] to |requestId|. 1. If |configIDL|[{{AdAuctionDataConfig/seller}}] [=map/exists=]: - 1. Let |seller result| be |results|[0]. - 1. If |seller result|'s [=auction data per seller result/error=] is not null: + 1. Let |sellerResult| be |results|[0]. + 1. If |sellerResult|'s [=auction data per seller result/error=] is not null: 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to [=reject=] |p| with a {{TypeError}}. 1. Abort these steps. 1. Set |IDLresults|["{{AdAuctionData/request}}"] to |requestBlob|. 1. Otherwise: - 1. [=list/For each=] |seller result| in |results|: + 1. [=list/For each=] |sellerResult| in |results|: 1. Let |IDLresult| be a new {{AdAuctionPerSellerData}} whose {{AdAuctionPerSellerData/seller}} - is |seller result|'s [=auction data per seller result/seller=]. - 1. If |seller result|'s [=auction data per seller result/error=] is not null: - 1. Set |IDLresult|["{{AdAuctionPerSellerData/error}}"] to |seller result|'s [=auction data per seller result/error=]. + is the [=serialization of an origin|serialization=] of |sellerResult|'s [=auction data per seller result/seller=]. + 1. If |sellerResult|'s [=auction data per seller result/error=] is not null: + 1. Set |IDLresult|["{{AdAuctionPerSellerData/error}}"] to |sellerResult|'s [=auction data per seller result/error=]. 1. [=list/Append=] |IDLresult| to |IDLresults|["{{AdAuctionData/requests}}"]. 1. Otherwise: - 1. Set |IDLresult|["{{AdAuctionPerSellerData/request}}"] to |seller result|'s [=auction data per seller result/request=]. + 1. Set |IDLresult|["{{AdAuctionPerSellerData/request}}"] to |sellerResult|'s [=auction data per seller result/request=]. 1. [=list/Append=] |IDLresult| to |IDLresults|["{{AdAuctionData/requests}}"]. 1. [=Queue a global task=] on the [=DOM manipulation task source=], given |global|, to resolve |p| with |IDLresults|. @@ -7593,8 +7593,9 @@ request with the <{iframe/adauctionheaders}> <a spec=html>content attribute</a> set to `true`, as described in the [:Ad-Auction-Additional-Bid:] header description. Each [=traversable navigable=] has a <dfn for="traversable navigable">saved Bidding -and Auction request context</dfn>, which is a [=map=] whose [=map/keys=] are -the [=string representation=] of a [=version 4 UUID=] and whose [=map/values=] +and Auction request context</dfn>, which is a [=map=]. The [=map=]'s [=map/keys=] are +[=tuples=] consisting of the seller ([=origin=]) and the request ID +([=string representation=] of a [=version 4 UUID=]). The [=map=]'s [=map/values=] are [=server auction request contexts=]. Each [=traversable navigable=] has a <dfn for="traversable navigable">captured ad auction result @@ -9920,7 +9921,7 @@ An <dfn>auction data config</dfn> is a [=struct=] with the following [=struct/it An <dfn>auction data per seller result</dfn> is a [=struct=] with the following [=struct/items=]: <dl dfn-for="auction data per seller result"> : <dfn>seller</dfn> - :: The origin of the seller that this result corresponds to. Will match one of + :: The [=origin=] of the seller that this result corresponds to. Will match one of the sellers in the [=auction data config=]. : <dfn>request</dfn> :: Null or a [=byte sequence=]. The encrypted request generated for this