Repository navigation
Conversation
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Reviewed 57f2772ee against main (db36dc0ec).
Approving so I'm not blocking, on the understanding that you'll handle the comments before merging. The click gate itself looks right.
R1 · Nonblocking: docs/guide/creative-processing.md still describes the old click behavior. This one sits outside the diff, so it's here instead of inline. Lines 139-146 still say /first-party/click "appends the request's ts-ec value to the landing URL and logs the click with it" and that "both endpoints forward whatever EC ID the request carries". After this PR, click only appends ts-ec when current-request consent allows it and logs a redacted prefix, while /first-party/proxy still forwards unconditionally. Please reword that paragraph and keep "neither switch is a consent control". The dated design spec with the same wording can stay as it is.
Questions:
- When consent is denied, a
ts-ecthe creative already signed into the target still goes through (click_consent_refusal_preserves_existing_signed_querylocks that in). Stripping it wouldn't affect signature validation, because the target is rewritten after validation. Is keeping it intended? - The info log also drops
tsurl, Referer and User-Agent. The issue only asked to redact the EC and drop the EC-bearing target. Was losing the click destination in logs deliberate?
Checks: cargo test -p trusted-server-core --lib -- click proxy_disclosure allows_eid (25 passed), native clippy on core, cargo fmt --check. I relied on CI for the adapter and wasm targets.
PR #1713 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 the creative proxy disclosure policy and fallible Spin request setup. crates/trusted-server-adapter-spin/src/app.rs: #1713 builds the request EC context for the click route and passes it to handle_first_party_click. The chain made the Spin services and request lookups fallible with `?` and an explicit Ok::<Response, EdgeError>. The resolution keeps the chain's fallible setup and adds #1713's build_ec_context call and argument, as the chain's proxy route does. crates/trusted-server-core/src/proxy.rs: both sides changed imports. #1713 imports log_id with EcContext and adds GeoInfo and base64 test imports. The chain already imports EcContext and switched the test imports to the outbound client and crate::platform::GeoInfo. The resolution keeps the chain's imports, adds log_id, and keeps base64. The click handler keeps #1713's consent gate, which uses the same allows_proxy_ec_disclosure predicate the chain's ProxyDisclosureContext uses for creative fetches. #1713's click_geo test helper builds the chain's GeoInfo with GeoInfo::country_region. docs/guide/first-party-proxy.md: #1713 describes consent-gated click disclosure and redacted click logs. The chain replaced the redirect propagation and logging sections with the creative endpoint grant policy. The resolution keeps the chain's sections, takes #1713's behavior list item, adds #1713's click forwarding conditions under the chain's "Click ID forwarding" heading, and drops "identity" from the chain's list of click behaviors that stay unchanged. The chain removed `forward_ec_id`, so the tip now points creative fetches at the endpoint grants instead. crates/trusted-server-adapter-axum/src/app.rs (merged clean, failed to compile): #1713 calls build_ec_context, which the chain's Axum adapter no longer has. The resolution reads the request through state.identity.read_request and passes ec.context, as the chain's first-party proxy route does.
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR gates ts-ec injection on /first-party/click behind the consent context of the current request, using the new allows_proxy_ec_disclosure helper. That helper requires consent that is not expired, no GPC, allows_ec_creation and allows_eid_persistence. The PR also threads an EcContext through all four adapters and stops the click log from recording the target URL, Referer, User-Agent and the full EC ID. The logic is correct and fails closed (a default EcContext resolves to Unknown jurisdiction, which blocks disclosure). Every adapter call site is updated consistently, and the tests use real TC-string and US-privacy cookies decoded through read_from_request_with_geo, so they exercise the full path. I found no blocking issues.
1 of the inline comments below carries a one-click GitHub
suggestion. Use Commit suggestion to apply it as a commit on the PR branch. The other comments describe the change in prose because it touches code outside the diff.
Non-blocking
🤔 thinking
- Content-proxy path still forwards
ts-ecwithout a consent check — see inline atcrates/trusted-server-core/src/proxy.rs:1651
🌱 seedling
- No tests for
Unknownjurisdiction, expired consent, or the helper itself — see inline atcrates/trusted-server-core/src/proxy.rs:3232
⛏ nitpick
- Helper doc comment says "creative proxy", but its only caller is the click redirect — see inline at
crates/trusted-server-core/src/consent/mod.rs:502
👍 praise
- Click log redaction — see inline at
crates/trusted-server-core/src/proxy.rs:1667
Cross-cutting / body-level findings
- 📝 Known gap with country-only US geo, documented in the PR —
docs/guide/first-party-proxy.mdopenly says that country-only US geolocation (including Cloudflare's) resolves toNonRegulated, so aus_privacy=1YYYopt-out is not enforced on click redirects. GPC is still enforced because the helper checks!ctx.gpcregardless of jurisdiction. It is good that this is written down. Please file a follow-up issue for the strict US fallback so the gap doesn't stay only in the docs.
The click forwarding tip said country-only US geography selects NonRegulated and that a strict US fallback was a separate fix. Jurisdiction detection belongs to #1718, which makes a missing or unreadable US region strict, so the sentence would go stale once both land. The tip now says US opt-outs follow the same jurisdiction and consent rules as EC creation and links the Consent Model section instead of describing detection.
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 #1713 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/proxy.rs: both sides changed the test imports. #1675 widened the test_support import with assert_endpoint_turned_off and assert_turned_off_log, and #1713 added the base64 import for its signed click tests. The resolution keeps both. The handlers merged clean: handle_first_party_click takes #1713's EcContext and still checks #1675's click switch first, before it reads the signed target or the consent. The merge broke one call site: #1675's call_creative_endpoint test helper called handle_first_party_click without an EcContext. It now passes an empty one, as it already does for handle_first_party_proxy. The switch tests answer before the handler reads the context, so they still prove the click gate, and #1713's consent tests are unchanged.
…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/proxy.rs: the third review's creative_endpoints_work_when_only_their_own_switch_is_on reaches /first-party/click through call_creative_endpoint, which already passes an empty EcContext to handle_first_party_click. The third review adds no other caller, so none needs the new argument.
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. |
|
Addressed the body-level review feedback in 91ff4240a.
All required local gates passed, including fresh production startup smokes on all four adapters; all 34 hosted checks passed on this commit. Rustdoc completed with 31 warnings in existing documentation links; no deployment or live vendor qualification is claimed. |
…ntegration chain
|
Merged #1614's Trusted Server owns the This merge takes #1675's new head ( Checks on this head: no conflict markers; |
Summary
An available cookie/header EC was previously inserted into click destinations regardless of consent. The click handler now uses the request's consent context and the shared
allows_proxy_ec_disclosurepredicate before inserting that EC. Signature and expiry validation still run first.Base and scope
Targets
prfection/1669-creative-endpoint-gating-plan(#1675), with reviewed basebbbd23407551f51a34dd090cf76c86619edfea7a. This PR is now part of the identity integration chain; earlier descriptions targetingmainare historical.The base already supplies the shared disclosure predicate, its direct table test, and the stricter creative content-proxy policy. This PR connects the click handler to current-request context on Fastly, Axum, Cloudflare and Spin. Review fixes add caller tests and correct documentation; they do not change the currently correct runtime gate.
Behavior and policy boundaries
ts-ecalready embedded by the creative is preserved too: this rule controls insertion of the request EC, not sanitization of arbitrary signed tracking parameters. This follows Apply the proxy disclosure rule to first-party click redirects #1693's unchanged-target requirement.tsurl, Referer and User-Agent are omitted deliberately; URL-bearing inputs can themselves contain identifiers.The creative-processing guide, first-party proxy guide and API reference describe the click contract. The shared helper's documentation names both current callers and its conditions.
Closes
Closes #1693
Spec
Bug fix; no new feature contract or configuration key.
Verification
Review-fix commit:
91ff4240a145cff077f940a6f7f3185e71894d2b. The committed files match the verified working-tree content. Rust 1.98.1 and Node 24.20.0 were selected; runtime/build tools match this branch's.tool-versionsandCargo.lock(Fastly 16.0.0, Viceroy 0.22.0, Spin 4.1.0, Wrangler 4.83.0, worker-build 0.8.5, wasm-bindgen 0.2.126).91ff4240a145cff077f940a6f7f3185e71894d2b.The initial provider-helper attempt was denied localhost listening by the sandbox; the authorized rerun passed all 19 tests. Local provider acceptance here covers the required script helpers; the hosted container jobs remain part of current-revision CI verification. Existing intentionally ignored tests remain ignored.
No deployment or live vendor API qualification is claimed.
Checklist