-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Description
When deploying vscode-server, I want to provide different permissions and functionality restrictions for each instance:
- Workspace file read and write permissions
- Terminal environment control authority
- VS Code configuration (lock the
settings.json
file)
Usage scenario
When using VSCode Web, I can restrict the functions for different users to prevent them from intentionally or unintentionally damaging the instance environment or consuming excessive resources.
If I am conducting a project demonstration or giving a simple engineering explanation, I would like the users to be able to directly open VSCode via the web, but only in the capacity of a visitor to view the files, without the ability to modify or execute any functions.
I have tried many solutions, such as modifying the settings.json file and restricting the write permissions for this file.But this is merely to impose some UI-level functional restrictions on VSCode.
I can use containers to isolate instances to prevent them from affecting other user environments. However, this consumes resources and still cannot effectively prevent malicious damage.
Users can bypass this by modifying the settings.json file in the workspace. Once users can access the system files through the terminal, they can do so.
I think it is necessary to impose restrictions at the extension host level to achieve the above functionality.
If they are core members of the team, I can allocate sufficient performance Docker container instances based on their capability assessment to isolate the environment conflicts among them. However, if it is opened to other visitor-level users, it is impossible to provide a container instance for each user, which would be very costly. It is hoped to provide them with a shared read-only instance and prohibit them from using terminals or other resources that may damage the environment or consume high-load resources.