feat: enforce team membership validation for cloudtty access - #1075
Open
CasLubbers wants to merge 1 commit into
Open
feat: enforce team membership validation for cloudtty access#1075CasLubbers wants to merge 1 commit into
CasLubbers wants to merge 1 commit into
Conversation
CasLubbers
requested review from
dennisvankekem and
ferruhcihan
as code owners
August 27, 2026 11:55
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens CloudTTY access control by ensuring users can only open/delete a cloud shell for teams they belong to, and aligns the CloudTTY OpenAPI ACL to avoid cross-team access for team admins.
Changes:
- Enforce team membership checks in
OtomiStack.connectCloudtty()andOtomiStack.deleteCloudtty()for non-platform-admin users. - Update
CloudttyOpenAPI ACL soteamAdminactions are team-scoped (create/read/update/deletevs*-any). - Add authz tests to ensure team admins cannot connect/delete CloudTTY for another team.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/otomi-stack.ts | Adds explicit membership enforcement before connecting/deleting CloudTTY for non-platform admins. |
| src/openapi/cloudtty.yaml | Makes teamAdmin permissions team-scoped to prevent cross-team access via *-any. |
| src/api-v2.authz.test.ts | Expands authz coverage for team-admin CloudTTY access restrictions. |
Suppressed comments (1)
src/api-v2.authz.test.ts:1864
- Team-admin DELETE /v2/cloudtty is only tested for the cross-team 403 case. Add a positive test for deleting cloudtty for the admin’s own team to ensure the new membership validation doesn’t block legitimate deletes.
await agent
.delete('/v2/cloudtty')
.query({ teamId: 'team2' })
.set('Authorization', `Bearer ${teamAdminToken}`)
.expect(403)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
1839
to
1840
| }) | ||
| }) |
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.
No description provided.