Repository navigation
Conversation
The bidder, Prebid Server and APS request builders now write resolved EIDs to user.eids instead of user.ext.eids (SID-4). No downstream needs the pre-2.6 placement, so user.ext.eids is no longer written. Non-object EID and UID extensions are dropped because OpenRTB requires ext to be an object. Wire tests now check both fields: EID-presence tests assert user.eids is set and user.ext.eids is absent, and EID-absence tests assert neither field is present. Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
The Prebid.js APS adapter (version 2.2.0, /e/pb/bid), which these requests mirror, builds its body with ortbConverter from ortb2 data, and Prebid's User ID module puts EIDs in ortb2 user.ext.eids. APS has therefore only ever seen EIDs there, so APS requests now carry them in both user.eids and user.ext.eids through an APS-only ApsUserExt. Other builders still cannot write user.ext.eids. Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Summary
Moves resolved EIDs to OpenRTB 2.6 user.eids, retaining the legacy user.ext.eids mirror only for APS. No blocking correctness or security issues found in this PR's delta against its stacked base.
Reviewed commit 0787fd56db65806a5fd3f54e54d4652a6ed8583b against merge base 7bb9e741dd7e3256a2f74c385d30a5a973922570 (feat/s2s-eid-collection-providers).
Verification
Native focused tests passed using cargo test -p trusted-server-core --lib <filter> --locked -j 2:
openrtb: 103 passedeids: 78 passedintegrations::aps::tests: 39 passedintegrations::prebid::tests: 181 passedauction::orchestrator: 99 passed
These test selections overlap. cargo fmt --all -- --check and git diff --check 7bb9e741dd7e3256a2f74c385d30a5a973922570...0787fd56db65806a5fd3f54e54d4652a6ed8583b also passed.
Checked the production transport and current upstream PBS Go/Java EID conversion paths. Live PBS/APS endpoints and local WASM execution were not exercised; consent-denial and wire serialization were verified through separate existing tests rather than a combined end-to-end request.
CI Status
No required checks were reported for this branch. All 24 reported checks passed:
- integration tests: PASS
- trace runtime and browser acceptance: PASS
- integration tests (Fastly EC lifecycle): PASS
- browser integration tests: PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- format-typescript: PASS
- cargo test (cross-adapter parity): PASS
- HTML EOF runtime (Fastly): PASS
- vitest: PASS
- ts dev lint domains (changed lines): PASS
- cargo test (axum native): PASS
- CLAUDE.md symlink guard: PASS
- prepare integration artifacts: PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- release scripts: PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- docs-proposal scripts: PASS
- CI Node pin guard: PASS
- format-docs: PASS
- cargo test: PASS
- worker-deadlines (cloudflare): PASS
- cargo fmt: PASS
- worker-deadlines (spin): PASS
Summary
user.eidsfield. Until now every builder wrote only the pre-2.6user.ext.eids. The bidder driver (standard,prebid-serverandapsprofiles), the Prebid Server integration and the APS integration now writeuser.eids.UserExt.eidsis removed, so thestandardandprebid-serverpaths can no longer writeuser.ext.eids; the compiler enforces it. APS is the one downstream that keepsuser.ext.eids, alongsideuser.eids, because the Prebid.js APS adapter these requests mirror has only ever sent EIDs there (evidence below).user.ext.eidsstops receiving them.Changes
crates/trusted-server-core/src/openrtb.rsUserExt.eids. AddOpenRtbEidalias,From<&Eid>/From<&Uid>conversions to the generated 2.6 types,to_openrtb_user_eids, and the APS-onlyApsUserExt { consent, eids }. Conversion tests.crates/trusted-server-core/src/auction/openrtb.rsuser.eids; the APS profile also mirrors them throughApsUserExt.crates/trusted-server-core/src/integrations/prebid.rsuser.eids. EID tests check both fields.crates/trusted-server-core/src/integrations/aps.rsuser.eidsand mirrorsuser.ext.eids. New no-EID test; wire fixture updated.crates/trusted-server-core/src/auction/test_support.rsassert_no_user_eids,user_eidsandaps_user_eidswire helpers.crates/trusted-server-core/src/auction/openrtb/tests.rscrates/trusted-server-core/src/settings.rsuser.eids.CHANGELOG.md[Unreleased]→Changed.docs/guide/**ec-setup-guide,edge-cookies,integrations/cookie-forwarding,integrations/prebidandintegrations/apsname the new field.Behaviour notes
"eids":[].extthat is not a JSON object is dropped, because OpenRTB requiresextto be an object. Client ingress already drops non-object UIDext, so this only affects malformed stored or provider data.APS: why it keeps
user.ext.eidsThe APS request copies the Prebid.js APS adapter (
ext.sdk = {"source":"prebid","version":"2.2.0"}, endpoint/e/pb/bid):modules/apsBidAdapter.jshasADAPTER_VERSION = '2.2.0'and builds its body withortbConverter. It never toucheseidsorortb2.useritself and does not use the 2.6→2.5 translator.modules/userId/index.tswrites EIDs intoortb2atuser.ext.eids. Nothing in it writesuser.eids.So APS has only ever received EIDs in
user.ext.eidsfrom Prebid.js. That shows what APS is sent, not that it ignoresuser.eids, so APS gets both fields. Open item: confirm with the APS account team, or from a captured request, which field the/e/pb/bidendpoint reads, then drop the mirror ifuser.eidsis enough.How the "check both fields" criterion is met
A few EID-absence tests assert on the internal
AuctionRequest.user.eidsrather than on serialized OpenRTB:auction/endpoints.rs:EidCapturingProvider, used byauction_strips_client_eids_when_ec_identity_deniedauction/formats.rs:auction_request.user.eids.is_none()publisher.rs: the withdrawn-reader auctionThat is the only EID field on the internal type, and every OpenRTB builder takes both wire fields from it:
user.eidsfrom it throughto_openrtb_user_eids.UserExthas noeidsfield, so thestandardandprebid-serverprofiles can't writeuser.ext.eids.ApsUserExt.eidsis a copy of the same converted list.So
Nonethere means neither wire field can appear. Every test of the serialized request checks both fields:assert_no_user_eidsinevery_profile_omits_both_eid_fields_without_eids(all three profiles),aps_request_omits_eids_when_noneand the Prebid no-EID testuser_eids, which also assertsuser.ext.eidsis absent, forstandardandprebid-serveraps_user_eids, which assertsuser.ext.eidsequalsuser.eids, for APSCloses
Closes #1583
Spec
Spec: server-side identity on all adapters, SID-4 (plan task T2 of #1558)
Test plan
justrust cargo test-fastly,justrust cargo test-fastly-reuse,justrust cargo test-axum,justrust cargo test-cloudflare,justrust cargo test-spinjustrust cargo clippy-fastly,clippy-axum,clippy-cloudflare,clippy-cloudflare-wasm,clippy-spin-native,clippy-spin-wasm,clippy-codegenjustrust cargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest run(Node 24.20.0)npm run format,npm run lint(Node 24.20.0)cd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serve--checkon root and crate markdown (CHANGELOG)Checklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)