Skip to content

fix: deny access to cloudtty according to team settings - #1094

Open
merll wants to merge 1 commit into
mainfrom
APL-2113
Open

merll wants to merge 1 commit into
mainfrom
APL-2113

Conversation

@merll

@merll merll commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Note that creating a cloud shell as a regular user is currently broken on main. Need to run Core on linode/apl-core#3695 (APL-2191) for testing until merged.

Copilot AI lite review requested due to automatic review settings September 25, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Moderate test issues must be corrected to verify the intended authorization behavior.

Review effort: Lite
Findings: None

What changed in this PR

Updates CloudTTY authorization to respect team useCloudShell settings for read and delete access.

Changes:

  • Maps CloudTTY GET/DELETE operations to useCloudShell.
  • Adds V1 and V2 authorization tests.
File Summary Findings
src/​middleware/​authz.ts Applies self-service authorization to CloudTTY operations. None noted.
src/​api.authz.test.ts Adds V1 CloudTTY authorization coverage. Two moderate findings: tests use the wrong team member token, bypassing the setting check.
src/​api-v2.authz.test.ts Adds V2 CloudTTY authorization coverage. Moderate finding: fixtures do not set the required useCloudShell flags, so denial tests may return 200.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants