Web IDE injected in workspaces violates the Content Security Policy directive
Problem
We are using the Web IDE container image registry.gitlab.com/gitlab-org/gitlab-web-ide-vscode-fork/web-ide-injector:1.75.1-1.0.0-dev-20230420135121
to run the Web IDE in the workspaces. When you create a workspace and access the URL of the workspace, it gives you the following errors in console
8000-workspace-7-1-unistj.workspaces.localdev.me.har
Potential Solution
It looks like this is an issue in upstream - https://github.com/microsoft/vscode/issues/173104 . We will have to rebase our Web IDE and check if it fixes things for us.
Other problems that were noticed that might be useful information
-
Files are owned by multiple users.
1001
is the user that is specified while running the container.10001
is the user of the docker build. Not sure where doesroot
come from and why does it own the home directory. -
Extensions are being looked up at the default location (home directory). Checkout the following log in the above screenshot.
ERR Error: Unable to resolve nonexistent file '/home/user/.vscode-server-oss/extensions'