feat(gateway)!: require explicit consumer authorization - #48
Merged
Conversation
tangletools
approved these changes
Sep 8, 2026
tangletools
left a comment
There was a problem hiding this comment.
Reviewed the authorization contract and final malformed-result fix at this commit. Missing policies reject construction; only an explicit boolean allow=true reaches request claims and sandbox execution. Verified the new missing-policy and malformed-result tests, retained explicit denial diagnostics, and checked the updated examples. Requested strict result checking and documentation indentation; both are addressed. CI passed on Node 22 and 24, and the recorded focused/full suite has 463 passing tests. No blocking findings in this scope. This prevents omitted authorization; it does not itself prove isolation of a host that explicitly permits public consumers.
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.
A gateway without authorizeConsumer previously treated successful payment authentication as permission to execute the agent. Require an explicit host authorization callback and reject construction when it is missing or invalid. Every request now runs that policy before claims or sandbox access; only the boolean decision
allow: truepermits execution. Malformed decisions fail closed with 403 and a stable error code.This is the 0.9.0 breaking configuration contract. Workspace hosts retain their existing membership and thread policies. Public services must explicitly allow consumers and keep private resources out of their execution environment. Published-only discovery remains unchanged. No new audience framework or x402 configuration is introduced.
Validation: all 463 tests pass, with typecheck and build on the pinned Node 24.18.0. Four missing/invalid callback regressions failed before the constructor guard; six malformed decision regressions failed before strict boolean authorization. Both now pass and assert zero request claims, sandbox calls and usage records. Existing payment, workspace-owner, deny-before-reserve and A2A tests remain green. Public protocol fixtures now declare their intentional allow policy. Independent review findings were fixed; CI verifies Node 24.18.0 and 22.13.0 before merge.