Repository navigation
Retain provider-local HTTP opt-in in the demo baseline - #1533
ChristianPavilonis wants to merge 171 commits into
Conversation
prk-Jr
left a comment
There was a problem hiding this comment.
Summary
The provider-local allow_insecure_http opt-in is correct and well covered: the flag gates only the http scheme, does not leak to other providers or schemes, is omitted from serialized output when false, and the scheme flows through to the backend spec so an opted-in endpoint is actually sent as plain HTTP. One blocking item: the current-head hosted check cargo test (axum native) fails from an inherited test fixture that this PR describes as corrected but which was corrected only in a sibling file.
1 of the inline comments below carries a one-click GitHub
suggestion. The blocking finding is body-level because its file is outside this PR's diff.
Blocking
🔧 wrench
startup.rsstill has the self-connection listener probe — see Cross-cutting below.
Non-blocking
⛏ nitpick
unwrap()in the new serialization test — see inline atcrates/trusted-server-core/src/auction/plan.rs:1186
Cross-cutting / body-level findings
- 🔧
startup.rsstill has the self-connection listener probe.crates/trusted-server-adapter-axum/tests/startup.rs:116(assert_failed_before_listen) treats any successfulTcpStream::connect_timeoutas "the server is listening". On Linux a connect can succeed with no listener when the ephemeral source port equals the target port. The PR description says this was corrected; the correction in70a894547addedconnected_to_listener(local address != peer address) tonative_acceptance.rsonly, andstartup.rskept the bareis_err()probe. At this head the Linux runner hit the case:missing_config_fails_before_listen_without_legacy_fallbackpanicked atstartup.rs:115("should not listen while required startup inputs are invalid"). The base branch passed with identical fixture content, so this is intermittent and inherited rather than introduced by the HTTP change. Minimal correction: apply the same local-vs-peer exclusion inassert_failed_before_listen(theconnected_to_listenerhelper fromnative_acceptance.rs). The file entered in the native unit and was last touched by the geo unit, so the fix belongs there and merges upward through the stack. Not a suggestion because the file is outside this diff. - 📝 Configuration guide now contradicts the new field.
docs/guide/configuration.md:2090still says all provider endpoints must be absolute HTTPS URLs, and the provider-field table at:2153has noallow_insecure_httprow, whileauction-orchestration.mddocuments the opt-in. Optional consistency fix. - 📝 Rollback note, no action needed.
ProviderConfighasdeny_unknown_fields, so a config blob withallow_insecure_httpset is rejected by any binary that predates this change; a demo config using it cannot roll back the binary alone. Default configs are unaffected because the field is omitted when false.
Verification notes
- Focused
auction::plansuite at head: 32 pass (host triple, native). - Mutation controls on the new guard: accepting
httpwithout the flag failsinsecure_http_requires_an_explicit_per_provider_opt_in; letting the flag accept any scheme failsinsecure_http_opt_in_does_not_allow_credentials_fragments_or_other_schemes. startupfixture on macOS: 3/3 pass (the Linux self-connection does not reproduce there).- The inline suggestion was applied in a scratch tree:
cargo fmt --check,cargo clippy -p trusted-server-core --lib --tests -D warnings, and the three focused tests pass.
CI Status
- cargo test (axum native): FAIL
- CLAUDE.md symlink guard: PASS
- browser integration tests: PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo check/build/test (spin native + wasm32-wasip2): PASS
- cargo fmt: PASS
- cargo test: PASS
- cargo test (cross-adapter parity): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- docs-proposal scripts: PASS
- format-docs: PASS
- format-typescript: PASS
- integration tests: PASS
- integration tests (Fastly EC lifecycle): PASS
- prepare integration artifacts: PASS
- vitest: PASS
Preserve the existing literal-loopback HTTP exception, explicit non-loopback provider opt-in, default-false wire shape and credential/fragment/scheme rejection. Retain the existing HTTP feature head and the direct EdgeZero cutover.
aram356
left a comment
There was a problem hiding this comment.
Summary
The scoping in canonicalize_endpoint is right: one provider's flag doesn't leak to another, and credentials, fragments and other schemes stay rejected. I confirmed it end to end at this head on Axum and on Fastly (Viceroy). What's missing is around the change. Operators get no signal that a provider is sending in plaintext, two transport mutants survive the whole core suite, and the CHANGELOG and four other docs still say HTTPS-only. The production code is the same as #1525, so these match my #1525 r1 findings, re-checked against this base.
4 of the inline comments below carry a one-click GitHub
suggestion. Use Commit suggestion (or Add suggestion to batch for several at once) to apply them as commits on the PR branch. The other inline comments describe the fix in prose because it touches lines outside the diff or another file.
Blocking
🔧 wrench
- Nothing tells the operator a provider is running in plaintext: see inline at
crates/trusted-server-core/src/auction/plan.rs:326 - Tests don't check how an opted-in provider is dialed, or that HTTPS isn't downgraded: see inline at
crates/trusted-server-core/src/auction/plan.rs:1163 - Configuration reference, CHANGELOG and three other docs still say HTTPS-only: see body-level below
prepare integration artifactsfailed, so integration and browser jobs never ran: see body-level below
Non-blocking
♻️ refactor / ⛏ nitpick
- Field doc comment: summary/details split and rollback rationale: see inline at
crates/trusted-server-core/src/auction/plan.rs:139 - Guide table understates plaintext exposure: see inline at
docs/guide/auction-orchestration.md:771 is_falseduplicatessettings::is_false: see inline atcrates/trusted-server-core/src/auction/plan.rs:611- Scheme error message says HTTPS for opted-in providers: see inline at
crates/trusted-server-core/src/auction/plan.rs:585
Cross-cutting / body-level findings
-
🔧 Configuration reference, CHANGELOG and three other docs still say HTTPS-only. The PR updates only
docs/guide/auction-orchestration.md. This extends prk-Jr's 📝 onconfiguration.md: operators configuring providers read every one of these, and two of them give the wrong fix for the exact error an opted-in setup hits.-
CHANGELOG.md:15: the Unreleased config-first entry says "Provider endpoints must be absolute HTTPS URLs." Amend it to "... unless the provider setsallow_insecure_http", and add an### Addedentry with the rollback ordering.ProviderConfigdenies unknown fields, and the base branch's ownts config validate(built at0ae96ef5f) rejects an opted-in config withunknown field `allow_insecure_http` … in `auction.providers.pbs-main`, while the same config without the flag passes:- Added per-provider `allow_insecure_http` (default `false`) under `[auction.providers.<id>]`, which lets an explicitly approved demo or test provider use a plain `http://` endpoint. Other providers still require HTTPS, and credentials, fragments and other schemes remain rejected. Requests to an opted-in provider carry client IP, User-Agent, geo, consent signals and identifiers in cleartext, and its responses can be altered in transit. Upgrading: binaries that predate the field reject a blob that sets it, so upgrade the binary first, then push the config. Rollback: remove the flag, push the default-compatible blob, then roll back.
-
docs/guide/configuration.md:2149-2157: the provider-field table has noallow_insecure_httprow, and itsendpointrow says "Absolute HTTPS URL with host and no credentials or fragment". Proposed rows (thennpm run format:writeindocs/):| `endpoint` | Yes | None | Absolute HTTPS URL with host and no credentials or fragment; plain HTTP only with `allow_insecure_http` | | `allow_insecure_http` | No | `false` | Accept a plain `http://` endpoint for this provider only; approved demo/test endpoints only |
-
docs/guide/configuration.md:2089-2090: "All provider endpoints must be absolute HTTPS URLs." Suggest: "All provider endpoints must be absolute HTTPS URLs, except a provider that setsallow_insecure_httpfor an approved demo or test endpoint." -
crates/trusted-server-core/src/auction/README.md:151: same sentence. Suggest: "Provider endpoints must be absolute HTTPS URLs unless the provider setsallow_insecure_httpfor an approved demo or test endpoint." -
docs/guide/error-reference.md:92-93: the solution for this error. Add: "Plain HTTP is accepted only when that provider setsallow_insecure_http = true, for an approved demo or test endpoint." -
docs/guide/integrations/aps.md:132: "The common providerendpoint... must be an absolute HTTPS URL". The flag applies toapsproviders too, so add the same exception or say the flag is for demo/test providers only.
-
-
🔧
prepare integration artifactsfailed at this head, so the integration and browser jobs never ran. The job built every artifact, thenactions/upload-artifactgot an HTML page back fromCreateArtifacton all 5 attempts (job log). That is a GitHub artifact-service failure, not a code failure, but it skippedintegration tests,integration tests (Fastly EC lifecycle)andbrowser integration tests, which the description lists as still required before readiness. Re-run the workflow. Separately,cargo test (axum native)passes at6501eede7, so thestartup.rsself-connection flake prk-Jr flagged at1cfba70a2didn't recur this run; it is still intermittent until that fixture gets the same local-vs-peer exclusion. -
📌 The CLI drops core warnings.
trusted-server-clidepends onlog(Cargo.toml:27) but installs no logger on this base either, so anything core logs duringts config validate/ts config pushis discarded, including the warning proposed atplan.rs:326. I raised the same point on #1525 and no issue exists yet. Worth a follow-up issue: either install a stderr logger atwarn, or return warnings from validation. -
🤔 The flag accepts any host, including public ones, so plaintext auction traffic can cross the internet. No in-repo example in the stack (#1534 to #1541) sets the flag, so the demo's PBS host isn't visible from here. If demos only need a local or private-network PBS, restricting
httpto loopback or private addresses would bound the exposure without losing that use case. If the demo PBS is public, the docs warning should say so explicitly. -
📝 PR description.
Head:still says1cfba70a2; the head is6501eede7after two EdgeZero-tag merges (tracker #1530 has the same stale value). Several identifiers have lost their separating space ("EdgeZero83d7a629", "PR1525/1526 ready and1527/1528 draft", "Nativeb1216763a", "UID/GID10001"). Most of the description covers base-branch corrections (docs build, startup probe, browser CI host) that are not in this PR's diff. A plain summary of the behavior change, the default, and the rollback note would serve reviewers better. -
📝 Keep this PR and #1525 in sync.
plan.rshere carries the same production change as #1525 (main), but the tests diverge: #1525 already has assertion messages andexpect()where this PR has bare asserts andunwrap(). The #1525 r1 findings (warning, transport tests, docs, CHANGELOG) apply here unchanged. Whichever fixes land on one should land on the other, or the two copies drift.
Verification
- Real binaries at
6501eede7:ts config validate --strictrejects anhttp://provider without the flag and accepts it with the flag, silently;ts config pushkeeps"allow_insecure_http":truein the blob. A livePOST /auctionon Axum and on Fastly (Viceroy) reached a plaintext stub bidder and returned its bid. Fastly registered a non-TLS dynamic backend (backend_http_127_0_0_1_…_p_pbs-main_…). The base branch'sts(at0ae96ef5f) rejects the same config withunknown field allow_insecure_http. - Mutation testing: 9 mutants of
plan.rsagainst the fulltrusted-server-corelib suite (3005 tests). 7 killed, 2 survived (see inline atplan.rs:1163). With that suggestion applied, both are killed by their named assertions. - Each suggestion verified alone (fmt,
clippy-fastly, core lib tests, or prettier and domain lint for the guide), and all four together through every adapter clippy and test alias plus the parity suite, with no drift between the approved and verified patches. One Axum test,managed_ingress_ignores_direct_spoof_and_isolates_two_gateway_clients, can't run on macOS (it binds127.0.0.2, whichlo0doesn't carry) and fails identically at the unmodified head; hostedcargo test (axum native)covers it on Linux.ts dev lint domains --changed-vson this PR's lines: clean.
CI Status
- browser integration tests: SKIPPED
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo check/build/test (spin native + wasm32-wasip2): PASS
- cargo fmt: PASS
- cargo test: PASS
- cargo test (axum native): PASS
- cargo test (cross-adapter parity): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- CLAUDE.md symlink guard: PASS
- docs-proposal scripts: PASS
- format-docs: PASS
- format-typescript: PASS
- integration tests: SKIPPED
- integration tests (Fastly EC lifecycle): SKIPPED
- prepare integration artifacts: FAIL
- vitest: PASS
Nothing reads or writes `trusted_server_runtime_kv`, yet every Fastly service had to provision and pay for it. Remove its declaration, the Fastly, Spin and Cloudflare adapter wiring, `KvHandleStore`, the KV fixtures and the documentation, so `RuntimeServices::kv_store()` is unavailable on every adapter. `trusted_server_kv` stays declared as on the base, and a Fastly test pins that generic KV never falls through to the request registry's default store.
…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. The merge was clean and applies exactly the removal. Checks on this head: no reference to the removed store remains and |
|
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 #1532's new head ( Checks on this head: no conflict markers; |
Summary
Draft baseline review unit. Not a current-main merge candidate, deployment approval or completed current-head CI claim.
Baseline and sequence
Head:
1cfba70a2efecda9ff522187c69359eda1fa6692. Base:baseline/protected-geo-20261110.Historical main anchor:
2dd968aeebeb2cc0d5110115f64e0ad58e2e1d13. Original demo: TS2423a2ed plus separately preserved dirty inputs. Matching EdgeZero: draft431, exact revision83d7a6296d285e135c4ea70021b19e6c8dca7e9f.The user selected compatible-baseline cleanup. Current-main integration with EdgeZero462 and the authenticated-forwarder incompatibility are deferred. Preserve current-main PR1525/1526 ready and1527/1528 draft, with their existing bases. No excluded1499 or independent1506 implementation, relay/privacy experiment, new transport fallback, group/codec/phase design or operational deployment is included.
Changes
Closes
Refs #1530. This unit completes one part of the baseline extraction and does not close the overall tracker on its own.
Spec
Not a new feature. This is extraction of existing demo behavior and bounded build/caller corrections. Original native and EC storage design/review records remain in the baseline where applicable; they are not presented as approval of later combined source. No new forwarding, consent, timer or provider policy is designed here.
Test plan
Focused auction-plan tests and strict Core lint pass. Fixture uses pbs.example.com, without changing opt-in assertions. Current-main PR1525 remains separate and ready; its hosted results are not relabeled as this baseline head's results.
The b67ffc6 baseline checkpoint has passing documented local gates: Fastly/default/reuse/native/Cloudflare/Spin suites, all adapter strict lint lanes, 17 cross-adapter parity cases, 1252 JS cases, CLI suites, formatting, clock/digest/proposal checks and changed-lines domain lint. Passing checks at121ebcc36 are reused only for unchanged relevant inputs; the final follow-up covers the CLI test-import and documentation-only corrections. These results are not a substitute for this PR's current-head hosted checks.
Checklist
Operational Terraform remains in trusted-server-deployer. Local checks and prototype tests do not qualify cloud access, fleet durability or a live publisher.
Hosted docs-build correction
The first hosted format-docs job caught an additional site-build gate that the original local formatter checkpoint had not run: a relative link from the native EC guide to a Terraform example outside the site. Native EC correction8b11dbad3 replaces it with the plain repository path; no dead-link check is disabled. That docs-only correction is carried through the existing upper PR identities. Native EC and final integration8985b111 both pass docs ESLint and VitePress build; the final docs formatter also passes. Runtime, dependency, image-build-context and test inputs are unchanged from b67ffc6, so their prior exact-input proofs are reused. Hosted current-head checks still control readiness.
Startup negative-probe correction
A hosted native EC case failed the no-listener probe while its child logged the expected startup validation failure. The old log has no socket endpoints, so the failure's exact subtype is not claimed confirmed. A separate controlled Linux reproduction demonstrates a successful TCP self-connection with no listening server. Native correction8490c691d distinguishes equal local/peer endpoints from a real listener; actual socket controls prove the self-connection is excluded and a real listener is still detected. Nonzero exit, expected diagnostic, secret-redaction and the original startup deadline remain required. This changes only the acceptance fixture, not production admission, transport or trust.
The earliest native unit and final9356c557 default/all-feature acceptance checks and strict lint pass, including both controls and the original failure case. Ignores remain explicit; earlier separately executed celld proof is not relabeled as a new ignored-case run. Correction is merged upward through existing PR identities without force-pushing or retargeting. Current-head hosted checks must pass; the old failure is retained rather than rerun-only waived. Runtime/API/dependency inputs remain unchanged. A fresh exact9356 producer build and real runtime smoke now pass: image
sha256:65a735d38e9dbc0573d0f6068a8b261bd202c43aea05085c2b2d6bccc91ebdbd, linux/amd64 UID/GID10001, including startup rejection and in-flight SIGTERM drain. Prior b67 image receipts remain separate; no image was pushed. All local parent runners are complete.Browser CI host compatibility
Preserved older browser failures show Playwright1.58.2 rejecting ubuntu-latest's new Ubuntu26.04 image before browser installation; later missing-executable failures are consequences, not passing browser tests. Nativeb1216763a pins only the browser job to ubuntu-24.04, leaving dependency versions, tests and assertions unchanged. Direct Actionlint1.7.12 passes at the owning native and final integration points; the first shim-only attempt could not run because no global version was configured, and is not counted as lint proof. No global tooling was changed. The only9356 ->ee7 delta is this workflow host/comment; runtime, Cargo, docs, tests and Docker-context inputs are unchanged. Actual browser execution on the supported hosted runner remains pending and must pass before readiness. No waiver or browser skip.
Reconciliation refresh above the new PR 1506 head
Merge-forward head
0de7e14346b589c1177eb8fd05f18e5c716e934aretains original public82d9a0e66e00727c56572d707d92aed5be66fe58, previous local candidate3c2c0a022f712b8f51c6360f5f165ba9e59904fband updated parent9075b4b391c84bc5954d7b8a92f810251d2657be. The original feature patch is unchanged. Aram's #1516 code/tests/spec are preserved upstream rather than duplicated as another owned production port. The existing PR identity, feature boundary and readiness remain intact.Fresh shared-root and combined RC qualification passes on the refreshed source. Reused JS/Chrome/storage/wrapper/Terraform evidence is explicitly fingerprinted, not claimed as a new execution. Source-image proof is bound to refreshed #1539, not a new RC release. Fresh hosted/macOS, digest-backed wrapper/RC images, other external browser/framework lanes and live AWS/publisher/CMP acceptance remain unverified. Ignored/unexecuted cases and original failed receipts are not counted as passes. Historical claims above remain bound to their named old inputs. No tag, registry publication or deployment is included.
Published snapshot; newer upstream integration pending
Published deliberately for review from the qualified #1506 checkpoint
57d7c6ad8db43601ef31c1e1d1615e6dd2aa6a6a. At publication the moving author branch was at628474ec4a8cee8361a6927ae6b79b68fdd33a55. Newer upstream bounded-response handling, per-profile RTB caps and Sourcepoint changes are not incorporated or qualified in this snapshot. Further merge-forward reconciliation and conflict resolution may be needed before merge. Local results above describe this exact qualified source, not a merge with the newer base or a release.