Repository navigation
Conversation
Startup errors for an absent or unreadable app-config secret now name the reference key, never its value. The startup tests poison every legacy name with valid values, ignore Linux self-connections in the before-listen probe and check logs for secret values after successful runs too. DataDome leaves Host and Protocol out of the protection payload when the checked request information fails, instead of reporting an unchecked header or request target. The provider acceptance script runs through a symlink, asserts the cause of each startup failure without printing output, and pins container DNS.
The getting-started Axum quickstart exported legacy config and secret variables that the production startup ignores, so following it failed. It now uses the local config directory and EDGEZERO__SECRETS__ values. The Axum guides describe the binary as the production entry point, and the native startup guide is written for operators with a run-locally example. CI runs the provider acceptance helper tests; the full Docker run stays local.
A secret reference key is an operator-supplied string. If a secret value were pasted into a reference field, an error naming the key would log it. Startup errors now name the config field paths that reference the missing secret, using a new core secret_reference_paths helper, and the tests and smoke script assert that no key appears. The architecture guide now describes Axum's prepared-store snapshots, and the integration environment attaches Axum's recent output when readiness times out.
Brings #1615, which now carries the identity integration chain (dhruv8sh's spine with the core identity app, the protected native Geo from #1532, the identity conformance suite from #1613, the certificate-check statement from #1616, the health and startup-failure contract from #1617 applied to the native production runner, and the creative-proxy identity disclosure policy), into Axum production serving. Axum startup: the PR's path-named secret diagnostics, its shared read-only snapshot error and its crate-private snapshot type merge into the base's prepare_native, so a missing or unreadable secret still names only its config paths, and that failure now installs the failure router as the base does. Cargo.toml keeps the PR's description and restores the temp-env dev-dependency the PR removed, because the base's main.rs and native_geo.rs tests use it; Cargo.lock stays the base's. Tests: the startup test for a missing secret keeps the PR's diagnostic, the path `ec.passphrase` and its no-reference-key check, and asserts them on the failure router instead of an exit before listening. The failure-router helpers in the startup and native acceptance tests return the log and use the PR's secret check, which also covers the short passphrase fixture. The native acceptance missing-secret loop keeps the PR's path and key checks on the failure router. The PR's valid legacy inputs, Linux self-connection probe, version assertion, no-secret-in-log checks and assertion messages stay; the version assertion's message now names the liveness probe, which no longer runs the middleware. The integration fixture keeps the PR's output tail on both failure paths and polls /ready as the base does. Scripts: smoke-axum.sh keeps the base's probe flow and cases and expects the PR's path-named missing-secret diagnostics with a 503. The PR's checks that no reference key and no present secret path is logged run for every negative case. The provider acceptance script keeps the PR's captured startup causes and Docker environment, and the base's /ready wait and authenticated snapshot observation. Docs: AGENTS.md keeps both new gates, renumbered. The adapter tables keep the base's probe columns with the PR's production startup status. The PR's Axum guide, production startup guide and getting-started text say that a store the selected provider cannot prepare stops the process before it listens, while a missing or invalid config value or secret leaves only the probes answering, with /ready and every route at 503. The production startup guide keeps the base's protected CloudFront Geo statement next to the PR's record-store note.
Brings #1635, which now carries the identity integration chain (dhruv8sh's spine with the core identity app, the protected native Geo from #1532, the identity conformance suite from #1613, the certificate-check statement from #1616, the health and startup-failure contract from #1617 applied to the native production runner, and the creative-proxy identity disclosure policy from #1615), into the after-response task drain on SIGTERM. Docs: the production startup guide keeps the base's boundary, where a store the selected provider cannot prepare stops the process before it listens and a missing or invalid config value or secret leaves only the probes answering, and adds the PR's shared shutdown grace for in-flight requests and registered after-response tasks, its whole-task identity budget and its A2/A8 activation note. Tests: the PR's Axum after-response fixtures build GeoInfo with the base's optional city, continent, coordinates and metro code. The values are unchanged. Code merges without conflict: the PR's Axum fallback scheduling, its shared core runner and its Fastly post-delivery changes compile on the base's identity app, conformance hook and failure router. Cargo.lock is the base's plus the PR's trusted-server-identity-providers dev-dependency edge for the Axum crate.
Brings #1635, which now carries the identity integration chain (dhruv8sh's spine with the core identity app, the protected native Geo from #1532, the identity conformance suite from #1613, the certificate-check statement from #1616, the health and startup-failure contract from #1617 applied to the native production runner, and the creative-proxy identity disclosure policy from #1615), into the serving runtime environment guard. The merge has no textual conflict, but the PR's guard rejected three process-environment reads the protected native Geo added in the Axum native_geo.rs: the TS boot profile path, read twice with var_os, and EdgeZero's Geo provider setting. Each read now sits in a one-line private helper with a scoped clippy::disallowed_methods allowance and a reason comment, marked as a stopgap pending review. The reads, their names, the var_os handling of a non-Unicode path and kv_selected's short-circuit order are unchanged, and runtime_env!'s allowlist is untouched. The guard still rejects any other unsuppressed read in that file. AGENTS.md: the PR's guard gate follows the base's production health and startup contract gate as item 20, in the same list. Cargo.lock is the base's.
Brings #1532's rename of the native Geo profile variable to TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE and #1617's bash 3.2 fix for the smoke credentials expansion into the serving runtime environment guard, and replaces this PR's earlier stopgap for the protected native Geo reads. Axum native Geo: the profile path and EdgeZero's Geo provider override are read through runtime_env!, so the stopgap helpers and their scoped clippy::disallowed_methods allowances go. An absent profile still defers to EdgeZero, and a profile path that is not Unicode now reports the profile's Unavailable error instead of being read. kv_selected still declares the Geo KV store only when no profile is set and EdgeZero's override selects kv. runtime_env!: one justified allowlist entry for EDGEZERO__ADAPTER__GEO__PROVIDER, EdgeZero's own native Geo provider override, read only to decide whether the app declares the Geo KV store, because EdgeZero exposes no API for that selection. The macro's docs and the AGENTS.md gate name it beside the Fastly metadata exceptions. Tests: the guard fixtures accept the new name through the checked macro and still reject other EDGEZERO__ names. A native Geo unit test pins the non-Unicode profile path as Unavailable. Cargo.lock is the base's.
Brings #1635, which now carries the identity integration chain (dhruv8sh's spine with the core identity app, the protected native Geo from #1532, the identity conformance suite from #1613, the certificate-check statement from #1616, the health and startup-failure contract from #1617 applied to the native production runner, and the creative-proxy identity disclosure policy from #1615), into the adapter store inventory. Fastly app: the PR's per-request generic KV store helper stays next to the base's publisher_fallback_methods, which the startup failure responses share. Adapter READMEs: each keeps the PR's store statements (Axum's unavailable generic KV with no adapter-local store, Cloudflare's per-request TRUSTED_SERVER_KV binding and missing request-time config store, Spin's default label and opt-in trusted_server_kv label) and the base's sentence that /health, /ready and startup failures follow the operational probe contract. The PR's statements that Cloudflare has no /health route and that a Spin startup failure answers /health with 503 go, because the base serves the probes. API reference: the dispositions paragraph keeps the PR's Cloudflare discovery and verification note and the base's failure-router wording, without the PR's "exits with status 1" disposition and Axum exit, which the base's contract replaced. Spin guide: the PR's runtime boundaries for the default label, encoded signing keys and the opt-in KV label stay, followed by the PR's integration CI note and the base's health and startup smoke note in place of the PR's manual smoke sentence. Cloudflare guide: the smoke instructions keep the base's Wrangler pin, so the PR's note that the stack has no pin goes. Cargo.lock is the base's.
Brings in, through #1636 (cf1102c): - dhruv8sh's spine on #1489: #1639 (738ba34), #1640 (46530d8), #1612 (36e35f8), #1628 (384a481) and #1623 (6fd236e). - #1531 (47411de) and #1532 (4d17086, which renames the native Geo profile variable to TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE). - #1613 (2415b7d), then #1616 (c142e87), #1617 (b91770e) and #1615 (255c390), restacked on #1613. - #1635 (06b4044), restacked on #1615, and #1636 (cf1102c). Each conflict was resolved in the PR that sits higher. This merge is clean.
|
For the identity integration branch (#1608), this PR now sits on #1615 instead of #1531, so it carries #1532 and the #1616, #1617 and #1615 line. I changed the base to
|
Bring in the current Axum production serving head (06b4044), including the #1142 health and startup-failure contract and #1615's proxy identity disclosure policy. Record-store binding and unsupported EC storage now run inside prepare_native, so they install the failure router instead of exiting; EdgeZero provider preparation still fails before listen. Axum keeps enabled identity providers, and the first-party proxy reads its EC through the shared identity app.
Since #1635 merged in the #1142 health contract, an invalid config envelope or a missing secret keeps the process listening with the failure router: /health answers 200, /ready and every route 503 with the fixed body. Assert that contract, each case's own diagnostic and that initialization fails before the listener is ready, instead of an exit before listen. Update the native container guide and the workflow step name to match.
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. The merge had no conflicts. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. docs/guide/native-rc-demo.md conflicted only because this PR rewrites the passage that named the EdgeZero pin. The merge keeps this PR's text. docs/guide/architecture.md conflicts in the Axum limitations table: #1617's 6d174a8 rewraps the table and replaces its Startup failure row with the failure router and the failures that still exit before listening, while this PR names the column Axum and describes config and secret-store writes against read-only startup snapshots. The merge keeps this PR's header and Config/secret-store row with #1617's Startup failure row.
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. They arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623, #1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646, with #1646's move of the request time into IdentityApp::finalize. It also brings d5276ee, which publishes the native AWS runtime files without GNU mv -T, and Christian's merge 5597d3e of #1538 into #1540, through #1566's merge. The base now also carries the Axum serving line (#1613, #1616, #1617, #1615, #1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which decodes the Spin discovery document with Response::json, and #1627's merge of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI. This PR already carries #1646's head 461aa0d, so the merge adds only #1646's new merge 166944769 of #1642 and the chain below it, including the identity conformance check that now strips the mirrored UID's exp. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. Restacking on the Axum serving line conflicts in the Axum startup tests, where #1617 waits for /ready, since liveness stays up after a caught initialization failure, and this PR rewrites the wait to retry a port collision and to require the child's own ready lifecycle event. Axum startup tests: wait_ready keeps this PR's collision retry and lifecycle check, then probes #1617's /ready and returns the /health response once the child is ready. The fixture drains each child's output through this PR's log readers, so #1617's assert_serves_failure_router reaps the stopped child and reads those captured logs instead of collecting the pipes, which the readers already own. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. This PR now stacks on #1661 instead of #1646, so rc/identity can take both as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661 (refusing EC creation when a trusted JA4 contradicts the User-Agent). Fastly identity conformance fixture: #1661 records each scenario's runtime TLS JA4 through a RuntimeTlsJa4 middleware in place of derived device signals, takes the User-Agent from the scenario and drops the browser flag. This PR adds geo consent requests with their own trusted client IP settings and no browser device signals. The merge assembles the conformance app with #1661's middleware and keeps this PR's geo_configured flag and producer_settings. It sends the scenario's User-Agent unless the API request supplies one, and inserts the scenario's JA4 only for requests without a geo consent exchange, because this PR derived device signals only for those. The base now also carries #1627's 4d0c1a2, which renames the generic runtime KV store to trusted_server_runtime_kv, #1488's a610152 and 9104fd3, which add hashed-email intake for the LiveRamp and ID5 identity providers, #1646's aa31559, which gates identity writes for rejected clients, and #1626's d07f789, which withholds a mirrored UID while another source owner is opted out. Fastly conformance JA4: the rebuilt #1661 merge supplies a trusted Python JA4 behind the Chrome User-Agent for #1646's known non-browser API requests, and this PR inserts the scenario's JA4 only without a geo consent exchange, with its producer_settings. The merge keeps both: a known non-browser request gets the Python JA4, any other request the scenario's JA4 unless it is a geo consent exchange. This PR's head moves to e8015ca, its clean merge of #1646's aa31559, which the base already carries, so it adds no change beyond the base. Axum lib.rs: the base now carries #1636, through #1626's merge of it, whose after_response_drain_tests module sits where this PR adds its geo_conformance module. The crate keeps both test modules.
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. They arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623, #1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646, with #1646's move of the request time into IdentityApp::finalize. It also brings d5276ee, which publishes the native AWS runtime files without GNU mv -T, and Christian's merge 5597d3e of #1538 into #1540, through #1566's merge. The base now also carries the Axum serving line (#1613, #1616, #1617, #1615, #1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which decodes the Spin discovery document with Response::json, and #1627's merge of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI. The merge also brings the 12 #1646 commits this PR lacked, from 48a43ae to 461aa0d: dhruv8sh's page-phase lookup and /auction EID work (48a43ae, 82fe088, 1d0a74f, 838586e and his chain merges a061c01, ecf16e8, e1d23a0, edcf4c5 and 9a020e1), the merge 9cad928 of #1641 into #1642, and prk-Jr's "Merge providers-awaited into shared identity" (4ffbaf8) and "Restore Fastly auction browser gating" (461aa0d). Edge cookies guide: a conflict is the request lifecycle paragraph. The merge takes #1646's sentences on positive identity cookies, core expiries and /auction body EIDs, and keeps this PR's closing sentences on the default ec.sliding_refresh = false flow and sliding renewal. Fastly adapter tests: 82fe088 from #1646 removed the navigation-lookups thread-local and the page-lookups argument of apply_edgezero_ec_finalize, since the handler now collects page lookups onto the EC context. This PR's sliding_ec_renews_held_publisher_identity_before_terminal_privacy test drops its two take_navigation_lookups calls and passes no page lookups to finalize. Its configuration has no record store or providers, so no lookups were collected before either, and its assertions are unchanged. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. This PR now stacks on #1661 instead of #1646, so rc/identity can take both as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661 (refusing EC creation when a trusted JA4 contradicts the User-Agent). Cloudflare route tests: both PRs add a test at the end of the file. The merge keeps both, this PR's sliding_ec_configuration_preserves_unsupported_platform_responses and #1661's ec_route_creates_no_record_whatever_the_bot_management_ja4. Fastly sliding EC test: #1617, which now sits below this PR, answers GET /health through the router's probe hook as an operational response, which carries no EC state. This PR's sliding_ec_renews_held_publisher_identity_before_terminal_privacy routes /health through the router and expected EC state on every path but the unsupported EC route, so it now also accepts the liveness probe without EC state. Its check that /health issues no renewal cookie is unchanged. The base now also carries #1627's 4d0c1a2, which renames the generic runtime KV store to trusted_server_runtime_kv, #1488's a610152 and 9104fd3, which add hashed-email intake for the LiveRamp and ID5 identity providers, #1646's aa31559, which gates identity writes for rejected clients, and #1626's d07f789, which withholds a mirrored UID while another source owner is opted out. Settings: this PR's MaxAgeDays and #1488's HashedEmailSource are both added before Ec in settings.rs; the merge keeps both. This PR's head moves to fbe5670, its merge of #1646's aa31559, which models admitted clients in the core sliding tests, finalizes them with the store gate and adds refused_client_gets_no_renewal_or_record_io, and adds the proposal's review log. Taken as the change from the old head 668d501, the new head would replay #1646 commits the base already carries in rebuilt form. The merge takes only fbe5670's own resolution, the change from a plain merge of 668d501 and aa31559 to fbe5670: the sliding tests and the proposal apply cleanly, and its Fastly sliding test port is the one this merge already made.
…1622 into rc/identity #1622 (244ca26) now carries the whole chain, each PR merging the one below it: - #1506 (c197404) repins EdgeZero to rc/identity at d063a8e7, which carries EdgeZero main's Fastly SDK 0.13.3 upgrade through every EdgeZero PR here, and merges Trusted Server main's upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. - #1614, #1525, #1526, #1487 and #1488 take it in turn. #1488 also adds b2d4bfd, which records known UID hashes with a setter. - #1489, the identity spine (#1639, #1640, #1612, #1628 and #1623), #1531 and #1532. - The Axum serving line: #1613, #1616, #1617, #1615, #1635, #1637 and #1627, chained, with #1627's b958107 decoding the Spin discovery document with Response::json and #1627's merge of #1625, which brings #1625's Wrangler pin into the chain. - The held line on #1627: #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646. #1646 keeps its own shared after-response runner in ec::app::lookups. - #1636 (72096cd) on #1646 (b5a5f62), draining Axum after-response identity tasks on SIGTERM through #1646's shared runner. - The EC route line on #1636: #1626 (067531e), which merges #1636, the draft #1656, #1661, #1662 and #1622, and through #1622's merge of it, #1620's round-6 head. Each conflict was resolved in the PR that sits higher. This merge is clean. Since the last update the chain also takes #1488's hashed-email intake (a610152 and 9104fd3) and its POST, body and header options for the status call (f063a76), #1627's split of the generic runtime KV store into trusted_server_runtime_kv (4d0c1a2), #1646's gate on identity writes for rejected clients (aa31559) its native container test of the failure router (4f4c036) and that test's header check on an ordinary route (71a573a), #1626's withholding of a mirrored UID while another source owner is opted out (d07f789), and #1617's description of the Axum startup failure router (6d174a8) and of the startup failures that still exit before listening (4c07cad). #1636 no longer sits in the Axum serving line; it arrives through #1626, which merges it on top of #1646. Its new head adopts #1646's after-response runner in place of the one rc/identity took with cf1102c. Cloudflare guide: #1627's merge of #1625 now keeps both #1625's tool version clause and #1627's TRUSTED_SERVER_RUNTIME_KV binding in the smoke paragraph, and fixes #1625's smoke script test for #1617's Python floor and Worker build, and #1537's merge fixes its ts stub for #1537's storage template step, so this merge needs no resolution.
|
For the identity integration branch (#1608), I pushed
|
Takes #1615's new head b0b84af, which carries #1506's repin of EdgeZero to rc/identity at 459bd27d (42e0c46): PR 275 at 0e2a58ae, the stack's test fixes and EdgeZero 536's bounded record update, RecordHandle::update. `docs/guide/native-rc-demo.md` conflicts only where this PR's own edits sit next to the EdgeZero pin text; the merge keeps this PR's text with the new pin.
|
For the identity integration branch (#1608), I pushed |
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR finishes the Axum production startup work:
- Missing-secret errors: the startup error now names the config field path of the missing secret. It never names the reference key or the value.
- Store write errors: the two read-only snapshot error helpers are merged into one.
- Visibility:
NativeStoreSnapshotis narrowed topub(crate). - DataDome: when the checked
RequestInfofails, the payload now leaves outHostandProtocol. It no longer falls back to the raw header or the URI. - Tests: the startup and acceptance tests are stronger. The before-listen probe ignores a socket connected to itself, the legacy env inputs are now valid values, and the no-secrets-in-logs checks also run after successful runs.
- Integration tests: the Axum test environment keeps the last 40 output lines and attaches them when startup fails.
- Provider acceptance script: it starts via
import.meta.main, adds--dns, passesDOCKER_HOSTthrough, and checks the output of failed launches. A CI job runs its unit tests. - Docs: rewritten to describe Axum as a production entry point.
There are no blocking problems, only three small non-blocking points below. Nothing in the PR looks like an attempt to manipulate the reviewer.
Cross-cutting / body-level findings
- 🤔 The secret check can miss output after 64 KiB:
launch()keeps only the first 64 KiB of a failed launch's output. The no-secret check would not catch a secret printed after that point. This is fine for short startup failures. - 🏕 The plan doesn't match the diff on
temp-env: the plan and spec say the unusedtemp-envdev-dependency is removed, but the diff doesn't change the dependencies in the Axum crate'sCargo.toml. Either remove it or correct the docs. - 🌱
wait_for_readinesscould hang: it joins the reader threads after the child exits. That would block if a grandchild process kept the pipes open. This is unlikely with the current binary.
CI Status
- integration tests: PASS
- integration tests (Fastly EC lifecycle): PASS
- cargo test (cross-adapter parity): PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- vitest: PASS
- ts dev lint domains (changed lines): PASS
- HTML EOF runtime (Fastly): PASS
- cargo test (axum native): PASS
- cargo test: PASS
- browser integration tests: PASS
- trace runtime and browser acceptance: PASS
- cargo fmt: PASS
- release scripts: PASS
- format-typescript: PASS
- CI Node pin guard: PASS
- format-docs: PASS
- Native provider acceptance script: PASS
- CLAUDE.md symlink guard: PASS
- prepare integration artifacts: PASS
- health-startup (spin): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- health-startup (cloudflare): PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- Fastly response diff script: PASS
- health-startup (axum): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- docs-proposal scripts: PASS
- worker-deadlines (cloudflare): PASS
- health-startup (fastly): PASS
- worker-deadlines (spin): PASS
Takes #1615's new head 06f9264, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes EdgeZero 522 (portable Fastly record providers) and 524 (outbound mTLS client identities). `docs/guide/native-rc-demo.md` conflicts only where this PR's own edits sit next to the EdgeZero pin text; the merge keeps this PR's text with the new pin.
|
For the identity integration branch (#1608), I pushed Takes #1615's new head 06f9264, 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).
|
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Approved. I reviewed this PR's changes against #1615 at 06f926484. The Axum startup checks and provider helper tests passed. The inline findings are non-blocking. I did not verify the full Docker provider run or live DataDome behavior.
|
|
||
| ## Run locally | ||
|
|
||
| From the repository root, with `ts` built from this checkout: |
There was a problem hiding this comment.
P2 · R1: Use a disposable checkout for this example
The new recipe overwrites an existing trusted-server.toml and republishes the starter config to the default local store without prompting. Git ignores both destinations, so it cannot restore the old inputs. Please require a disposable checkout or use separate input paths.
| From the repository root, with `ts` built from this checkout: | |
| From the root of a fresh or disposable checkout, with `ts` built from that checkout: |
| stream.setEncoding('utf8') | ||
| stream.on('data', (chunk) => { | ||
| if (output.text.length < maxCapturedOutput) | ||
| output.text = (output.text + chunk).slice(0, maxCapturedOutput) |
There was a problem hiding this comment.
P2 · R2: Don't pass the log check on partial output
If the expected cause is in the retained prefix and a fixture secret appears after the cap, outputHolds returns success. Mixing stdout and stderr can also interrupt a match across chunks. Could we check the streams separately and fail on overflow, or scan each incrementally with bounded overlap? Keep capture and checking together in the rejection helper and keep raw output private.
| // explicit DOCKER_HOST endpoint is the only daemon selection passed through. | ||
| export function dockerEnvironment(work, env = process.env) { | ||
| const docker = { PATH: env.PATH, HOME: work } | ||
| if (env.DOCKER_HOST) docker.DOCKER_HOST = env.DOCKER_HOST |
There was a problem hiding this comment.
P2 · R3: Reject Docker endpoints the local fixture can't use
An inherited remote DOCKER_HOST is forwarded before any topology check. That can pull images or start containers on another host, but the bind source and the 127.0.0.1 endpoints are local to this script. Could we keep support for alternate local sockets and fail early for unsupported remote daemons?
|
|
||
| | Requirement | State on #1531 | This change | | ||
| | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | AX-1 missing secret exits non-zero before the port opens | `missing_secret_fails_before_listen_without_legacy_fallback`; runs in CI | The missing-secret diagnostic names the config path of the missing secret; the before-listen probe stops counting a Linux self-connection as a listener | |
There was a problem hiding this comment.
P2 · R4: Document both startup failure states
The AX-1 and preservation rows describe the older before-bind requirement and cite a missing-secret test that no longer exists. On #1615, provider preparation failure exits before bind; a missing secret in a prepared store leaves GET/HEAD /health at 200, and /ready and supported ordinary routes at 503. Please update the design and guide summaries to match the existing probe contract. The design should also name #1615 as the direct base and link to the current EdgeZero pin, 1619078a, rather than certifying the historical pin.
| .filter(|request| request.path == "/action") | ||
| .count(), | ||
| 3, | ||
| "should forward no /action request beyond the three complete ones" |
There was a problem hiding this comment.
P3 · R5: Count complete bodies, not all arrivals
tests/fixtures/native/origin.rs adds to received only after the body read succeeds. This assertion can pass if a fourth request arrives but its body read fails. I'd narrow the test and spec to the complete requests the fixture observes, unless no fourth arrival is an explicit requirement. In that case, count arrivals before reading the body.
| "should forward no /action request beyond the three complete ones" | |
| "should record only the three complete /action requests" |
| `TRUSTED_SERVER__*` variables are applied by `ts config push` when it builds | ||
| the envelope; the running server does not read them. The older | ||
| `TRUSTED_SERVER_CONFIG_*` and `TRUSTED_SERVER_SECRET_*` variables are ignored. |
There was a problem hiding this comment.
P3 · R7: Distinguish config overlays from the Geo boot setting
Axum does read TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE before provider preparation. Please limit the claim to app-config overlays and qualify the nearby Geo limitation: Geo is off by default, with opt-in request-scoped CloudFront support.
| `TRUSTED_SERVER__*` variables are applied by `ts config push` when it builds | |
| the envelope; the running server does not read them. The older | |
| `TRUSTED_SERVER_CONFIG_*` and `TRUSTED_SERVER_SECRET_*` variables are ignored. | |
| `ts config push` applies `TRUSTED_SERVER__*` app-config overlays when it builds | |
| the envelope. Axum does not apply those overlays at runtime. It does read the | |
| separate [native Geo boot setting](/guide/native-rc-demo#optional-protected-native-geo). | |
| The older `TRUSTED_SERVER_CONFIG_*` and `TRUSTED_SERVER_SECRET_*` variables are ignored. |
| let listener_reachable = | ||
| TcpStream::connect_timeout(&self.addr, Duration::from_millis(20)).is_ok_and( | ||
| |stream| { | ||
| stream.local_addr().expect("should read probe source") |
There was a problem hiding this comment.
Nit · R8: Reuse the tested self-connection predicate
This copies connected_to_listener from tests/native_acceptance.rs, where there are controls for real and self-connections. A small shared test helper would keep both probes on the implementation those controls exercise.
| } | ||
|
|
||
| fn assert_failed_before_listen(&mut self, expected: &str) { | ||
| fn assert_failed_before_listen(&mut self, expected: &str) -> String { |
There was a problem hiding this comment.
Nit · R9: Keep the before-listen helpers returning ()
No caller uses the new log return value here or from Running::rejected in tests/native_acceptance.rs. The failure-router helpers are the ones with callers that need the log.
| } | ||
|
|
||
| /// Stops a running server and checks its whole output for secret values. | ||
| fn assert_logs_hold_no_secrets(&mut self) { |
There was a problem hiding this comment.
Nit · R10: Name the fixture shutdown
Both assert_logs_hold_no_secrets helpers kill and reap the server before checking its logs. Could we call them stop_and_assert_no_secret_logs so a caller knows not to make another HTTP assertion afterward?
| /// [`secret_reference_paths`]. | ||
| /// | ||
| /// # Errors | ||
| /// Returns a configuration error for malformed secret paths or references. |
There was a problem hiding this comment.
Nit · R11: Include examples for the new public APIs
AGENTS.md:278 requires # Examples for public functions. Please show how to obtain the paths without printing the reference keys here and in secret_reference_paths.
| /// Returns a configuration error for malformed secret paths or references. | |
| /// Returns a configuration error for malformed secret paths or references. | |
| /// | |
| /// # Examples | |
| /// | |
| /// ``` | |
| /// use trusted_server_core::config_payload::VerifiedConfigBlob; | |
| /// | |
| /// fn check_missing_field(blob: &VerifiedConfigBlob) { | |
| /// if let Ok(references) = blob.required_secret_references() { | |
| /// if let Some(paths) = references.get("fixture_key") { | |
| /// for path in paths { | |
| /// log::warn!("publish the secret for `{path}`"); | |
| /// } | |
| /// } | |
| /// } | |
| /// } | |
| /// ``` |
Summary
docs/1233-proxy-disclosure-policy); review the diff against that base. Extract native prepared startup on the demo baseline #1531, lower in the same chain (Extract native prepared startup on the demo baseline #1531 → Extract the protected CloudFront Geo baseline #1532 → Add shared identity conformance fixtures and Fastly coverage #1613 → Say certificate checks cover every outbound HTTPS request #1616 → Standardize health and startup-failure responses across adapters #1617 → Restrict creative proxy identity disclosure #1615), carries Cut Trusted Server over to EdgeZero PR 275 #1506's head through the identity chain and pins EdgeZerorc/identityat9d02d7b3(no RC tag, no cutover of its own), so the rebase and repin parts of the issue are done there. This PR does the rest of A1 and answers the Extract native prepared startup on the demo baseline #1531 review threads that still apply.ec.passphrase), never the reference key or the value. A key is an operator-supplied string, so a secret pasted into a reference field would otherwise be logged. The startup and acceptance tests are tightened: legacy names are poisoned with valid values, the before-listen probe ignores self-connections, and logs are checked for secret values after successful runs too.Trial merges at the current heads conflict with sibling #1622 and #1626 (files include Axum startup, app and tests, Fastly
app.rs/main.rs, Spinapp.rsand Axum docs). #1617's newest commit6d174a883is not yet merged up the chain and conflicts with this branch indocs/guide/architecture.md. Individual PR checks do not qualify the combined tree.Changes
crates/trusted-server-adapter-axum/src/startup.rsNativeStoreSnapshotispub(crate).read_only_config/read_only_secretmerged intoread_only_snapshot(see note below)crates/trusted-server-adapter-axum/src/app.rscrates/trusted-server-adapter-axum/Cargo.tomlcrates/trusted-server-adapter-axum/tests/startup.rsrequired snapshot missingwith every legacy name poisoned by a valid envelope; distinctive short passphrase; secret-in-logs check after successful runs; rename to..._while_running;reserve_portcomments; should-messagescrates/trusted-server-adapter-axum/tests/native_acceptance.rs/actionrequests; distinctive short passphrase and success-path log checks;reserve_portcomments; should-messagescrates/trusted-server-core/src/secret_resolution.rs,crates/trusted-server-core/src/config_payload.rssecret_reference_paths/required_secret_references: each required key with the config paths that reference it, for diagnostics. Unit testcrates/trusted-server-core/src/integrations/datadome/protection.rsHost/Protocolinstead of falling back to the raw header or URI target. New red/green testcrates/trusted-server-integration-tests/tests/environments/axum.rsscripts/test-native-providers.mjsimport.meta.main(works through a symlink);agent: false; self-connect guard; failure launches capture output in memory and assert the cause and absence of secret values without printing;--dns 127.0.0.1;DOCKER_HOSTpass-throughscripts/tests/test-native-providers.test.mjsscripts/smoke-axum.sh.github/workflows/format.yml,AGENTS.mdnode --test 'scripts/tests/*.test.mjs'; gate list entrydocs/guide/getting-started.mdts config push --adapter axum --local,EDGEZERO__ADAPTER__CONFIG_DIRandEDGEZERO__SECRETS__*; legacy env table removeddocs/guide/native-rc-demo.md,docs/guide/axum-dev.md,docs/guide/api-reference.md,docs/guide/architecture.md,crates/trusted-server-adapter-axum/README.md,docs/.vitepress/config.mtsdocs/superpowers/specs/2026-11-19-axum-production-serving-design.md,docs/superpowers/plans/2026-11-19-axum-production-serving.mdAcceptance status (#1573)
ec_kv). The pinned EdgeZero (rc/identity9d02d7b3) already has the record operations for Axum (record_insert,record_exists_strong, partitioned listing; DynamoDB and celld providers), so no EdgeZero work is needed. Remaining Trusted Server work: #1587 (T6, one record backend over EdgeZeroKvStore), then #1574 (A2, enable it on Axum), then #1579 (A8, CI test against DynamoDB Local). The SIGTERM drain of after-response work is A3 (#1575, PR #1636). Maintainers: please narrow this checklist item in #1573scripts/test-native-providers.mjspasses locally against moto and the AppConfig agent (Docker). CI runs only its helper unit testsTS_*,TRUSTED_SERVER_CONFIG_*,TRUSTED_SERVER_SECRET_*TS_GIT_VERSIONis a build-time constantTRUSTED_SERVER__overridests config push, never read at runtime. The CI guard is A9 (#1580)rc/identity9d02d7b3#1531 review threads
import.meta.main(thread 11); missing-config test asserts the exact diagnostic and poisons every legacy name with valid values (thread 12); truncated-POST test asserts exactly three/actionrequests (thread 20); native guide rewritten for operators, sidebar entry, run-locally block (thread 23);agent: false(thread 27); DataDome omitsHost/Protocolwhen checked request info fails, on all adapters, instead of reporting the unchecked rawHostor request target (thread 32; the thread offered rejecting or omitting, and omitting keeps the protection request);reserve_portcomments (thread 33); getting-started quickstart rewritten (it previously failed; D-2); CI job for the provider helper tests and AGENTS.md gate entry (A-7); distinctive short passphrase and secret-in-logs checks after successful runs (A-10); failure launches assert the cause without printing output (A-12);--dns 127.0.0.1andDOCKER_HOSTpass-through (A-13;DOCKER_CONTEXTis intentionally not passed becauseHOMEis isolated); rename to..._while_running(A-14);NativeStoreSnapshotispub(crate)(A-18); should-messages on touched assertions (A-21); integration environment attaches a bounded output tail on pre-readiness exit (A-23); missing-secret diagnostics name the secret's config path, asserted per secret in Rust tests andsmoke-axum.sh, with no reference key printed (derived from thread 8; naming the key itself could print a secret pasted into a reference field).temp-env(A-9). The chain restored it, and thenative_geo.rsandmain.rstests use it.discovery_route_status_parityrequires Axum to match. Native startup already rejectsrequest_signing.enabled.send_async, eager dispatch, budget tests, proxy marker) is gone and outbound goes through EdgeZero'sHttpClient; Spinstartup.rsand the Fastlydelivery_tests.rsare gone; oversized bodies map to 413 in core; the EdgeZero pin is arev, not a tag; SIGTERM drain is already covered byproduction_sigterm_drains_the_admitted_publisher_response.rustls,ctutils) are present on the stack base (A-26).Note:
read_only_config/read_only_secretwere merged intoread_only_snapshotbecause CodeQL flagged the old helper name as a cleartext-logging source on #1528 (rust/cleartext-logging, rotation rollback log). CodeQL only runs on PRs tomain, so this PR cannot show the alert gone.Self-review
An independent review of the implementation found no blocking issues. Its three optional findings are fixed in
6949eea86: name config paths instead of reference keys in the missing-secret error, update the Axum section of the architecture guide, and attach the output tail on the integration readiness deadline.Closes
Part of #1573. Not
Closes: #1531 carries most of A1, and the pending-record-write item needs the shared record backend (#1587), Axum record storage (A2, #1574) and its CI test (A8, #1579). The SIGTERM drain of after-response work is A3 (#1575, PR #1636).Spec
Spec: docs/superpowers/specs/2026-11-19-axum-production-serving-design.md (ends with a three-round review log)
Test plan
Historical results (execution head unrecorded) (before self-review fix
6949eea86): the following local gates and runtime observations are retained as reported historical evidence; their execution SHA and private receipts are not recoverable. Current hosted CI is separate (31 checks pass on head06b40446e).cargo test-fastly && cargo test-axum(alsotest-fastly-reusewith Viceroy 0.21.0,test-cloudflare,test-spin)cargo clippy-fastly && cargo clippy-axum(alsoclippy-cloudflare,clippy-cloudflare-wasm,clippy-spin-native,clippy-spin-wasm,clippy-cli,clippy-codegen, and thetemplate_build_digestclippy)cargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest runcd crates/trusted-server-js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute servetemplate_build_digesttestnative_acceptancetests; integration-tests clippy;node --test 'scripts/tests/*.test.mjs'(7 pass);./scripts/smoke-axum.shscripts/test-native-providers.mjsagainst a release binary with both AWS features, moto and the AppConfig agent; every PASS line, including the selected config and secret failures before listenChecklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)