Repository navigation
Allow explicit per-provider HTTP auction endpoints - #1525
ChristianPavilonis wants to merge 16 commits into
Conversation
prk-Jr
left a comment
There was a problem hiding this comment.
APPROVE — no actionable findings at cd8977cad39d8388d99f6ff3f93083ba880deb3e, reviewed against 6fbe64aa056a17d32b272d67df3dd89b21ce895f. Both revisions remained unchanged at the final check.
The HTTP exception stays local to the configured provider. HTTPS remains the default; credentials, fragments, and unsupported schemes remain rejected. Configuration loading preserves the flag, and dispatch preserves the validated scheme across all four adapters.
Evidence and limits:
- All 29 current-head hosted checks pass.
- Hosted logs confirm all 27 auction-plan tests passed, including the three new regressions.
- Local
git diff --checkpassed. - No local build or live HTTP probe was run. Large unrelated, unchanged test bodies were sampled.
CI Status
- browser integration tests: PASS
- trace runtime and browser acceptance: PASS
- integration tests: PASS
- integration tests (Fastly EC lifecycle): PASS
- cargo test: PASS (required)
- cargo test (cross-adapter parity): PASS
- vitest: PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- ts dev lint domains (changed lines): PASS
- Analyze (actions): PASS
- CodeQL: PASS
- CI Node pin guard: PASS
- CLAUDE.md symlink guard: PASS
- Analyze (javascript-typescript): PASS
- format-docs: PASS (required)
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- HTML EOF runtime (Fastly): PASS
- cargo test (axum native): PASS
- docs-proposal scripts: PASS
- Analyze (rust): PASS
- worker-deadlines (cloudflare): PASS
- format-typescript: PASS (required)
- prepare integration artifacts: PASS
- worker-deadlines (spin): PASS
- cargo fmt: PASS (required)
- cargo test (ts CLI, native) (macos-latest): PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- Analyze (javascript-typescript): PASS
- Analyze (python): PASS
aram356
left a comment
There was a problem hiding this comment.
Summary
The validation change in canonicalize_endpoint is correct and stays scoped to one provider: an opted-in provider's flag doesn't leak to others, and credentials, fragments and other schemes stay rejected. I confirmed it works end to end on Axum and on Fastly (Viceroy). What's missing is around the change. Operators get no signal that a provider is sending in plaintext, the tests don't cover the transport, and the CHANGELOG, configuration reference and spec provenance don't match the change.
5 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 remaining comments describe the fix in prose because the change touches lines outside the diff or other files.
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:1156 - Spec provenance cites commits that don't exist in this repository: see inline at
docs/superpowers/specs/2026-11-10-http-auction-provider-opt-in-design.md:7 - No CHANGELOG entry, and pushing the flag breaks rollback to older binaries: see body-level below
- Configuration reference and three other docs still say HTTPS-only: 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:786 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
-
🔧 No CHANGELOG entry, and pushing the flag breaks rollback to older binaries.
ProviderConfighas#[serde(deny_unknown_fields)], so a pushed blob withallow_insecure_http = truewon't load on any binary that predates the field. That needs the same upgrade/rollback ordering the CHANGELOG givessanitize_creatives. The Unreleased breaking config-first entry also still says "Provider endpoints must be absolute HTTPS URLs." Proposed### Addedentry:- 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.
Also amend the breaking entry's sentence to "Provider endpoints must be absolute HTTPS URLs unless the provider sets
allow_insecure_http." -
🔧 Configuration reference and three other docs still say HTTPS-only. The PR updates only
docs/guide/auction-orchestration.md. Operators configuring providers read these too:-
docs/guide/configuration.md:2444-2452: the provider-field table has noallow_insecure_httprow, and itsendpointrow says "Absolute HTTPS URL with host and no credentials or fragment". Proposed rows (then runnpm 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:2386: "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:160: 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: 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."
-
-
📌 The CLI drops core warnings.
trusted-server-clidepends onlogbut installs no logger, so anything core logs duringts config validate/ts config pushis discarded. That includes the existingpublisher.public_originHTTP warning and the warning proposed atplan.rs:326. With the realtsbinary, validate and push printed only their success lines for an opted-in HTTP provider. 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. The spec deliberately leaves allowlists out of scope. 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. Thepublic_originwarning already distinguishes loopback hosts the same way. -
📝 PR description. It has typos ("All29", "main6fbe64aa") and internal process notes (relay ancestry, retained dirty worktrees, excluded PR identities) that a reviewer can't act on. A plain summary of the behavior change, the default and the rollback note would serve readers better.
Verification
- Real binaries at
cd8977cad:ts config validaterejects anhttp://provider endpoint without the flag and accepts it with the flag, andts config pushkeeps"allow_insecure_http":truein the blob. A livePOST /auctionon Axum and on Fastly (Viceroy) reached a stub bidder over plaintext and returned its bid. Fastly registered a non-TLS dynamic backend (backend_http_127_0_0_1_…_p_pbs-main_…). - Mutation testing: 9 mutants of
plan.rsagainst the fulltrusted-server-corelib suite. 7 were killed and 2 survived (see inline atplan.rs:1156). With that suggestion applied, both are killed. - Each suggestion was verified alone (fmt,
clippy-fastly, core lib tests, prettier, domain lint) and all together through every clippy and test alias plus the parity suite.
CI Status
- Analyze (actions): PASS
- Analyze (javascript-typescript): PASS
- Analyze (javascript-typescript): PASS
- Analyze (python): PASS
- Analyze (rust): PASS
- CI Node pin guard: PASS
- CLAUDE.md symlink guard: PASS
- CodeQL: PASS
- HTML EOF runtime (Fastly): PASS
- browser integration tests: PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- cargo fmt: PASS (required)
- cargo test: PASS (required)
- 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
- docs-proposal scripts: PASS
- format-docs: PASS (required)
- format-typescript: PASS (required)
- integration tests: PASS
- integration tests (Fastly EC lifecycle): PASS
- prepare integration artifacts: PASS
- trace runtime and browser acceptance: PASS
- ts dev lint domains (changed lines): PASS
- vitest: PASS
- worker-deadlines (cloudflare): PASS
- worker-deadlines (spin): PASS
There was a problem hiding this comment.
Superseded by a follow-up review with inline comments: #1525 (review)
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
Adds a default-false, per-provider allow_insecure_http flag that lets one provider use a plain http:// endpoint while HTTPS stays the default. Credential, fragment, host and other-scheme checks still apply, and the opt-in doesn't leak to other providers. The scheme passes through backend_spec_with_transport_timeout unchanged, so dispatch works without other changes. Tests cover opt-in isolation, rejected shapes and unchanged wire shape. Approving; the items below are non-blocking.
2 of the inline comments below carry a one-click GitHub
suggestion. Use Commit suggestion (or Add suggestion to batch) to apply them.
Non-blocking
⛏ nitpick
- Endpoint errors still say HTTPS-only — see inline at
crates/trusted-server-core/src/auction/plan.rs:582(also covers:592) - Guide
endpointrow still says HTTPS — see inline atdocs/guide/auction-orchestration.md:780
👍 praise
- Wire shape kept for default providers — see inline at
crates/trusted-server-core/src/auction/plan.rs:140
Cross-cutting / body-level findings
- 🌱 Make plaintext providers visible in logs — consider a
log::warn!(once per compiled plan) naming each provider whose endpoint compiled withhttp, so a demo opt-in left in a production config is easy to spot.
CI Status
All 29 reported checks PASS (cargo fmt, cargo test, cargo test (axum native), cargo test (cross-adapter parity), cargo check (cloudflare native + wasm32-unknown-unknown), cargo check/build/test (spin native + wasm32-wasip1), cargo test (ts CLI, native) on ubuntu-latest and macos-latest, integration tests, integration tests (Fastly EC lifecycle), browser integration tests, HTML EOF runtime (Fastly), worker-deadlines (spin/cloudflare), vitest, format-typescript, format-docs, ts dev lint domains (changed lines), CodeQL, Analyze (rust/python/actions/javascript-typescript), docs-proposal scripts, CI Node pin guard, CLAUDE.md symlink guard, prepare integration artifacts, trace runtime and browser acceptance).
Per the user, every feature is built once and works on every adapter in platform order, with platform gaps sent to EdgeZero (DEC-16, SH-5). T21 moves the identity routes, EC lifecycle, providers and write-back into one router in core that each adapter mounts; A2, A10, T8, T9, T17 and T18 shrink to turning it on per adapter and passing the conformance suite, and T7, T14 and A11 fold into A2 and A10. EZI-2a adds EdgeZero's local store for Axum development and EZI-4 binds Axum's geo provider from the manifest. Restack the Axum RC units on #1506: #1531 carries A1 in place of #1528, #1533 and #1534 close as copies of #1525 and #1526, and the image and Terraform units sit directly on #1532 so A6 and A7 stop waiting on A2. Record #1566, refresh the provider stack's fixes at their current heads, and flag #1535 as unplanned.
|
CREATOR: From the server-side identity plan (#1559, |
#1614 now carries #1506's EdgeZero cutover, so #1525's per-provider HTTP opt-in meets the cutover here, resolved the way rc/identity resolved it in 30a74de: - The endpoint rule is the union: https, plain http to loopback (#1506), or any http with allow_insecure_http (#1525). - Cloudflare keeps #1506's startup_loads_multi_provider_plan; the dormant multi-provider test is dropped because the cutover loads every plan. - #1506's test ProviderConfig literals in the Fastly app and the auction orchestrator gain allow_insecure_http: false.
#1525 now carries #1506's EdgeZero cutover and #1614, so #1526's awaitable EC persistence meets them here. The resolution is the one rc/identity made in 30a74de and 4a414a0: - Fastly runs the async EC finalize from finalize_response, which EdgeZero calls after its dispatch executor returns, and drops edgezero_main. - Pull sync and batch sync keep #1506's EdgeZero send paths with #1526's awaits, and their KV-touching tests become async, including #1506's pull-sync group failure test. - The post-delivery test blocks on the now-async snapshot load. #1614's identify handler awaits #1526's async handle_identify.
|
For the identity integration chain (#1608), this PR now stacks on #1614, and through it on #1506's EdgeZero cutover.
The base is now The chain is GitHub stack 1621: #1506, #1614, #1525, #1526, with the provider stack (#1487 to #1489) to join its top once it is ported. GitHub does not let a stacked PR change its base, so stack 1542 (#1525 to #1528) was dissolved first; #1527 and #1528 stay open on their current bases. Checked locally at |
…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.
…n endpoints Source: review/http-auction-provider at 1952dec.
|
For the identity integration branch (#1608), I pushed |
|
For the identity integration branch (#1608), I pushed Takes #1614's new head fb1d91d, 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. |
Address the round-1 review of the per-provider allow_insecure_http flag: - Log a warning at plan compilation for each provider whose endpoint compiles to non-loopback plain HTTP; loopback test bidders stay quiet. - Test that an opted-in provider is targeted over http on its configured port and that an opted-in HTTPS endpoint is not downgraded. - Name allow_insecure_http in both endpoint errors, keeping the loopback wording. - Reuse settings::is_false and document the field's rollback rationale. - Add the CHANGELOG entry with upgrade and rollback order, and update the configuration reference, auction README, error reference and guide. - Replace unpublished SHAs in the spec's provenance and add the loopback row to its endpoint contract.
|
Round-1 review is addressed in 23e4bdd. The inline threads each have a reply. These points from the review bodies had no thread:
|
PR #1614's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain. crates/trusted-server-core/src/auction/mod.rs: main's #1501 moved the test APS provider map into an aps_provider_map helper, and #1525 added allow_insecure_http to that ProviderConfig literal. The resolution calls main's helper and sets allow_insecure_http to false inside it. Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
|
Round 12 identity realignment:
Main's #1501 moved the test APS provider map into Each merge message says what it carries and how any conflict was resolved. |
PR #1614's new head brings #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin. The merge is clean. Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
PR #1540's new head brings the identity chain's commits since #1667 last merged it at afc4f5d, including the EdgeZero repins up to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, main's #1501, #1525's plain HTTP opt-in for auction providers, and this round's owner commits on #1535, #1613, #1616, #1617, #1625, #1627, #1635, #1637 and #1639. Cargo.toml and crates/trusted-server-adapter-axum/Cargo.toml: #1667 pinned EdgeZero at d063a8e7, and the chain now pins rc/identity ef5cbf30, which keeps the client certificate API #1667 uses. The files merge cleanly to the chain's pin, so #1667 no longer carries its own. crates/trusted-server-core/src/auction/mod.rs: #1501 from main, which the chain carries, moved the APS provider test literal into the shared aps_provider_map helper, and #1667 added `mtls: false` to that literal. The resolution calls the helper and adds `mtls: false` to it. docs/guide/auction-orchestration.md: #1525 reworded the endpoint and allow_insecure_http rows of the provider field table, and #1667 added the mtls row below them. The resolution keeps #1525's rows followed by #1667's mtls row. docs/guide/configuration.md: #1525 added the allow_insecure_http row to the provider field table and the plain HTTP warning after the loopback exception, and #1667 added the mtls row and the note that an mtls provider needs an https endpoint. The resolution keeps #1525's table with #1667's mtls row last, and #1525's warning followed by #1667's note. docs/guide/error-reference.md: #1616's owner commit replaced "TLS is always verified" with the adapter and platform TLS policy wording, and #1667 added the outbound client identity bullet after it. The resolution keeps #1616's wording followed by #1667's bullet. crates/trusted-server-core/src/auction/plan.rs (semantic fix): #1525's 23e4bdd removed the local is_false helper from plan.rs and serializes allow_insecure_http through crate::settings::is_false, and #1667's mtls field still named the local helper. The mtls field now uses crate::settings::is_false too. crates/trusted-server-adapter-axum/tests/native_ec.rs (semantic fix): #1536's 9d41f0f added an APS ProviderConfig literal to the Axum native EC tests, and #1667 added the required mtls field to ProviderConfig. The literal now sets `mtls: false`. Cargo.lock matches #1540's new head: next to #1667's, it changes only the EdgeZero package sources (d063a8e7 to ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
|
Round 15 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 branch sits directly on #1614, so the merge takes that commit, which is #1614's new head. It was clean. Checks on this head: no conflict markers; |
|
Merged #1614's new head into this PR to carry the #1608 review fixes up the stack. This PR has no fix commits of its own. |
Summary
Adds
allow_insecure_httpto[auction.providers.<id>]. It defaults tofalse. When a provider sets it, that provider'sendpointmay use plainhttp://to any host, for an approved demo or test bidder. Nothing else changes:127.0.0.1or[::1](Cut Trusted Server over to EdgeZero PR 275 #1506). One provider's flag never applies to another.https://endpoint is not downgraded.ts config validate/ts config pushprint it to stderr.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. The flag does not restrict hosts. This is not approval for production plaintext traffic.
Compatibility
The field is omitted from the serialized config while
false, so default blobs are unchanged.ProviderConfigdenies unknown fields, so binaries that predate the field reject a blob that sets it.Stack
Base is
feat/identify-batch-sync-local-all-adapters(#1614), which carries #1506's EdgeZero cutover. The diff shows only this PR's changes. It lands after #1506 and #1614.Changes
auction/plan.rsallow_insecure_http: falsehttptarget and port, warning only for non-loopback HTTPCloses #1521.
Spec
HTTP auction opt-in design
Test plan
cargo test -p trusted-server-core --lib(3430 passed) andcargo clippy-fastlyat 23e4bddcargo fmt --check, prettier on changed docs,ts dev lint domainson changed lines