Skip to content

Add identity-only mode to the Prebid integration - #1620

Draft
prk-Jr wants to merge 2 commits into
feat/s2s-eid-collection-providersfrom
feat/1594-identity-only-tsjs
Draft

prk-Jr wants to merge 2 commits into
feat/s2s-eid-collection-providersfrom
feat/1594-identity-only-tsjs

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add opt-in integrations.prebid.mode = "identity" so publishers can use managed Prebid identity without installing Trusted Server's browser auction integration. Existing configurations default to "auction".
  • Deliver the current server mirror to publisher auctions as request-local first-party data while capturing only native User ID module EIDs into ts-eids, including pages that never run an auction.
  • Preserve publisher bidders, ad units, GPT behavior and consent activity controls. Consent-triggered EC fetching remains in Injected script calls the EC route on consent and merges the IDs into Prebid #1599.

Stacked on #1489, targeting feat/s2s-eid-collection-providers; the mirror writer must land first.

Changes

File Change
crates/trusted-server-core/src/integrations/prebid.rs Add typed auction/identity configuration, default and injected browser mode, with parsing and injection tests.
crates/trusted-server-js/lib/src/integrations/prebid/index.ts Retain shared managed identity setup; select identity wrapping before auction hooks, skip GPT refresh, deduplicate capture and contain blocked-cookie failures.
crates/trusted-server-js/lib/src/integrations/prebid/native_capture.ts Sample fresh native IDs without an auction; handle visibility, navigation and BFCache with one timer.
crates/trusted-server-js/lib/src/integrations/prebid/identity.ts Validate and reread the mirror per auction; merge live EIDs without mutating publisher data or persisting mirror values globally.
crates/trusted-server-js/lib/test/integrations/prebid/identity.test.ts Cover mode isolation, native capture without mirror echo, merge validation/metadata/deduplication, cookie changes and request/callback semantics.
crates/trusted-server-js/lib/test/prebid-artifact-integration.test.mjs Exercise real built Prebid bidder consumption and activity redaction.
docs/guide/integrations/prebid.md Document mode selection, mirror opt-in, publisher ownership and scope.
trusted-server.example.toml Show the default auction mode and opt-in identity setting.
docs/superpowers/specs/2026-11-17-identity-only-tsjs-design.md Define the feature contract and record two spec review rounds.
docs/superpowers/plans/2026-11-17-identity-only-tsjs.md Record implementation and verification steps.

Closes

Closes #1594

Spec

Spec: Identity-only tsjs mode, including two agent review rounds.

Test plan

  • cargo test-fastly && cargo test-fastly-reuse && cargo test-axum && cargo test-cloudflare && cargo test-spin
  • All eight target-matched Clippy aliases
  • cargo fmt --all -- --check
  • JS tests: 3,330 passing; generated bundle build, lint and format checks
  • Docs and repository Markdown format checks
  • Adapter parity tests (29), native build-digest tests (10) and CLI tests
  • Fastly absolute-deadline runtime fixtures (5)
  • URL-host, Wasm clock, CI Node pin, documentation proposal and release producer checks
  • Fastly, Axum and Cloudflare builds; Fastly release WASM build; Cloudflare/Spin auction-deadline fixture builds, lint and local runtimes
  • Browser identity matrix: seven scenarios on each of Fastly and Axum; auction-mode preservation controls on both

Browser verification exercised the actual Fastly and Axum applications, trusted HTTPS development proxy, real Chrome and a controlled bidder. Seven reader scenarios per adapter cover native capture before any auction, mirror delivery/removal/replacement/expiry/malformed input, metadata precedence, consent denial/restoration and no mirror echo. The controlled reader fixture supplied a generated Prebid 10.26 bundle and synthetic mirror; the application injected and served the changed tsjs normally.

A separate operator-config run used the configured publisher origin and external Prebid bundle, without manual requestBids calls. Automatic native capture was observed on the Fastly homepage and an Axum article; captured IDs matched the native getter and unchanged samples did not rewrite the cookie. Some repeated publisher runs encountered external bundle/origin timeouts or absent third-party identity setup, so these observations do not qualify third-party reliability.

Normal provider-to-mirror issuance is not established by these browser checks. Pinned Viceroy 0.21 supplies no JA4 metadata, so the existing browser gate prevents local provider operations; Axum does not support enabled identity providers. Existing provider/finalizer fixture tests passed (67), but deployed Fastly qualification remains outstanding. No deployment or live partner activation was performed.

Checklist

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

@prk-Jr prk-Jr self-assigned this Nov 17, 2026
@prk-Jr prk-Jr linked an issue Nov 18, 2026 that may be closed by this pull request
1 task

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.

Identity-only tsjs mode

1 participant