Repository navigation
Conversation
Accept tcString, preserve consent cookies for omitted fields, and validate optional section IDs. Exercise the browser request shapes through both adapter routes using a shared fixture. Reject cookie delimiters before reconstructing posted consent cookies.
Keep EC GET read-only while withholding SharedID cookies under GPC, US Privacy opt-out or unknown geography. Exercise the permission boundary and decisive GPP consent through both adapter routers, and correct the related architecture and auction diagrams.
#1660 (173d6d0) retries an after-response identity write that loses its compare-and-swap through EdgeZero's RecordHandle::update, with at most one follow-up write and a stale_read outcome for a stale re-read. It now sits on #1662: its merge of #1662's chain takes the chain's EdgeZero pin, 459bd27d, which carries EdgeZero 536, in place of its preview pin e9a22a70, and moves its outcome log onto #1646's shared runner. The merge is clean.
|
For the identity integration branch (#1608), I pushed |
The KV branch of the handwritten store metadata test formatted every declared ID into its assertion message, inside the loop that also walks the config and secret stores. Collect only the KV IDs the manifest does not declare and compare that list with an empty one, so a failure still names the offending stores without formatting the declared set.
#1646's merge made the container test expect the failure router for invalid application inputs: the process keeps listening, liveness stays up, and every other route answers the unavailable response. The missing-secret case still ran under a seccomp profile that denies bind and listen, so the adapter could not open its listener, exited with "address unavailable", and failed "must keep serving the failure router". Drop that profile. The case still proves its own cause: the log must name the missing secret in the prepared secret store, and initialization must fail before the lifecycle ready line.
|
For the identity integration branch (#1608), I pushed |
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR moves the Axum adapter's identity handling onto the shared IdentityApp, so Axum now uses the same code as the other adapters for reading the request, preparing navigations, provider lookups, finalizing, follow-up work after the response, identify, batch sync, consent update and the first-party proxy context. Axum also stops rejecting enabled identity providers and builds them through trusted_server_identity_providers. I found no bugs I could confirm in the parts I reviewed.
Limits of this review: the diff is over 500 KB, so I focused on the Axum app wiring and the shared lifecycle APIs it calls. I did not run any tests.
Cross-cutting / body-level findings
- 📝 Axum's EC browser check is now looser — The old UA-token check (the User-Agent had to contain
"Firefox/","Chrome/"or"Safari/"and could not contain"bot") is replaced by the shared ruleknown_browser != Some(false). Axum will now create an EC in more cases than before. The change is deliberate, and a code comment explains it: the UA is analytics metadata, not an authorization gate. - 📝
kv_store_metadatanow always declares the EC record store — It does this even when only Geo KV is selected. The change is deliberate and documented in the code. - 👍 Store binding follows the existing pattern — The store is bound with
Arc::get_muton a freshly built state and then on theIdentityApp, which matches the existing pattern instartup.rs. Binding happens before the router clones the state.
CI Status
- integration tests (Fastly EC lifecycle): PASS
- integration tests: PASS
- cargo test: PASS
- Fastly response diff script: PASS
- docs-proposal scripts: PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- cargo test (cross-adapter parity): PASS
- format-typescript: PASS
- Native provider acceptance script: PASS
- health-startup (fastly): PASS
- release scripts: PASS
- format-docs: PASS
- CLAUDE.md symlink guard: PASS
- health-startup (cloudflare): PASS
- ts dev lint domains (changed lines): PASS
- vitest: PASS
- health-startup (axum): PASS
- cargo fmt: PASS
- cargo test (axum native): PASS
- CI Node pin guard: PASS
- local-provider-image: PASS
- HTML EOF runtime (Fastly): PASS
- record-provider-image: PASS
- trace runtime and browser acceptance: PASS
- browser integration tests: PASS
- worker-deadlines (cloudflare): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- worker-deadlines (spin): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- health-startup (spin): PASS
- prepare integration artifacts: PASS
- stock-celld-records: PASS
|
For the identity integration branch (#1608), I pushed Takes #1642's new head 3b6b8b5, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities). The merge is clean. |
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Reviewed this PR against its live base, feat/providers-awaited at 3b6b8b5885. I’m requesting changes for the two consent-related findings marked P1. Four further contract issues are noted inline.
The focused core suite (227 tests), Axum library suite (40 tests), and Axum startup suite (13 tests) passed. The inline findings are based on tracing paths not exercised by those checks.
Summary
ts-ec; partner APIs stay local, and/auctionbody EIDs update existing live records.TS_EC_*selection with a declared logical record store and EdgeZero provider bindings. Preserve prepared config/secret startup. A configured record store that is not prepared, cannot meet the record contract or is unsupported on Axum now installs Finish Axum production startup on the native baseline #1635's failure router (see Startup failures).Stacked on #1642 (
feat/providers-awaited).Current review-correction head:
39392fc859a34cad1de9a1b834aedc7e912055e0. All older verification entries below are historical. All 33 current GitHub Actions checks pass, including the Fastly runtime regressions and the macOS retry after a runner DNS failure.Startup failures
Since merging #1635, Axum follows the #1142 health and startup-failure contract:
EDGEZERO__ADAPTER__DATA_DIR)/health200,/readyand every route503provider = "fastly")/health200,/readyand every route503Before this merge, the last row exited before listening.
Reconciliation with #1642
#1642 and this PR both branched from #1641 and both implemented
/auctionbody EID saving, page-phase provider lookups and the identity-cookie rule for non-document responses. Signed merge4ffbaf805keeps one implementation of each; signed follow-ups461aa0d38andaa315593fadd review fixes and restore #1642's write gating for rejected clients. No commit rewrote history./auctionbody EID savingcommit_auction_body). It saves before bidding, also when bidding is disabled, and runs on both adapters.commit_auction_ingest. Finalization never saves auction body EIDs.NAVIGATION_LOOKUPSand collection inmain.rs. No per-request global state remains.Single write per
/auctionauction_and_finalization_make_at_most_one_conditional_writecounts conditional writes across the handler and finalization on the same store:Putting #1642's finalize writer back makes this test fail (2 writes instead of 1 on conflict).
finalize_never_persists_auction_body_eidsnow loads a live record before finalizing, so it also fails if a finalize writer returns.Tests carried over from #1642
All of #1642's tests for the removed code moved onto the surviving path. The main ones:
auction_body_eids_reach_context_and_kvauction_body_eids_are_persisted_before_response(coreauction/endpoints.rs); also checks the row before finalizationfinalize_saves_auction_body_eids_to_missing_partner_uidsauction_saves_body_eids_to_missing_partner_uidsfinalize_auction_body_eids_never_create_a_rowauction_body_eids_never_create_a_rowapp.rs, same names, through the handlerid5_lookup_reaches_the_minted_record_and_the_mirror_of_the_same_navigationSeven Fastly lookup and after-response tests are unchanged apart from setup. #1642's
navigation_with_fetch_metadata_mints_an_ecbecame..._gets_a_permit: without a record store this PR never issues an EC that has no record behind it, so the test now checks the permit instead.EC route browser contract
The server adopts the browser consent queue contract from #1622. TCF-only and combined requests previously returned 400 because the server expected
tcfStringand requiredapplicableSections. GPP-only requests also removed unposted TCF consent from the request.tcString,gppStringandapplicableSections; reject unknown fields, includingtcfString.euconsent-v2,__gppor__gpp_sid, as ID-9 requires. An explicit empty sections array clears the sections hint. Supplied fields must be strings or an integer array; null is rejected.crates/trusted-server-js/lib/test/fixtures/ec-route-contract.jsonruns through the real Axum and Fastly routes (eight cases).window.__tsjs_prebid.ecRouteinjection is in Report CMP consent to the EC route and merge its answer into Prebid #1622 and stays outside this PR.Changes
Cache-Control: no-store, private./auctionbody saving and on finalize record writes.The record service is declared unconditionally. Omitting
ec.storagedisables application identity, while EdgeZero still prepares the declared provider; the local provider needs a writable data directory. Select DynamoDB/celld through EdgeZero bindings, not TS environment variables.Identity cookie rules
ts-ec,ts-eids, the mirror, SharedID write-back) are set only on eligible HTML document responses, cached-document 304 responses and EC route responses.ts-ec, the configured SharedID cookie and its_cstcompanion, and__Host-ts-eids-mirrormay accompany any finalized response. This covers explicit withdrawal, mirror revocation and SharedID opt-out (_pubcid_optout). Other expiries, such as the retired pull marker, are still dropped off ineligible responses.Set-Cookieheaders with managed names are removed before core finalization, including origin expiries and values with non-ASCII bytes.Cache-Control: no-store, private, with validators and shared-cache headers removed.Behavior changes
Fastly, compared with #1641
Production comparison base: #1641. The parent design motivates these differences.
known_browser != Some(false); absent or unrecognized trusted JA4 does not block on its own.user.idwithout a record check. Finalization wrote only for consent withdrawal./auctionand page-bids for reads only: a cookie EC reaches bidders asuser.idonly with a consented record, and stored EIDs enrich bids. Rejected clients get no navigation write permit and no finalize writes (nots-eids/SharedID ingestion, no SharedID creation or write-back, no EC refresh);/auctionbody saving is skipped and the EC route GET restores no SharedID. Consent withdrawal still tombstones and expires the EC. Axum behaves the same on all three routes.private, max-age=0.no-store, private, without validators. Responses whose only identity cookies were filtered can keep ordinary origin cache policy.no-storeis stricter./_ts/api/v1/ecfell through to the publisher./auctionbody EIDsts-eidscaptured only from the first Cookie field.ts-eidsacross all Cookie fields.Compared with #1642
For reviewers who reviewed #1642:
/auctionbody EIDsno-store, private.Stack and merge notes
feat/providers-awaited(Verify awaited identity lookups and save /auction body EIDs #1642), which is based onfeat/record-backend-edgezero(Move the lazily opened EC record store into core #1641).c997518f9and000e6f694bring both up to their current heads; Restrict creative proxy identity disclosure #1615 and Standardize health and startup-failure responses across adapters #1617 arrive through Finish Axum production startup on the native baseline #1635.prepare_nativenow binds the record store; Axum no longer callsreject_enabled_providers; the Axum first-party proxy reads its EC throughIdentityApp::read_requestfor Restrict creative proxy identity disclosure #1615's disclosure policy, so a malformed identity or consent input now returns an error response there, as on Fastly (Cloudflare and Spin still fall back to an empty EC context); Fastly'sproxy_policy_named_route_preserves_withdrawal_and_terminal_privacyseeds through the shared record store.trusted_server_runtime_kv, sotrusted_server_kvstays this PR's record store with no ID clash), Say certificate checks cover every outbound HTTPS request #1616 (post-delivery TLS regression). Individual PR CI does not establish those merge results.trusted_server_kvhere. Wire declared stores and document unsupported Axum KV #1627 replaces that with a lookup bytrusted_server_runtime_kv.Verification
Author-run local results on the merge result (
000e6f694):cargo test-axum(122 passed), includingunsupported_ec_storage_serves_the_failure_router_and_uncompiled_providers_fail_before_listen,missing_secret_serves_the_failure_router_without_legacy_fallback,identity_conformance_axumandredirect_cancels_page_lookups_without_waiting.proxy_policy_named_route_preserves_withdrawal_and_terminal_privacy.ec::appandhealthtests (28 passed); CLIconfig_env_overlay(20 passed);scripts/test-runtime-env.sh(54 fixtures) andscripts/lint-runtime-env.sh.cargo check-axum,check-fastly,check-cloudflare, native Spin check;cargo clippy-axum,clippy-fastly,clippy-spin-native; Rust formatting.000e6f694.Author-run local results on
aa315593f:cargo test-axum(121 passed), includingknown_non_browser_navigation_axum,api_identity_expiries_axum,identity_conformance_axumandredirect_cancels_page_lookups_without_waiting.refused_client_auction_validates_its_ec_without_writing,refused_creation_gets_no_navigation_write_authorityandrefused_creation_writes_only_a_consent_withdrawal.cargo test-fastly(4,239 aggregate passes, including 247 adapter tests) andcargo test-fastly-reuse(247 passed).verify_known_non_browser_navigationon both adapters: a known non-browser returning with a live EC and ats-eidscookie makes no record write and gets no SharedID cookie; the same request from an allowed client writes and gets SharedID; the EC route GET restores the stored SharedID only for the allowed client; the non-browser's consent withdrawal still tombstones the record and expires the EC.auction_body_ingest_rejects_known_non_browsers(Fastly, real routed/auction): non-browsers make zero writes but still have their EC checked against the record (consented row allowed asuser.id; missing and withdrawn rows not); the browser control makes one write./auctiongraph filter fails the auction test; forcing Fastly finalize writes on failsidentity_writes_are_refused_only_for_known_non_browsers; removing both new gates on Axum failsknown_non_browser_navigation_axum; settingpersist_body: truefails the core refused-client auction test; removing the EC route GET check failsknown_non_browser_navigation_axum.cargo clippy-fastly,clippy-axum,clippy-cloudflare,clippy-cloudflare-wasm,clippy-spin-native,clippy-spin-wasm; Rust formatting.aa315593f(superseded by the merge head).Earlier evidence, still valid for unchanged paths and recorded in this description's edit history:
Remaining qualification
scripts/test-native-ec-image.mjsfrom #1536) #1579: broader after-response provider-task shutdown and release qualification.ts-ecitself is not filtered. This behavior predates this PR.sharedIdcookie, sosharedIdandsharedId_cstcount as managed identity cookies: an originSet-Cookiefor either is removed from ineligible (non-document) responses._pubcidis managed only when Prebid configures it as the SharedID cookie.Closes
Closes #1574
Spec
Axum shared identity design and implementation plan; S2S EID collection design for the WB-1 cookie rule.
Checklist
error-stackReview corrections
Honor split-field SharedID opt-outs across ingestion, write-back and bidder output; discard auction identity snapshots after conditional conflicts; settle external headers before identity eligibility and filter integration managed-cookie writes; strictly validate posted GPP section payloads; hand Fastly EC POST follow-up to committed delivery; overlap status dispatch with the origin and cancel it on redirects. Focused native regressions pass. Fastly runtime and all full CI gates pass in GitHub Actions on the current review-correction head.
Direct children #1654, #1653, #1636 and #1626, and later identity-stack descendants, need to integrate this head separately. No dependent branch was merged or rebased by this correction.