Skip to content

Pin canonical middleware and WASI 0.9 - #16

Open
codeitlikemiley wants to merge 9 commits into
mainfrom
gol/dep-stabilization-5bda
Open

codeitlikemiley wants to merge 9 commits into
mainfrom
gol/dep-stabilization-5bda

Conversation

@codeitlikemiley

@codeitlikemiley codeitlikemiley commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Problem / repro

legacy/wasi-http-middleware pinned wit-bindgen =0.59.0 while the parent pinned wasip3 =0.7.0 and wit-bindgen =0.57.1. Spin SDK a02d330 is not an ancestor of SDK 7. wasip3 0.9 exposes spawn_local where this crate called spawn.

This branch does not contain the HMAC replay rejection. That is PR 15. The combined pin is PR 17 at 4fcf631c556e4db26a20e916381e7f3385b66b06.

Upstream status

  • Canonical middleware 3df96c21a7906b885e67229e9a7c8c01b6497109, the head of middleware PR 1. v0.2.0-alpha.4 is not published. Crate version stays 0.2.0-alpha.3.
  • The four git pins (wasi-http-metadata, wasi-http-policy-core, wasi-http-middleware-component-support, wasi-http-authn) all use that revision. It is two commits after 896f8f5. policy-core now writes baseline X-Content-Type-Options / Referrer-Policy and CORS fields only when that name is absent. Metadata, authn, and component-support sources are unchanged between the two revisions; they move so the four pins stay on one commit.
  • Spin SDK 3cf30012b50a1afb750dac3d28aa6da4a32c3468, version 7.0.0 (spin-rust-sdk PR 1).
  • wasip3 =0.9.0+wasi-0.3.0, wit-bindgen =0.62.0, Wasmtime 50.0.0, Rust 1.99.0, server_fn =0.8.13.

Implementation

Delete legacy/wasi-http-middleware and the middleware release workflow. Git-depend on 3df96c21 for metadata, policy-core, component-support, and wasi-http-authn (dev-dependency of wasi-authz-http only). spawn becomes spawn_local. HTTP PEP repeats the workspace lints with unsafe_code = "deny" because wit-bindgen 0.62 emits unsafe glue. Handwritten PEP code stays forbid(unsafe_code).

cargo +1.99.0 check --locked --target wasm32-wasip2 succeeded for the HTTP PEP, Cedar PDP, and SpiceDB PDP components against that revision.

CI

Merges PR 18. wasip3 stays 0.9.0+wasi-0.3.0 and wit-bindgen stays 0.62.0. cargo audit still fails on RUSTSEC-2026-0387 (crypto-bigint 0.5.5). No ignore was added. There is still no published jsonwebtoken or passkey-auth release on p256 0.14, and aws-lc-rs does not compile for wasm32-wasip2.

HTTP PEP imports

Rust 1.99's wasm32-wasip2 libstd links WASI 0.2.12. An empty fn main() {} command component built with rustc 1.99.0 imports stdin, stdout, stderr, environment, exit, the five wasi:cli/terminal-* interfaces, wasi:clocks/monotonic-clock, wasi:io/error, wasi:io/streams, and wasi:io/poll, all at 0.2.12. The component sources do not call stdio. Those imports are on the HTTP PEP, Cedar PDP, and SpiceDB PDP because they link the same libstd. Filesystem, sockets, and key-value stay forbidden.

artifacts/SHA256SUMS records the ubuntu-24.04 rebuild after this pin (run 40141577342). Only the HTTP PEP digest changed, to 0689bf28ee54f87748b1ab3062d0d3b612867b308340379e212b06ffbc09eeb6. Cedar and SpiceDB stayed on the previous digests. SBOM and WIT already matched. PR 17's rebuild produced the same three lines.

Fuzz and API inventory

Fuzz toolchain is nightly-2026-09-01, rustc 1.100.0-nightly (0dfb098f3 2026-08-31). cargo-semver-checks is 0.51.0, which reads rustdoc JSON v61. The inventory script requires exit 100 plus the same known diagnostics.

Tests / evidence

Tip is 63b49a61dae5a00d20614ea6bdeea68b8f24913c.

  • Cargo.lock source lines for the four middleware crates are rev=3df96c21a7906b885e67229e9a7c8c01b6497109. No other lock entry moved.
  • scripts/check-sibling-source.sh and scripts/generate-companion-manifest.sh accept that revision.
  • The three middleware SBOMs name the new git revision.

Downstream pin

The one revision with both the HMAC boundary and this middleware pin is PR 17:

4fcf631c556e4db26a20e916381e7f3385b66b06

Nothing was tagged or published.

Dependent PRs

Open in Web Open in Cursor 

Replace the vendored middleware copy with a git dependency on
codeitlikemiley/wasi-http-middleware at 896f8f5. The crate version
stays 0.2.0-alpha.3 until v0.2.0-alpha.4 is published. Move the
workspace to Rust 1.99.0, wasip3 0.9.0+wasi-0.3.0, wit-bindgen
0.62.0, server_fn 0.8.13, and spin-sdk 7.0.0 at 3cf3001.
Production crates do not link those middleware packages.

Co-authored-by: Uriah Galang <[email protected]>
cursoragent and others added 5 commits October 24, 2026 21:24
Move the exact rustls pin to 0.23.46 and cargo-update rustls-webpki
0.103.16, webpki-roots 1.0.11, quinn-proto 0.11.19, ctutils 0.4.5, and
tokio 1.54.1. Refresh the SBOMs those crates appear in.

crypto-bigint stays at 0.5.5. The advisory is fixed only in 0.7.6, and
jsonwebtoken 10/11 plus passkey-auth 0.1.3 still require the
elliptic-curve 0.13 stack.

Co-authored-by: Uriah Galang <[email protected]>
Rust 1.99 libstd on wasm32-wasip2 links WASI 0.2.12 and adds stdin,
stdout, terminal, poll, and monotonic-clock imports. An empty program
imports the same set, and the HTTP PEP sources do not touch stdio.
Record that surface for the PEP, Cedar PDP, and SpiceDB PDP.

Pin the fuzz toolchain to nightly-2026-09-01 (rustc 1.100.0-nightly)
and cargo-semver-checks to 0.51.0, which reads rustdoc JSON v61.

Co-authored-by: Uriah Galang <[email protected]>
The checked-in component SBOMs still described wasip3 0.7. Regenerating
them records wasip3 0.9.0, wit-bindgen 0.62.0, and the patched rustls,
tokio, quinn-proto, ctutils, and webpki-roots versions.

Co-authored-by: Uriah Galang <[email protected]>
Version 0.51 reports a semver finding as exit 100 and a tool error as
exit 101. The inventory gate still requires the known contract and
testkit diagnostics and rejects any other outcome.

Co-authored-by: Uriah Galang <[email protected]>
cursoragent and others added 3 commits October 24, 2026 21:43
Final-WASI rebuilds the release components on ubuntu-24.04 and diffs
artifacts/SHA256SUMS. The previous file still named the wasip3 0.7
bytes. These three digests are the ones that job produced for the HTTP
PEP, Cedar PDP, and SpiceDB PDP.

Co-authored-by: Uriah Galang <[email protected]>
Move wasi-http-metadata, wasi-http-policy-core,
wasi-http-middleware-component-support, and wasi-http-authn from
896f8f5 to the head of middleware pull request 1. That revision
writes baseline security and CORS response fields only when they are
absent. The lockfile, companion manifest, and middleware SBOMs follow
the new revision.

Co-authored-by: Uriah Galang <[email protected]>
Ubuntu 24.04 rebuilt the release components for 3df96c21. Only the HTTP
PEP digest changed. Cedar and SpiceDB stayed on the previous digests.
SBOM and WIT dumps already matched.

Co-authored-by: Uriah Galang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants