Repository navigation
fix(delegation): proof doors take a list of public origins; rust_decimal drops rkyv - #474
Merged
Merged
Conversation
…rst) Scaffold and tests for CLAUDE.md invariant 138. The delegation door, the agent-token door and the MCP broker's proof door take a list of public origins; a proof is accepted when its htu is one of them at the route's path. The product code keeps today's behaviour in this commit: the single origin is the only one used, and the list stubs (origin::normalize_origin, origin::expected_url, origin::parse_origin_list, chainproof::origins_from_values) return what the single-origin code returned. The tests name the behaviour the fix must reach and fail on the assertions, not on compilation. Red on this commit (run by CI, not locally): a proof addressed to a second configured origin is refused; the first origin spelled with its default port is refused; a fragment in the htu is admitted; a list with a trailing comma, a path or user information is accepted at startup. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
A gateway reached at more than one address (a public name and an internal one) now accepts a delegation or broker proof addressed to any configured origin at the route's path (CLAUDE.md invariant 141). - TOKENFUSE_DELEGATION_ORIGINS and TOKENFUSE_MCP_PROOF_ORIGINS take a comma-separated list, read beside the single-origin variables. Each entry is normalised as wardryx's normalizeOrigin does and must be scheme://host[:port] with nothing after the port; a bad entry or an empty list refuses to start, naming its variable. - dpop::origin::expected_url chooses the configured origin the proof names, reading the htu before the signature. The verifier then checks the signature over that same claim, so nothing can change it after the choice. Never a Host header. - dpop::verify_proof refuses a fragment in the htu (RFC 9449 section 4.3). This changes every door, not only the new list. - The delegation door, the agent-token door and the MCP broker's proof door use the same rule. The Proving struct carries origins: Vec<String>. Release notes under docs/releases/UNRELEASED.md, invariant 141 in CLAUDE.md, the README paragraph and the docs/25 table row. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
RUSTSEC-2026-0235 (rkyv 0.7.46, patched only in 0.8.17) reached crates/cluster/Cargo.lock through openraft, byte-unit and rust_decimal 1.42.1, which requires rkyv ^0.7.46 behind an optional feature. rust_decimal 1.43.0 drops that dependency, and byte-unit's requirement (^1.15) admits it. The bump is lockfile-only: `cargo update -p rust_decimal --precise 1.43.0` in crates/cluster removes rkyv, rkyv_derive and the crates only rkyv used, also adds rand 0.9.5 with rand_chacha and rand_core 0.9, which rust_decimal 1.43.0 names as an optional dependency in the manifests. The root Cargo.lock never contained rkyv. The ignore entry in .cargo/audit.toml now matches nothing. Its comment says so, and its removal is left for a follow-up, because the teeth cases that edit the entry must be re-pointed first and CI has not run them against the new config. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Four test names were used both in mcp_door and in delegation_origins. Renamed the mcp_door ones with the door's name; no assertion changed. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… new tests Clippy with -D warnings refused the test module's `use base64::Engine as _`, which the module-level import already brings in through `use super::*`, so the lib test target did not compile and the stated-numbers baseline in the teeth shards read red on a clean tree (UNJUDGEABLE, CI run 39315890343). The badge and PROGRESS.md now count the 23 tests this branch adds: 6 in dpop::origin, 1 in gateway::chainproof, 16 in tests/it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… so under Upgrade Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Wave 3 (2026-10-19), T3. Measured on a stack-single 1.3.1 box: an agent on the agents network calling http://tokenfuse-gateway:4100 is refused 401 because the door checks htu against one configured origin, while the same token from the host is admitted.
This draft starts at the red-first commit 18e7f93 so CI shows the new tests red; the fix follows. CI is the first compile of this branch; pushed by the supervisor after a clean secretscan diff.
🤖 Generated with Claude Code