-
Notifications
You must be signed in to change notification settings - Fork 943
feat: Allow only workspace owner connections #6875
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
feat: Allow only workspace owner connections #6875
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
@bensejas love the contribution! Seems reasonable to me... we actually have an RBAC permission that controls workspace connectivity, so this should actually be super easy to pipe through. @Emyrk can you provide some thoughts on how we do this? We're also happy to take this over, since it might be a bit involved. |
We do this for owner's app sharing, we can do something similar for workspace connectivity as well: Lines 1102 to 1110 in 665b84d
|
@Emyrk do you have time to take this over and implement it? The config flag seems reasonable from my perspective. |
Would you ever want to support sharing workspaces? Phrased differently, are you intending to reduce the scope of the |
I can implement this yes. Just want to know what the end goal is. The way it is currently implemented does more than just reduce the owner role. It prevents any other access by any other means we might invent later. (Eg workspace proxies maybe) |
Fantastic 🎉 Thank you! |
I am going to implement this is Golang. To do this in rbac would be to allow us to reduce the scope of Line 80 in 0347231
I will do in Go, and maybe we can revisit doing this in RBAC/rego |
Sorry for the delay, I did this here: #7050 |
Draft
This is a draft and I need some feedback. I suspect the best way to do this might be via permissions and RBCA but I need some guidance here.
Context
Currently, the owner role has the ability to connect to all workspaces. This is not ideal from a security perspective because it increases exposure as a compromised admin account has access to workspaces and can perform malicious actions.
Intent
We want to only allow the workspace owner to have the ability to connect to their workspace.
Changes
CODER_WORKSPACE_OWNER_CONNECTION_ONLY
to only allow workspace owners connection to their workspacesTODO