Skip to content

Send EIDs in OpenRTB 2.6 user.eids - #1612

Open
dhruv8sh wants to merge 6 commits into
feat/s2s-eid-collection-providersfrom
feat/openrtb-user-eids
Open

dhruv8sh wants to merge 6 commits into
feat/s2s-eid-collection-providersfrom
feat/openrtb-user-eids

Conversation

@dhruv8sh

Copy link
Copy Markdown
Collaborator

Stacked on #1489. This PR targets feat/s2s-eid-collection-providers and must merge after #1489.

Summary

  • SID-4 of the server-side identity design puts EIDs in the OpenRTB 2.6 user.eids field. Until now every builder wrote only the pre-2.6 user.ext.eids. The bidder driver (standard, prebid-server and aps profiles), the Prebid Server integration and the APS integration now write user.eids.
  • UserExt.eids is removed, so the standard and prebid-server paths can no longer write user.ext.eids; the compiler enforces it. APS is the one downstream that keeps user.ext.eids, alongside user.eids, because the Prebid.js APS adapter these requests mirror has only ever sent EIDs there (evidence below).
  • This is a wire change for operator-configured bidders, so it has a Breaking CHANGELOG entry: an endpoint that reads EIDs only from user.ext.eids stops receiving them.

Changes

File Change
crates/trusted-server-core/src/openrtb.rs Remove UserExt.eids. Add OpenRtbEid alias, From<&Eid>/From<&Uid> conversions to the generated 2.6 types, to_openrtb_user_eids, and the APS-only ApsUserExt { consent, eids }. Conversion tests.
crates/trusted-server-core/src/auction/openrtb.rs Bidder driver fills user.eids; the APS profile also mirrors them through ApsUserExt.
crates/trusted-server-core/src/integrations/prebid.rs Prebid Server request fills user.eids. EID tests check both fields.
crates/trusted-server-core/src/integrations/aps.rs APS request fills user.eids and mirrors user.ext.eids. New no-EID test; wire fixture updated.
crates/trusted-server-core/src/auction/test_support.rs assert_no_user_eids, user_eids and aps_user_eids wire helpers.
crates/trusted-server-core/src/auction/openrtb/tests.rs Per-profile placement and absence tests; exact wire fixtures updated.
crates/trusted-server-core/src/settings.rs Doc comment names user.eids.
CHANGELOG.md Breaking entry under [Unreleased] → Changed.
docs/guide/** ec-setup-guide, edge-cookies, integrations/cookie-forwarding, integrations/prebid and integrations/aps name the new field.

Behaviour notes

  • An empty EID list is now omitted rather than serialized as "eids":[].
  • An EID or UID ext that is not a JSON object is dropped, because OpenRTB requires ext to be an object. Client ingress already drops non-object UID ext, so this only affects malformed stored or provider data.

APS: why it keeps user.ext.eids

The APS request copies the Prebid.js APS adapter (ext.sdk = {"source":"prebid","version":"2.2.0"}, endpoint /e/pb/bid):

  • modules/apsBidAdapter.js has ADAPTER_VERSION = '2.2.0' and builds its body with ortbConverter. It never touches eids or ortb2.user itself and does not use the 2.6→2.5 translator.
  • modules/userId/index.ts writes EIDs into ortb2 at user.ext.eids. Nothing in it writes user.eids.

So APS has only ever received EIDs in user.ext.eids from Prebid.js. That shows what APS is sent, not that it ignores user.eids, so APS gets both fields. Open item: confirm with the APS account team, or from a captured request, which field the /e/pb/bid endpoint reads, then drop the mirror if user.eids is enough.

How the "check both fields" criterion is met

A few EID-absence tests assert on the internal AuctionRequest.user.eids rather than on serialized OpenRTB:

  • auction/endpoints.rs: EidCapturingProvider, used by auction_strips_client_eids_when_ec_identity_denied
  • auction/formats.rs: auction_request.user.eids.is_none()
  • publisher.rs: the withdrawn-reader auction

That is the only EID field on the internal type, and every OpenRTB builder takes both wire fields from it:

  • All three builders fill user.eids from it through to_openrtb_user_eids.
  • UserExt has no eids field, so the standard and prebid-server profiles can't write user.ext.eids.
  • APS's ApsUserExt.eids is a copy of the same converted list.

So None there means neither wire field can appear. Every test of the serialized request checks both fields:

  • assert_no_user_eids in every_profile_omits_both_eid_fields_without_eids (all three profiles), aps_request_omits_eids_when_none and the Prebid no-EID test
  • user_eids, which also asserts user.ext.eids is absent, for standard and prebid-server
  • aps_user_eids, which asserts user.ext.eids equals user.eids, for APS

Closes

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-spin
  • justrust cargo clippy-fastly, clippy-axum, clippy-cloudflare, clippy-cloudflare-wasm, clippy-spin-native, clippy-spin-wasm, clippy-codegen
  • justrust cargo fmt --all -- --check
  • JS tests: cd crates/trusted-server-js/lib && npx vitest run (Node 24.20.0)
  • JS format and lint: npm run format, npm run lint (Node 24.20.0)
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve
  • Other: prettier --check on root and crate markdown (CHANGELOG)

Checklist

  • Feature PRs: spec linked above, ending in a review log of two or more agent review rounds
  • Changes follow AGENTS.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses log macros (not println!)
  • New code has tests
  • No secrets or credentials committed

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 ChristianPavilonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 passed
  • eids: 78 passed
  • integrations::aps::tests: 39 passed
  • integrations::prebid::tests: 181 passed
  • auction::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:

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.
@aram356

aram356 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration chain (#1608), this PR's base #1489 was ported onto #1506's EdgeZero cutover and #1526's async store, so 8f1a7b20c merges #1489's new head a7262c7db. The one conflict was imports in auction/openrtb/tests.rs.

Three wire-level tests that #1489's port added after this PR branched read user.ext.eids, which this PR leaves absent on the standard profile. So one would fail and two would pass without checking anything. They now use this PR's user_eids and assert_no_user_eids helpers, which also assert that user.ext.eids is absent: auction_drops_vendor_denied_body_eids and auction_strips_client_eids_when_ec_identity_denied in auction/endpoints.rs, and the template-cache reader-identity EID checks in publisher.rs. aps_request_omits_eids_when_none drops transport_timeout_ms, which the cutover removed from AuctionContext. No behavior change.

Checked locally at 8f1a7b20c: cargo fmt, all eight clippy aliases and the core build-digest clippy, scripts/lint-wasm-clock.sh, test-fastly, test-fastly-reuse, test-axum (64), test-cloudflare (66), test-spin (89), parity (33), build-digest (10), host CLI tests (972), docs and Markdown format, and the URL-host lint against #1489, all passing (test-fastly 4,068).

Takes #1489's new head e4ae9ca, which brings #1506's repin of
EdgeZero to rc/identity at 9d02d7b3. The merge is clean, and this PR's tree
changes only by that repin.
@aram356 aram356 mentioned this pull request Nov 19, 2026
20 of 21 tasks
aram356 added a commit that referenced this pull request Nov 19, 2026
The identity integration chain now runs #1489, #1612, #1623, so this PR
takes #1612's head 470f8e1, which sends EIDs in OpenRTB 2.6 user.eids. The
merge is clean, and this PR's tree changes only by #1612's own change.
aram356 added a commit that referenced this pull request Nov 19, 2026
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.
aram356 added a commit that referenced this pull request Nov 19, 2026
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EIDs in OpenRTB 2.6 user.eids; every EID-absence test checks both user.eids and user.ext.eids

3 participants