Repository navigation
Scope deployment log streams to the caller's org - #414
Merged
Merged
Conversation
Signed-off-by: Priyanshu-u07 <connect.priyanshu8271@gmail.com>
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.
Any logged-in user could read another org's deployment logs.
/deployment/wsstreamed 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}/streamandGET /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.