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

Add article "Sign up for the Ad Selection API" #3285

Merged
merged 47 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e35e078
Draft
mikehoffms Oct 5, 2024
74c305b
linkfix
mikehoffms Oct 5, 2024
9f6cadd
Update origin-trials.png
mikehoffms Oct 5, 2024
0caaaef
red box on Reg button
mikehoffms Oct 5, 2024
abd8876
flags.png redo
mikehoffms Oct 5, 2024
4e654f7
redo 2 pngs
mikehoffms Oct 5, 2024
ea7d54f
apply copyedit suggestions except table format
mikehoffms Oct 5, 2024
138993d
format lists as tables, add Images h4, See Alsos
mikehoffms Oct 5, 2024
c28cfc4
format paragraph 2 as list
mikehoffms Oct 5, 2024
f1a98f6
Sellers (SSPs) - add 's' in acro
mikehoffms Oct 5, 2024
70508f3
smooth the wording of seller & SSP
mikehoffms Oct 6, 2024
d5d249d
format attestations as list
mikehoffms Oct 6, 2024
92d289f
format true & false as list
mikehoffms Oct 6, 2024
f8e4112
format true and false as contiguous in paragraph
mikehoffms Oct 6, 2024
6bea894
web-plat.md add h2 for Ad API
mikehoffms Oct 6, 2024
f6a03b1
Global update list of Tips articles
mikehoffms Oct 6, 2024
3f619c1
card 10 items max, update macOS url
mikehoffms Oct 6, 2024
08fd61b
cards: omit parent article, not reg article
mikehoffms Oct 6, 2024
a3356f8
cards: Compat Chgs is What's new, not How to
mikehoffms Oct 6, 2024
2cf133a
separate col for service containing the function
mikehoffms Oct 6, 2024
47540fc
expand Images intro
mikehoffms Oct 6, 2024
25fafc6
concat lines of para
mikehoffms Oct 6, 2024
a0e3796
remove "event-level reporting" from function name
mikehoffms Oct 6, 2024
832cf00
token that's generated
mikehoffms Oct 6, 2024
e37b13e
dup "TEE" clarif'n in See Also
mikehoffms Oct 6, 2024
77c3604
hi-res screenshots, Submitting multiple domains
mikehoffms Oct 7, 2024
b99d72d
move Reg button down, reseq json field descs
mikehoffms Oct 7, 2024
a41139f
inc pb cmts, h4 heading for Flags
mikehoffms Oct 7, 2024
fb65344
clarify top-level domain, inc cmt ans's
mikehoffms Oct 7, 2024
d6bfcd4
expand k-anon, relate service/worklet/udf
mikehoffms Oct 7, 2024
28f8d40
cap'zd k-anon in link text
mikehoffms Oct 7, 2024
3fb58f6
token is generated and sent for top-level domain
mikehoffms Oct 7, 2024
311eadd
gRPC endpoint
mikehoffms Oct 7, 2024
8f4f95b
tighten receiving/hosting json, req'd fields
mikehoffms Oct 7, 2024
b0d580d
grammar at Terraform
mikehoffms Oct 7, 2024
f62bbfb
streamline "To use, use, by X"; supply-side
mikehoffms Oct 7, 2024
5da9e87
trim: a feature assoc'd w Ad Selection API
mikehoffms Oct 7, 2024
85b57f3
review>view, consistent lowercase 'preview'
mikehoffms Oct 8, 2024
8fdbf8b
JS that's run when Edge, actions>auctions
mikehoffms Oct 8, 2024
b685e75
advertiser>advertising partners
mikehoffms Oct 8, 2024
0243d33
no spaces in the OT's ID
mikehoffms Oct 8, 2024
4971fc4
create the json file
mikehoffms Oct 8, 2024
4c4012b
json filename must be
mikehoffms Oct 8, 2024
3ec8de5
change gRPC to HTTPS 1x, remove 3x; creative
mikehoffms Oct 8, 2024
9ec8a23
create Use article, to simplify Sign Up article
mikehoffms Oct 8, 2024
f7c4b64
linkfix
mikehoffms Oct 8, 2024
0fd238b
single article
mikehoffms Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion microsoft-edge/developer/index.yml
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ landingContent:
url: ../webview2/webview2-api-reference.md
# =============================================================================
# Card r2c3
- title: Development tips for Microsoft Edge
- title: Development tips for Microsoft Edge # = /web-platform/
linkLists:
- linkListType: how-to-guide
links:
Expand All @@ -190,6 +190,9 @@ landingContent:

