Skip to content

feat(gateway)!: require explicit consumer authorization - #48

Merged
drewstone merged 2 commits into
mainfrom
fix/require-consumer-authorization
Sep 8, 2026
Merged

feat(gateway)!: require explicit consumer authorization#48
drewstone merged 2 commits into
mainfrom
fix/require-consumer-authorization

Conversation

@drewstone

@drewstone drewstone commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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: true permits 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.

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@drewstone
drewstone merged commit b07fb17 into main Sep 8, 2026
3 checks passed
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