Skip to content

restrict agent tool proxy requests to own device only#890

Open
MorganaFuture wants to merge 2 commits into
flamingo-stack:mainfrom
MorganaFuture:MorganaFuture/fix/agent-device-ownership-check
Open

restrict agent tool proxy requests to own device only#890
MorganaFuture wants to merge 2 commits into
flamingo-stack:mainfrom
MorganaFuture:MorganaFuture/fix/agent-device-ownership-check

Conversation

@MorganaFuture

@MorganaFuture MorganaFuture commented Apr 29, 2026

Copy link
Copy Markdown

Description

Agents with a valid JWT could proxy requests to any device by specifying an arbitrary agentId in the path. Fixed by validating JWT machine_id against tool_connections before forwarding returns 403 on mismatch.

Improvements

  • Added AgentDeviceAccessValidator - checks JWT machine_id against the tool_connections owner
  • RestProxyService rejects unauthorized device requests with 403 before hitting upstream
  • Covered with unit tests

MorganaFuture and others added 2 commits April 29, 2026 16:21
agents with a valid JWT could request data for any device by specifying
an arbitrary agentId in the path. added ownership check via tool_connections
before proxying — returns 403 if the jwt machine_id doesn't match.
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.

1 participant