bobbai00 opened a new pull request, #9580: URL: https://github.com/apache/texera/pull/9580
### What changes were proposed in this PR? Any user could list every user's agents and read or drive them. `GET /api/agents` returned all agents, and the other routes and the websocket found an agent by id alone. The one token check, at creation, did not verify the token. - The agent service verifies a token's HS256 signature with `AUTH_JWT_SECRET` before trusting its claims. The default is `auth.conf`'s, and the Kubernetes chart passes the value in. - Each agent records its creator. Every `/api/agents` route needs the token and the list returns the caller's agents. A route or websocket naming another user's agent answers as for an unknown id. - The frontend sends the token in the agent websocket's query, as the workflow websocket does. #9043 authenticates every agent request but lets any signed-in user reach any agent. This PR adds the owner check, and overlaps with it on verifying the token. ### Any related issues, documentation, discussions? Closes #5268 Agent ids stay sequential: a guessed id gets the same 404 as a missing one. ### How was this PR tested? New agent-service tests cover every route and the websocket with another user's token, no token, and forged tokens. Run in headless Chromium on a local stack, as two users with a real model. The second user sees none of the first user's agents or chat, and the owner's agent still builds and runs a workflow. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Fable 5.2) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
