-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[fga] prebuild access #18560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fga] prebuild access #18560
Conversation
await this.auth.checkPermissionOnWorkspace(userId, "access", workspaceId); | ||
|
||
// check access | ||
await this.getWorkspace(userId, workspaceId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it still works, but I wonder what the motivation for this change is? Feels a bit like hiding the check somewhat. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed the indirection.
Can we maybe work around this pattern? E.g., by moving the "is prebuild" check in doGetWorkspace into Authorizer, and call it here as well? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved sync: As it's only two call-sites, we go with this approach for now.
0b49b53
to
e597707
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
/unhold |
Description
Distinguishes access checks for workspaces between prebuilds and regular workspaces.
Summary generated by Copilot
🤖 Generated by Copilot at 0b49b53
This pull request enhances the security of prebuilds by enforcing
Project
-based access control for both reading prebuilds and accessing prebuild workspaces. It also simplifies some code inworkspace-service.ts
by reusing existing permission checks.Related Issue(s)
Fixes EXP-490
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold