以下の流れを実装したprotected-audience-apiのサンプル
- InterestGroupへの参加
- auctionの実行(runAdAuction,generateBid)
- 広告配信
- レポーティング(reportWin, reportEvent)
- 次のオプションつけてchromeの再起動(attestetion checkの無効化)
--disable-features=EnforcePrivacySandboxAttestations- e.g.
open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-features=EnforcePrivacySandboxAttestations(MacOS) - ref : https://github.com/privacysandbox/attestation?tab=readme-ov-file
- error :
Attestation check for Protected Audience on https://localhost:44303 failed. https://example.com/.well-known/privacy-sandbox-attestations.json本番はこれ必要?- ref : https://github.com/privacysandbox/attestation/blob/main/how-to-enroll.md
- e.g.
- privacy sandbox apiの有効化
chrome://flags/#privacy-sandbox-ads-apis https://localhost:4430*に対する自己証明書登録https://localhost:44301/advertiser/index.htmlsafariでアクセスし以下に従って登録(MasOS)- 今回の場合は証明書の名前は
root@buildkitsandbox - ref : https://qiita.com/colomney/items/887f9ea7b68a3b427060
- error :
Worklet error: Failed to load https://... error = net::ERR_CERT_AUTHORITY_INVALID. - 証明書をinstallした後に信頼する必要があることに注意
- 再起動などでこれがリセットされる可能性がある.
- 今回の場合は証明書の名前は
docker-compose up -d --build- re-build with no cache
docker-compose build --no-cachedocker-compose up -d
cd kvsapi./mvnw clean packagedocker cp target/dsp_kvs_api.war paapi-container:/kvsapi/docker exec -it paapi-container bashjava -jar /kvsapi/dsp_kvs_api.war --server.port=8081https://localhost:44300/home/index.htmlchromeでrootページにアクセスhttps://localhost:44301/advertiser/index.htmlinterestGroupに参加https://localhost:44302/publisher/index.html広告が表示されれば成功
- ROOT :
localhost:44300->localhost:8080 - Advertiser :
localhost:44301->localhost:8080 - Publisher :
localhost:44302->localhost:8080 - DSP :
localhost:44303->localhost:8081 - SSP :
localhost:44304->localhost:8080