Repository navigation
Conversation
The server-side auction and page-bids built the bid request id as ts-<EC>, and every auction path set user.id to the EC whenever EC creation was allowed, which under GDPR is TCF Purpose 1 alone. Prebid Server bidders and APS therefore received the EC with storage consent only. Build the server-side request id as ts-req-<random> and decide user.id in one place, UserInfo::for_auction, which requires the same rule that gates partner EIDs (Purposes 1 and 4). Both auction request builders use it, so the Prebid Server and APS profile bodies inherit the gate.
dhruv8sh
left a comment
There was a problem hiding this comment.
This PR stops bidders from receiving the EC when a reader grants TCF Purpose 1 but refuses Purpose 4. I found no blocking issues.
- Request ID: the bid request
idis now alwaysts-req-<random>. It is no longerts-<EC>. user.id: it now goes through one helper,UserInfo::for_auction. The helper sends the EC only whenallows_eid_persistenceallows it, the same rule that already gates partner EIDs. Both outbound builders use it:convert_tsjs_to_auction_requestandpublisher::build_auction_request.
I searched the other places that build UserInfo directly. They look like test fixtures, not production paths that skip the gate. I couldn't run anything, so I haven't checked the test or CI results.
Tests cover these cases:
- the helper's consent rules, with and without Purpose 4, GDPR without a TCF signal, and outside GDPR;
- an empty EC;
- the
/auctionhandler end to end; - the Prebid Server and APS bid bodies, with a check that the EC appears only in
user.id.
The CHANGELOG notes that anything downstream that matched auctions by the old per-visitor request ID loses that link. That is intended.
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Both auction builders now use the existing EID consent rule for user.id and generate request IDs independently of the EC. I verified that the Prebid Server and APS bid-body regressions passed in Fastly CI for this revision. No blocking findings.
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR stops the EC from leaking into bid request IDs: AuctionRequest.id is now always ts-req-<uuid>. It also moves the user.id decision into one helper, UserInfo::for_auction, which uses the same rule that already gates partner EIDs (allows_eid_persistence: TCF P1+P4, and fail closed under GDPR with no TCF). Both the server-side/page-bids builder (publisher::build_auction_request) and the /auction path (convert_tsjs_to_auction_request) now go through it. The tests are strong: they serialize the whole request or outbound body and assert that the EC hash appears nowhere, or exactly once. They do this through the real /auction handler and the real PBS and APS OpenRTB builders. I checked that nothing in production parsed or stripped the old ts-<EC> request-ID prefix. The ec_allowed / allows_eid_persistence doc links resolve.
Non-blocking
⛏ nitpick
purpose_one_and_four_consentsilently returns P1-only consent if the base fixture ever loses its TCF — see inline atcrates/trusted-server-core/src/test_support.rs:104
👍 praise
- Single choke point for
user.id, with a doc comment that ties it to the EID rule — see inline atcrates/trusted-server-core/src/auction/types.rs:107
Cross-cutting / body-level findings
- 📌 The Testlight integration still sets
user.idfrom thets-eccookie without any consent check.crates/trusted-server-core/src/integrations/testlight.rs:111(viahandleat line 190) puts the EC into the outbound payload'suser.idwithout consultingallows_eid_persistence. Testlight is a test/dev auction proxy, so it is probably out of scope here. But the CHANGELOG entry says "every auction path setuser.idto the EC", which implies all of them are now gated. Consider a follow-up issue that either gates Testlight the same way or scopes the CHANGELOG wording to the server-side auction,/auctionand/_ts/page-bids.
PR #1709 moves from main onto PR #1662's branch, the top of the identity chain trunk. PR #1662's head brings the identity integration chain as of round 12 wave A, including #1640's row-checked bidder EC (bidder_ec_id and set_auction_ec_identity) and the scripted-client auction test harness. crates/trusted-server-core/src/publisher.rs: #1709 made build_auction_request use a random `ts-req-` request ID and set the user through UserInfo::for_auction. #1640 had moved the EC identity into set_auction_ec_identity, which page-bids also calls on the trace request after the row read, and which set a `ts-{ec}` request ID and an ungated user.id. The resolution keeps the chain's builder and helper: the builder sets #1709's random request ID, and set_auction_ec_identity now takes the consent and sets user.id through UserInfo::for_auction, so both the builder and the page-bids trace path apply the EID consent gate to the row-checked bidder EC. In page_bids_response_includes_auction_id_only_for_winning_bids, #1709's assertions read the chain's JSON bid body: a random request ID and the EC as user.id under non-regulated consent. The chain's assert_ec_identity helper, used by page_bids_sends_user_id_only_for_a_cookie_ec_with_a_row and initial_navigation_sends_user_id_only_for_a_cookie_ec_with_a_row, expected a `ts-{ec}` request ID; #1709 intentionally changes that, so it now expects a random `ts-req-` ID that does not contain the EC. crates/trusted-server-core/src/auction/endpoints.rs: #1709 added /auction tests with a provider that captured the AuctionRequest through main's provider trait. The chain added bidder_ec_id tests at the same place and replaced that trait with outbound OpenRTB providers. The resolution keeps the chain's tests and ports #1709's two tests onto the chain's scripted-client harness, asserting on the bid body the bidder receives under Purpose 1 only and under Purposes 1 and 4. The bidder_ec_id doc no longer says the EC goes into a `ts-{ec}` request ID and names UserInfo::for_auction as the consent gate that follows. crates/trusted-server-core/src/auction/openrtb/tests.rs: both sides added test imports. The resolution keeps both import sets. crates/trusted-server-core/src/auction/test_support.rs: both sides appended test helpers. The resolution keeps the chain's EID assertion helpers, then #1709's server_side_auction_request. CHANGELOG.md: both sides added a Security entry at the top. The resolution keeps the chain's #1506 entry first, then #1709's.
One octopus merge of the round 12 tips into rc/identity c3e3366. It is a single octopus because the RC already holds every sibling's old head, so each tip's new head merges in alongside the others rather than as a chain of merges. The tree is the automatic merge of the RC and all tips, with no resolution: every tip pair, their union and the merge into the RC are clean. Tips, in parent order after the RC: - PR #1503 at 4225024 - PR #1653 at 4bd4903 - PR #1654 at 95cf3e8 - PR #1655 at 05c509d - PR #1622 at afe5217 - PR #1660 at c1a05d7 - PR #1666 at 108b122 - PR #1659 at 5fb8190 - PR #1709 at 6d152f6 - PR #1710 at dcceeee - PR #1713 at cae7801 - PR #1557 at 302e972 PR #1659 sits above PR #1718, so it carries PR #1714, PR #1717 and PR #1718.
|
Round 12 identity realignment:
The base moved from Each merge message says what it carries and how any conflict was resolved. |
PR #1662's new head brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's move of the consent-update test host to publisher.example.com for the URL-host lint and #1540's allow-domain marks on the deployment guide's reference links. The merge is clean.
It brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's and #1540's URL-host lint fixes, and #1622's move of the new GPP bridge tests into its split test file, carried up to every tip: #1653, #1654, #1655, #1622, #1660, #1666, #1659, #1709, #1710, #1713 and #1557. #1503 is already contained. The octopus tree is the conflict-free union of the tips.
PR #1709 moves from PR #1662's branch onto PR #1675's branch, prfection/1669-creative-endpoint-gating-plan, which sits on PR #1662. PR #1675's head (e16189e) brings the creative and auction endpoint switches and PR #1662's latest head (14749b9). crates/trusted-server-core/src/test_support.rs: #1709 added purpose_one_and_four_consent after the shared consent helpers, and #1675 added assert_turned_off_log and assert_endpoint_turned_off at the same place. The resolution keeps #1709's helper, then #1675's two.
…tches PR #1675's new head (20bf514) joins its third review (7c08e50) with its move onto the identity chain. The third review adds a test that each creative endpoint works while only its own switch is on, rewords the cached-page notes to cover open tabs, documents that rewrite_clicks applies only where rewriting runs, and moves assert_turned_off_log below assert_endpoint_turned_off. The merge is clean. crates/trusted-server-core/src/test_support.rs: the helpers now run purpose_one_and_four_consent, assert_endpoint_turned_off, then assert_turned_off_log, the reverse of the order the previous merge gives for #1675's two helpers. Each helper appears once.
PR #1675's new head (54969a7) merges PR #1662's new head (20f849f), which merges PR #1661's head (a3c937f). It brings EdgeZero ef5cbf308, which includes EdgeZero #524 and names Fastly backends with the ez_b31v2_ prefix, and pin-project-lite 0.2.19 from PR #1506. It also brings PR #1626's mirror changes (mirror_provider_policy_denied, SharedIdWriteBackTime), the two smoke-test fixes in PR #1627 and PR #1537, and PR #1535's change that skips re-posting an unchanged Sourcepoint consent mirror. The merge is clean.
PR #1503 at 1d51b78: Add ts ec show and ts ec eids admin diagnostic commands PR #1653 at f217902: Clarify and verify the Axum local config handoff PR #1654 at e4e68bb: Verify pending record writes drain within shutdown grace PR #1655 at 7d0cdb2: Configure EC lifetime and renew it on eligible visits (DEC-13) PR #1659 at bd707f2: Verify geo consent paths on Axum and Fastly PR #1660 at 87c52cd: Retry an after-response write that loses its CAS PR #1666 at b1d7062: Verify identity gates and provider deadlines on Axum PR #1710 at 3d33359: Apply pull-sync consent checks to identify PR #1557 at 3982143: Carry Sourcepoint TCF consent to Trusted Server PR #1667 at f9ac6bb: Present a client certificate on auction providers that set mtls PR #1607 at b3a0b09: Send the resolved client IP to the publisher origin PR #1709 at 635f06a: Keep the EC out of bid request IDs and gate user.id on EID consent PR #1713 at e5f4d05: Apply consent rules to first-party click redirects PR #1622 at dd2ee39: Report CMP consent to the EC route and merge its answer into Prebid
|
Round 15 identity realignment:
The base is now Each merge message says what it carries and how any conflict was resolved. |
|
Cascade of #1533's Axum startup-test port fix ( |
…tegration chain
|
Merged #1627's runtime KV removal ( At the maintainer's request, that commit removes the generic runtime KV store Only that commit was merged, not the base branch's new head. Conflicts were resolved in Checks on this head: no reference to the removed store remains and |
PR #1503 at 6a8797e: Add ts ec show and ts ec eids admin diagnostic commands PR #1557 at a435778: Carry Sourcepoint TCF consent to Trusted Server PR #1607 at 07086f2: Send the resolved client IP to the publisher origin PR #1627 at 5b7fc3d: Wire declared stores and document unsupported Axum KV PR #1636 at d838931: Drain Axum after-response identity tasks on SIGTERM PR #1653 at 5b86d9b: Clarify and verify the Axum local config handoff PR #1654 at be495b3: Verify pending record writes drain within shutdown grace PR #1655 at 888c5f1: Configure EC lifetime and renew it on eligible visits (DEC-13) PR #1659 at 7b1d4a7: Verify geo consent paths on Axum and Fastly PR #1660 at 64a1baa: Retry an after-response write that loses its CAS PR #1667 at 1359722: Present a client certificate on auction providers that set mtls PR #1709 at bc43a3e: Keep the EC out of bid request IDs and gate user.id on EID consent PR #1710 at dc728a1: Apply pull-sync consent checks to identify PR #1713 at ffa7597: Apply consent rules to first-party click redirects PR #1722 at 070e2b0: Use applicable GPP sections from the CMP instead of header sections PR #1666 at 4720b0b (Verify identity gates and provider deadlines on Axum) arrives through #1659, and PR #1622 at c878e6e (Report CMP consent to the EC route and merge its answer into Prebid) arrives through #1722. Every other chain PR arrives through the tips above. The tree is the conflict-free union of these tips and carries no resolution of its own.
|
Round 17 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
…ntegration chain
|
Merged #1614's Trusted Server owns the This merge takes #1675's new head ( Checks on this head: no conflict markers; |
Summary
/_ts/page-bidsput it in the bid requestidasts-<EC>, and every auction path setuser.idto the EC whenever EC creation was allowed (Purpose 1 alone under GDPR). Prebid Server can clearuser.idfor a bidder, but never touchesid, and APS does not go through Prebid Server.idis now alwaysts-req-<random>, anduser.idcarries the EC only under the rule that already gates partner EIDs (allows_eid_persistence: Purposes 1 and 4). The gate lives in one place,UserInfo::for_auction, used by both auction request builders, so the Prebid Server and APS bodies inherit it.Base
Targets
main, not the identity stack. Main has the same leak (build_auction_requestbuiltts-{ec_id};/auctionsetuser.idonec_allowed()alone), and Fastly and Cloudflare production derive GDPR jurisdiction from geo, so it is live there.Note for the identity stack: #1640 moves this logic into
set_auction_ec_identityand addsbidder_ec_id. When main is next merged up the stack, keepts-req-<random>for the request id and routeuser.idthroughUserInfo::for_auction(or applyallows_eid_persistencearoundbidder_ec_id).Behavior
id=ts-<EC>(server-side auction, page-bids);user.id= EC (all paths)id=ts-req-<random>; nouser.id; EC nowhere in the bodyuser.id= EC;id=ts-req-<random>user.id= EC if EC alloweduser.id(fails closed, as EIDs already do)user.id= ECuser.id(same rule as partner IDs)user.id= ECThe server-side request id is no longer stable per visitor; anything that correlated auctions by
ts-<EC>loses that.Where the EC can reach an outbound bid body
id, server-side auction and page-bids (publisher.rs)id,/auction(formats.rs)user.id, both buildersUserInfo::for_auctionauction/openrtb.rs), mediator, request signingid/user.iduser.ext.eidsgate_eids_by_consent(same rule)integrations/testlight.rs:111)ts-eccookie into the upstreamuser.idwithout any consent check. Proposed as a follow-up.Out of scope: #1685 (may widen the purpose rule; change both rules together via
allows_eid_persistence) and #1704 (Prebid Server-side scrubbing).Changes
crates/trusted-server-core/src/auction/types.rsUserInfo::for_auction, the singleuser.idgate; unit tests for its branchescrates/trusted-server-core/src/publisher.rsbuild_auction_request: random request id, gated user; update tests that expectedts-{ec_id}crates/trusted-server-core/src/auction/formats.rsconvert_tsjs_to_auction_requestuses the gate; Purpose-1-only testcrates/trusted-server-core/src/auction/openrtb/tests.rsopenrtb::build_requestcrates/trusted-server-core/src/auction/endpoints.rs/auctionhandler tests capturing what providers receivecrates/trusted-server-core/src/auction/test_support.rs,crates/trusted-server-core/src/test_support.rsdocs/guide/edge-cookies.mduser.idand the request id is never EC-derivedCHANGELOG.mdCloses
Closes #1707
Spec
Not a feature
Test plan
cargo test -p trusted-server-core --lib(native host): 3395 passed, 0 failed. Hosted CI runs the full gate list on this PR; it was not run locally.cargo clippy-fastlycargo fmt --all -- --checkCHANGELOG.mdanddocs/guide/edge-cookies.mdcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1mainbehavior; negative controls (below)Tests fail first. Before the fix, 6 of the 7 new tests failed; for example, the Purpose-1-only Prebid Server body was
{"id":"ts-<EC>", … "user":{"id":"<EC>"} …}. The body tests build the request with the real server-side builder, route it, build the actual Prebid Server and APS bodies, and assert the EC's hash appears nowhere in the whole serialized JSON.Negative controls. Removing the
allows_eid_persistencefilter fails 5 tests (including both body tests and the/auctionhandler test); restoringts-{ec}as the request id fails 5 tests.Runtime (Fastly wasm under Viceroy 0.22.0, local). Client IP mapped to Germany (jurisdiction GDPR); Prebid Server and APS providers pointed at a local HTTPS capture server;
/auctionand/_ts/page-bidscalled with a fictional EC cookie and a synthetic TCF cookie. Same requests againstmain(db36dc0) and this branch:/auctionPBS + APS/_ts/page-bidsPBS + APSuser.id= ECid=ts-<EC>,user.id= ECuser.id, EC absentid=ts-req-…, nouser.id, EC absentuser.id= ECid=ts-<EC>,user.id= ECuser.id= ECid=ts-req-…,user.id= EC onlyNo captured request header carried the EC. Not runtime-tested: Cloudflare, Spin and Axum (Axum and Spin have no geo source today, so jurisdiction is Unknown and no EC is forwarded there), and any deployed environment.
Independent review. One local review pass against
mainand the issue: no blocking findings. Its optional findings (rustdoc link to a crate-private item, missing CHANGELOG/doc mention) are fixed in this PR; the Testlight gap is listed above as a follow-up.Checklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)