Skip to content

Scope deployment log streams to the caller's org - #414

Merged
Priyanshu-u07 merged 1 commit into
mainfrom
fix/deployment-ws-org-scope
Oct 18, 2026
Merged

Priyanshu-u07 merged 1 commit into
mainfrom
fix/deployment-ws-org-scope

Conversation

@Priyanshu-u07

Copy link
Copy Markdown
Collaborator

Any logged-in user could read another org's deployment logs.

  • /deployment/ws streamed whatever pod, namespace or job the browser's subscription named. It now takes only the deployment id from the client and rebuilds the subscription server-side, after checking that the deployment belongs to the caller's org.
  • GET /deployment/logs/{id}/stream and GET /deployment/logs/{id} returned stream details and stored logs for any deployment. Both now answer another org's deployment with the same 404 as a missing one. A deployment with no org belongs to nobody.

Tests cover each case and fail when the check is removed. Verified on a local stack: a forged subscription for a kube-system pod reached the Kubernetes adapter on main and is refused on this branch.

Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
@Priyanshu-u07
Priyanshu-u07 merged commit 5fbc64e into main Oct 18, 2026
1 check 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.

1 participant