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
The OpenRTB tests keep this pull request's EID helper imports alongside the base's scripted-client imports for the provider round-trip tests. The base's wire-level auction tests now read EIDs where this pull request writes them. The vendor-denied body EID test and the EC identity denied test in the auction endpoint, and the template cache reader-identity test in the publisher, read user.eids through the shared user_eids and assert_no_user_eids helpers instead of user.ext.eids, since the standard profile no longer writes the extension field. The APS no-EID test drops the transport_timeout_ms field that the base removed from AuctionContext.
|
For the identity integration chain (#1608), this PR's base #1489 was ported onto #1506's EdgeZero cutover and #1526's async store, so Three wire-level tests that #1489's port added after this PR branched read Checked locally at |
The base is #1623's head 78e1f2f, which carries #1612 and #1506's repin of EdgeZero to rc/identity 9d02d7b3. The tree is the base plus this pull request's own changes against its previous base branch. The cutover, the EdgeZero pin and the closed #1605 reconciliation commits that this branch carried come from the base: EdgeZero stays pinned to rc/identity 9d02d7b3 by rev, and the RC tag pin, its Cargo.lock, the #1605 changelog lines, its S3 direct-client patch, its Chrome version pin, its cache harness target-root change, its browser-collector poll fixture and its boxed pre-dispatch test helper are dropped in favor of the base. Axum startup: main runs EdgeZero's run_production_app_with_initializer with the native prepared-store initializer. EdgeZero installs the logger at EDGEZERO__LOGGING__LEVEL as it does on the base, so the adapter's SimpleLogger, its RUST_LOG parsing and its owns_logging override are not revived, and the parse_log_level tests go with them. EdgeZero validates the hosting settings before it installs that logger, so a fatal startup error that finds no logger goes to standard error instead of being dropped, as it was visible before. Axum app: the base's shared identity app, its local identify and batch-sync answers and its enabled-provider rejection stay as they are. The router built by the initializer goes through routes_with_settings, so the production path builds the same IdentityApp and rejects enabled providers the same way. Hooks::routes returns the empty pre-initialization router, Hooks::stores declares the config and secret stores, and every router carries an empty native store snapshot in state. Axum platform: the environment-backed config and secret stores are removed and request services read the immutable prepared snapshots. Tests and harnesses: the route startup test, the integration and EOF harnesses and the smoke script use the prepared local config map and EDGEZERO__SECRETS__ values. The startup, native acceptance and smoke processes set EDGEZERO__LOGGING__LEVEL in place of RUST_LOG, and the provider script drops its unused RUST_LOG value. Docs: the README, the Axum guide and the native RC guide describe the production runner, its fatal invalid host, port and log level values, and the workspace EdgeZero pin 9d02d7b3 in place of the RC tag. Cargo.lock: the base lock plus the 29 packages that the native AWS provider features add, at the same versions as this pull request's own lock.
The tree is the ported #1531 plus this pull request's own changes against #1531's previous head. EdgeZero stays pinned to rc/identity 9d02d7b3 by rev from the base, so the v0.0.12-rc-axum.202611.3 tag pin and its Cargo.lock are dropped. The pinned EdgeZero carries the geo-kv and celld-kv features, geo_capability_for and the EDGEZERO__ADAPTER__GEO settings, so the KV Geo wiring is kept. Axum startup: main keeps the hosting-option capture, the TS Geo profile and the typed hosting errors, and runs EdgeZero's run_production_app_with_options_and_initializer. EdgeZero installs the logger, as on the base, so the adapter's SimpleLogger and RUST_LOG parsing are not revived and the parse_log_level tests go with them. A hosting option failure is captured before any logger exists, so it goes through the same standard-error fallback as other early startup failures. Admitted errors: the pinned EdgeZero has no App::set_admitted_error_response_finalizer, so the initializer no longer installs one. The base's finalize middleware already renders handler errors and finalizes them, and it now applies the request's managed Geo, so the oversized-body test keeps its Geo headers and framework status. The native RC guide says an error EdgeZero renders outside the router carries no Geo or TS headers. Axum middleware: the finalize middleware reads the managed Geo outcome before dispatch and keeps the base's handler-error rendering. Core: the base's Sourcepoint TCF mirror consent test moves to the optional GeoInfo fields. Cargo.lock: no package is added; the adapter gains derive_more, serde and toml edges, and edgezero-store-celld gains the edges of its kv feature. APS tests: #1612 and this pull request each add a test after the APS wire shape test, aps_request_omits_eids_when_none and builds_aps_partial_geo_without_missing_detail. Both are kept unchanged.
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!)