- text: Detect Windows 11 using User-Agent Client Hints
url: ../web-platform/how-to-detect-win11.md

- text: Sign-up for the Ad Selection API
url: ../web-platform/ad-selection-api.md
# =============================================================================
# Row 3 with 3 cards
# =============================================================================
Expand Down
3 changes: 3 additions & 0 deletions microsoft-edge/toc.yml
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,9 @@
href: devtools-guide-chromium/json-viewer/json-viewer.md
displayName: JSON viewer, view JSON

- name: Sign-up for the Ad Selection API
href: ./web-platform/ad-selection-api.md

# =============================================================================
# if top-of-page title is longer, add it to displayName comma-delimited list of lookup keywords
- name: Microsoft Edge IDE integration
Expand Down
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
225 changes: 225 additions & 0 deletions microsoft-edge/web-platform/ad-selection-api.md
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
---
title: Sign-up for the Ad Selection API
description: Sign-up for the Ad Selection API, which provides user-relevant ads on your site without using third-party cookies.
author: MSEdgeTeam
ms.author: msedgedevrel
ms.topic: conceptual
ms.service: microsoft-edge
ms.date: 10/04/2024
---
# Sign-up for the Ad Selection API
<!-- https://go.microsoft.com/fwlink/?linkid=2289906 -->

The Ad Selection API provides user-relevant ads on your site without using third-party cookies. See [Ad Selection Overview](https://github.com/WICG/privacy-preserving-ads/blob/main/Ad%20Selection%20Overview.md) in the "WICG / privacy-preserving-ads" repo.

The Ad Selection API can be used by: **Sellers (SSPs)** – supply-side platforms, who can use the API to provide higher-quality ads for their publishers; and **Buyers (DSPs)** – demand-side platforms, who can use the API to improve the effectiveness of advertising campaigns.

To get started using the Ad Selection API and test out the end-to-end flow, sign up for the limited Preview of the Ad Selection API.

Sellers (SSP) and buyers (DSP) can use this guide to:
* Test the Ad Selection API on your site.
* Sign-up for the Ad Selection API limited preview.
* Register for the Origin Trial.
* Complete API attestation.
* See the Ad Selection API, its usage, and deploy to Azure.
* Set up an evaluation environment with a supported cloud provider.
* Prepare all needed UDF functions and be able to work with Edge Web API.


<!-- ====================================================================== -->
## Attestation enrollment and alpha sign-up


<!-- ------------------------------ -->
#### When and where is the preview available?

Microsoft Edge versions starting with **130.0.2808.0** will have the platform components of the Ad Selection API in a limited, developer opt-in preview outside of the European Economic Area (EEA) and the United Kingdom (UK).
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

Developers can individually change the Ad Selection API platform features, using the testing flag, `edge://flags#edge-ad-selection-api`:

![The "Ad Selection API" flag](./ad-selection-api-images/flags.png)


<!-- ------------------------------ -->
#### Sign-up and attestation requirements and process

Developers interested in alpha testing can join the [Origin Trial](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/). This trial enables end-to-end testing of Ad Selection API features, covering both the API usage and the deployment of secure container images.

To sign up for an Origin Trial token:

1. Go to Microsoft Edge [Origin Trials](https://microsoftedge.github.io/MSEdgeExplainers/origin-trials/) in a new window or tab.

1. In the **Ad Selection API** section, click the **Register** button:

![Origin trials](./ad-selection-api-images/origin-trials.png)

1. Complete the form for each domain you intend to use with the Ad Selection API and make sure to provide a valid developer contact:

![Registration form](./ad-selection-api-images/reg-form.png)

* When you receive your OT token, this can be used on the provided domain(s) to enable Ad Selection APIs for testing with supported Microsoft Edge clients.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

1. To complete attestation and allow for continued access to the Ad Selection API, you'll need to host a JSON file named `attestations.json` on each domain at a `/.well-known/` path. For example: `https://contoso.example/.well-known/ad-selection-attestations.json`.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

This JSON file must conform to the following standards below, and must include the created OT token as well as a list of APIs.


<!-- ------------------------------ -->
#### Example attestations.json file

Below is an example of an `attestations.json` JSON file, containing an OT token, which must be published within **30 days** of receiving the initial token:

```json
{
"ad_selection_api_attestations": [
{
"attestation_parser_version": "2",
"attestation_version": "2",
"privacy_policy": [
"https://contoso.example/privacy/"
],
"ownership_token": "<Your Unique Token Here>",
"enrollment_site": "https://contoso.example/",
"platform_attestations": [
{
"platform": "edge",
"attestations": {
"attribution_reporting_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true/false
},
"shared_storage_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true/false
},
"private_aggregation_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true/false
},
"ad_selection_api": {
"ServiceNotUsedForIdentifyingUserAcrossSites": true/false
}
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
}
},
{
"platform": "android",
"attestations": {}
}
]
}
]
}
```


<!-- ---------- -->
###### Important fields and values

* `"platform":` must be `"edge"` or `"android"`.

* `"attestations":` must be `"attribution_reporting_api"`, `"shared_storage_api"`, `"private_aggregation_api"`, and/or `"ad_selection_api"`.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

Note: Each `"attestations":` entry must have a single field, `"ServiceNotUsedForIdentifyingUserAcrossSites":`, with either a `true` or `false` value, indicating your reality.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `"ownership_token":` is the OT token generated for your individual domain registration.


<!-- ====================================================================== -->
## Deploy the Ad Selection API services

The Ad Selection API uses a [trusted execution environment (TEE)](https://confidentialcomputing.io/wp-content/uploads/sites/85/2021/03/confidentialcomputing_outreach_whitepaper-8-5x11-1.pdf) to provide a level of assurance for data integrity, data confidentiality, and code integrity. Services provided by the Ad Selection API must run in a TEE to secure the data used by these services.

Ad Selection Services running in a TEE should be deployed on a cloud platform that supports the necessary security features. Initially, services can be deployed in Azure using [Confidential ACI containers](/azure/container-instances/container-instances-confidential-overview).

The Ad Selection API provides different services that need to be deployed by buyers or sellers. Microsoft provides an image for each service, which can be deployed on a cloud provider.


<!-- ------------------------------ -->
#### Seller's Service
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **SellerFrontEnd Service:** The front-end service provides a gRPC endpoint `/SelectAd`, which receives requests from the seller's ad service to initiate the Protected Audience auction flow.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **Auction Service:** This service provides a gRPC endpoint `/ScoreAds`, which receives requests from the **SellerFrontEnd** service with bids participating in the auction. The service responds with a score value that the **SellerFrontEnd** uses to choose the winner.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **Seller's Key/Value Service:** This service receives requests from the **SellerFrontEnd** with lookup keys from buyers' bids (such as ad_render_urls) and returns real-time scoring signals required for the auction. The Key/Value service will be run in Bring Your Own Service (BYOS) mode, so the seller does not need to deploy it in a TEE, and can instead use the image provided by Microsoft.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved


<!-- ------------------------------ -->
#### Buyer's Service
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **BuyerFrontEnd Service:** The front-end service provides a gRPC endpoint `/GetBids`, which receives requests from **SellerFrontEnd** to initiate the bidding flow.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **Bidding Service:** This service provides an endpoint `/GenerateBids`, which receives requests from the **BuyerFrontEnd** service to handle the bidding and generate a bid. The service generates a bid, chooses the winner, and selects the banner to be rendered.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **Buyer's Key/Value Service:** A buyer's Key/Value service receives requests from the **BuyerFrontEnd** service and returns real-time buyer data required for bidding, corresponding to lookup keys from Interest Groups. This request happens once per workflow. The Key/Value service will be run in BYOS mode.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **Bidding Selection & Key/Value Service:** This service receives requests from the Bidding Service to select and return additional ad banners (candidates) that can participate in bidding. The service can also return additional signals needed for bidding. The Bidding Service may send multiple requests to the Selection & Key/Value service or may choose not to send any, as the service is optional. The Selection & Key/Value service must be deployed in a TEE.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* **K-Anon Service:** This service collects k-anonymity counters and checks that the winning ad banner passes the k-anonymity check.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

Buyers and sellers need to provide their own custom code as User-Defined Functions (UDFs) that will run in private containers within the deployed services. These User-Defined Functions can execute custom business logic.


<!-- ------------------------------ -->
#### Seller's User Define Function
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `scoreAd()` for **Auction Service:** This function should generate a score for each buyer's bid or reject it. The score will be used in the **SellerFrontEnd** to choose a winner from among all buyers.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `reportResult()` for **Event-Level Reporting:** This function will run in the **SellerFrontEnd** after the final winner has been chosen. The goal of `reportResult()` is to notify the seller about the winning bidder and provide the bid value.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved


<!-- ------------------------------ -->
#### Buyer's User Define Function
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `generateBids()` for **Bidding Service:** This function will generate a bid and choose the banner that will be shown.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `reportWin()` for **Event-Level Reporting:** This function will run in the **SellerFrontEnd** if the buyer's bid wins the auction. The goal of `reportWin()` is to notify the buyer that they have won the auction and generate notification URLs that will be triggered later, such as during banner rendering or other client events.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* `getValues()` for **Bidding's Selection & Key/Value Service:** This function will run in the Bidding Selection & Key/Value service if the buyer uses this service. It allows for custom code execution for data lookup and selection.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved


<!-- ------------------------------ -->
#### Deployment guide

To deploy the Ad Selection API service to Azure:

1. Create an Azure account and create a subscription at [Microsoft Azure](https://azure.microsoft.com).

1. Choose the **Confidential ACO containers** option.

1. Download the Terraform [deployment scripts and guide](https://go.microsoft.com/fwlink/?linkid=2290115). **Note:** Make sure the hash of the image you downloaded matches the hash in the script you download.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

1. The Terraform scripts already include links to public images provided by Microsoft. Choose the required services and deploy them by following the steps in the included `readme.md`.

1. Set any specific flags for your environment, including auction worklet locations.

1. Configure all prerequisites and prepare all tools for deployment.

1. Create Azure Resources and run terraform script that finish deployment.

1. Develop worklets including `user-defined-function` (UDF) and start Ad Selection API services.


<!-- ====================================================================== -->
## Use the Ad Selection API on your website

To start using the Ad Selection API, sellers and buyers need to use the API, by modifying the JavaScript code of their websites running in Microsoft Edge.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* Sellers: To run private actions, fetch interest groups, and do reporting, update your supply and publisher code.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

* Buyers: To create interest groups and store them in the browser, update the code on your advertiser partners' websites. You can use the delegation mechanism to restrict and allow Interest Group creation on third-party domains.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

To learn more about which API methods are available and to review example code, see the [Ad Selection API documentation](https://github.com/WICG/privacy-preserving-ads/blob/main/API%20Details.md).


<!-- ====================================================================== -->
## See also
<!-- todo: all links in article -->
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

The end-to-end design and technical documents can be found in the public repo: [Ad Selection API Proposal](https://github.com/WICG/privacy-preserving-ads?tab=readme-ov-file#ad-selection-api-proposal).

Public images that must be used for deployment; only official images from Microsoft will be able to run private auction:
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* Buyer
* [buyer-frontend-service](https://mcr.microsoft.com/product/ad-selection/azure/buyer-frontend-service)
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* [bidding-service](https://mcr.microsoft.com/product/ad-selection/azure/bidding-service)
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* [k-anonymity-service](https://mcr.microsoft.com/product/ad-selection/azure/k-anonymity-service)
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* Seller
* [seller-frontend-service](https://mcr.microsoft.com/product/ad-selection/azure/seller-frontend-service)
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* [auction-service](https://mcr.microsoft.com/product/ad-selection/azure/auction-service)
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved