Repository navigation
Pin the HMAC boundary and WASI 0.9 together - #17
Open
codeitlikemiley wants to merge 20 commits into
Open
codeitlikemiley wants to merge 20 commits into
codeitlikemiley wants to merge 20 commits into
Conversation
The guest had no HMAC acceptor, so a portable middleware context or a client-supplied x-wasi-auth-* header could be confused with the signed ingress envelope. Accept only the HMAC envelope, strip credentials and reserved identity headers before the guest, and refuse a second CORS or security-header policy on the same response. Co-authored-by: Uriah Galang <[email protected]>
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]>
Debug of SessionId printed the raw identifier, so any Debug of a containing session leaked it into logs. Display and as_str still return the identifier for storage and the signed envelope. The host-probe test seals a now-relative envelope only when SPIN_ENVELOPE_OUT is set. Co-authored-by: Uriah Galang <[email protected]>
accept_signed_trusted_context now consumes each HMAC signature once in the guest process. The codec still only checks freshness, audience, method, path, and request ID. A second instance that shares the key can accept the same envelope until that window ends. Co-authored-by: Uriah Galang <[email protected]>
Combines the signed-context branch with the canonical middleware and wasip3 0.9 pin. spin_grpc keeps the security notes and uses spawn_local. Co-authored-by: Uriah Galang <[email protected]>
Parallel tests share the process-local seen-set. A later fixture clock pruned an entry another test still needed, so the second presentation looked accepted. The tests now take one lock for the consume sequence. Co-authored-by: Uriah Galang <[email protected]>
Co-authored-by: Uriah Galang <[email protected]>
This was referenced Oct 24, 2026
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]>
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]>
…ation-5bda Co-authored-by: Uriah Galang <[email protected]>
Regenerate the ingress CycloneDX document after merging the advisory bumps so bytes, http-body, and http-body-util remain dependencies. Co-authored-by: Uriah Galang <[email protected]>
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]>
…ation-5bda 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]>
…ation-5bda 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]>
…ation-5bda Co-authored-by: Uriah Galang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem / repro
PR 15 has the HMAC trusted-context boundary and still locks
wasip3 0.7.0. PR 16 lockswasip3 0.9.0+wasi-0.3.0and does not contain that boundary.leptos_wasiandddd-cqrs-esneed one revision that has both.Implementation
Merge of the HMAC replay rejection onto the WASI 0.9 branch, then the CI fixes and the middleware pin from PR 16.
crates/wasi-auth/src/http.rsmatches the security branch.spin_grpc.rskeepswasip3::wit_bindgen::spawn_local. The middleware commits do not change those files.accept_signed_trusted_contextrecords the HMAC in a process-local set afteropensucceeds. A second presentation in that process fails closed withtrusted-context envelope was already accepted. The MAC still binds audience, method, path, and request ID.opendoes not consume the envelope.Residual risk: another guest process that shares the key has its own set and can accept the captured envelope until the freshness window ends (default 5s, maximum 30s). Ingress strips client
x-wasi-auth-*headers, including a correctly signed client envelope.The four middleware git pins are
3df96c21a7906b885e67229e9a7c8c01b6497109, the head of middleware PR 1.policy-corewrites baseline security and CORS response fields only when absent.wit-bindgen0.62.0 andwasip30.9.0 stay.artifacts/SHA256SUMSuses the ubuntu-24.04 HTTP PEP digest from run 40141593944, which matches PR 16.Nothing was tagged or published. Crate version is still
0.1.0-rc.5.CI
This branch merges the updated PR 16, which includes PR 18. rustls is
=0.23.46.crypto-bigint0.5.5 remains, so the audit jobs stay red. No ignore was added.jsonwebtoken11.1.0 andpasskey-auth0.1.3 still requirep2560.13, andaws-lc-rsdoes not compile forwasm32-wasip2.The HTTP PEP, Cedar PDP, and SpiceDB PDP allowlists accept the Rust 1.99 libstd WASI 0.2.12 imports (stdin, stdout, the five
wasi:cli/terminal-*interfaces,wasi:io/[email protected], andwasi:clocks/[email protected]). Filesystem, sockets, and key-value stay forbidden.Fuzz uses dated
nightly-2026-09-01.cargo-semver-checksis 0.51.0. The ingress SBOM keepsbytes,http-body, andhttp-body-util.Downstream pin
4fcf631c556e4db26a20e916381e7f3385b66b06Dependent PRs
mainfirst.spawn_localand the security edits inspin_grpc.rs.main. Do not publish an rc.6 tag from here.