Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Add Bidding and auction payload customization support #1274

Merged
merged 11 commits into from
Sep 30, 2024
73 changes: 72 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,12 @@ partial interface Navigator {
dictionary AdAuctionDataConfig {
required USVString seller;
required USVString coordinatorOrigin;
unsigned long requestSize;
record<USVString, AdAuctionDataBuyerConfig> perBuyerConfig;
};

dictionary AdAuctionDataBuyerConfig {
unsigned long targetSize;
};

dictionary AdAuctionData {
Expand All @@ -2889,6 +2895,8 @@ A <dfn>server auction interest group</dfn> is a [=struct=] with the following [=
from the [=interest group/ad components=] field.
: <dfn>browser signals</dfn>
:: A [=server auction browser signals=].
: <dfn>priority</dfn>
:: A {{double}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a short comment about what it does, like "the [=interest group/priority=] used to select which interest groups participate in an auction when {{AdAuctionDataConfig/perBuyerConfig}} [=map/exists=]"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "Used to select which interest groups for a given buyer are excluded from the serialized request due to space limitations."

We can drop interest groups even if there are no customized options -- the maximum size is 55kiB.

</dl>

A <dfn>server auction browser signals</dfn> is a [=struct=] with the following [=struct/items=]:
Expand Down Expand Up @@ -2931,11 +2939,12 @@ A <dfn>server auction request context</dfn> is a [=struct=] with the following [

<div algorithm="getInterestGroupAdAuctionData()">

The <dfn for=Navigator method>getInterestGroupAdAuctionData(|config|)</dfn> method steps are:
The <dfn for=Navigator method>getInterestGroupAdAuctionData(|configIDL|)</dfn> method steps are:

1. Let |global| be [=this=]'s [=relevant global object=].
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 |config| be the result of running [=parse and verify ad auction config=] on |configIDL|.
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|:
Expand Down Expand Up @@ -2983,6 +2992,8 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|config|)</dfn> meth
:: |components|
: [=server auction interest group/browser signals=]
:: |browserSignals|
: [=server auction interest group/priority=]
:: |ig|'s [=interest group/priority=]
1. [=list/Append=] |serverIg| to |igMap|[|owner|].
1. Let |result| be a new {{AdAuctionData}}.
1. Let |requestId| be the [=string representation=] of a [=version 4 UUID=].
Expand All @@ -3003,6 +3014,41 @@ The <dfn for=Navigator method>getInterestGroupAdAuctionData(|config|)</dfn> meth

</div>

<div algorithm>
To <dfn>parse and verify ad auction config</dfn> given an {{AdAuctionDataConfig}} |configIDL|:
qingxinwu marked this conversation as resolved.
Show resolved Hide resolved

1. Let |config| be a new [=auction data config=] with the following [=struct/items=]:
: [=auction data config/seller=]
:: The result of running [=parsing an https origin=] on
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
|configIDL|["{{AdAuctionDataConfig/seller}}"]
: [=auction data config/coordinator=]
:: The result of running [=parsing an https origin=] on
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
|configIDL|["{{AdAuctionDataConfig/coordinatorOrigin}}"]
: [=auction data config/request size=]
:: |configIDL|["{{AdAuctionDataConfig/requestSize}}"]
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
: [=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/seller=] or [=auction data config/coordinator=]
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
fields are failure, then [=exception/throw=] a {{TypeError}}.
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
1. Return |config|.
</div>

<div algorithm>
To <dfn>parse per buyer auction data configs</dfn> given an
{{AdAuctionDataBuyerConfig}} |perBuyerConfigIDL|:
1. Let |configs| be a new [=ordered map=] whose [=map/keys=] are [=origins=]
and whose [=map/values=] are [=auction data config=]
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
1. [=map/For each=] |buyerIDL| → |buyerConfigIDL| of |perBuyerConfigIDL|:
1. Let |buyerConfig| be a new [=auction data buyer config=] with the following [=struct/items=]:
qingxinwu marked this conversation as resolved.
Show resolved Hide resolved
: [=auction data buyer config/size=]
:: |buyerConfigIDL|["{{AdAuctionDataBuyerConfig/targetSize}}"]
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
1. Let |buyer| be the result of running [=parsing an https origin=] on |buyerIDL|.
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
1. If |buyer| is failure, then [=exception/throw=] a {{TypeError}}.
1. [=map/Set=] configs[|buyer|] to |buyerConfig|.
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
1. Return |configs|.
</div>

# Reporting # {#reporting}

## {{InterestGroupBiddingAndScoringScriptRunnerGlobalScope/forDebuggingOnly}} ## {#for-debugging-only-header}
Expand Down Expand Up @@ -7284,6 +7330,31 @@ for a given [=k-anonymity key=]. These records are stored in the [=user agent=].
:: The [=moment=] when the k-anonymity status in this record was last fetched.
</dl>

<h3 id=auction-data-config-header>auction data config</h3>

An <dfn>auction data config</dfn> is a [=struct=] with the following [=struct/items=]:

<dl dfn-for="auction data config">
: <dfn>seller</dfn>
:: An [=origin=].
The origin of the seller running the ad auction. The [=origin/scheme=] must be "`https`".
: <dfn>coordinator</dfn>
:: The origin of the coordinator hosting public encryption keys for the server
running the ad auction. The [=origin/scheme=] must be "`https`".
: <dfn>request size</dfn>
qingxinwu marked this conversation as resolved.
Show resolved Hide resolved
:: {{unsigned long}} or null. An optional field, containing the desired size
for the returned encrypted request blob.
: <dfn>per buyer config</dfn>
:: A [=map=] whose [=map/keys] are [=origins=] and [=map/values=] are [=auction data buyer config=].
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
</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>
:: {{unsigned long}} or null. An optional field, initially null, containing the
brusshamilton marked this conversation as resolved.
Show resolved Hide resolved
size of the request to allocate to this buyer.
</dl>

# Privacy Considerations # {#privacy-considerations}

Protected Audience aims to advance the privacy of remarketing and custom audience
Expand Down
Loading