Repository navigation
fix: enforce target policies for search-mode invocations - #311
Merged
Merged
Conversation
joshrotenberg
marked this pull request as ready for review
October 19, 2026 02:44
This was referenced Oct 19, 2026
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.
Closes #271.
Search-mode
proxy/call_toolpreviously dispatched straight to the raw backend proxy, dropping caller extensions and skipping authorization and argument transforms. It now rewrites the original request before the ordinary invocation stack: the public target receives the same bearer/JWT policy, filters, aliases, validation, cache, overrides, and injection as a direct call. Request identity, cancellation context, progress, continuation, and task fields remain intact; recursive and management targets are rejected. Raw admin-tool registration refuses the wrapper rather than providing a bypass.Composite calls now require the caller's permission for both the composite and each public target. Targets use the same policy stack before caches and backend dispatch; permitted members may still run when another is denied, and the aggregate reports an error. Nested composites remain unsupported. README, API docs, and architecture instructions document these rules.
Validation: all six AGENTS.md checks passed (strict fmt/Clippy/rustdoc, 323 unit tests, 140 integration tests including real Redis, and 24 doctests). Configured HTTP/session regressions cover signed JWT roles, scoped bearer tokens, denied targets receiving zero backend calls, warm-cache denial, custom separators, alias/argument parity on cache misses and hits, and size limits. Context tests cover continuation/cancellation preservation and invalid/recursive targets. The no-default all-target build and discovery-only HTTP regression also pass. JWT tests use a documented public test-only RSA fixture; the new dev dependency was already present in the lockfile through tower-mcp.
Manual review of the pushed diff at
f3bc0b77c93ab208776a8b682d734cce025a6a9ecompleted with no remaining findings. Git dependency pins are unchanged. Releases remain held.