Open angrycub opened 1 month ago
We've experienced the very same issue. The signature seems not to be contained in the actual VSXI package. Instead, the extensionquery-API provides it as a separate asset for a given version.
Our solution is to download it separately (we have a mirroring mechanism which uses the extensionquery-API to fetch the version information of the extensions and passes new version assets to code-marketplace add
) and put it manually next to the extension in our Artifactory repository. The reverse proxy in front of the marketplace then mangles the manifest response via embedded Lua to inject the signature asset in the response.
This way, VS Code can download the signature and stops complaining.
Bringing over my notes from https://github.com/coder/code-marketplace/issues/67:
I think we will need to implement https://github.com/filiptronicek/node-ovsx-sign in Go. We generate what we need when an extension is added, or on demand for existing extensions for backwards compatibility.
This should also allow adding your own signatures since it will only generate if one does not already exist.
duplicated by https://github.com/coder/customers/issues/702
Hello @janLo
Could you give me more information about have you download the signature ? I'm experiencing the same issue with code-server 1.91.1
Thanks.
@p1r4t3-s4il0r we have a downloader that does it all for us and a bit of infrastructure to use it on the other side.
This is the code that downloads a list of extensions and places them into artifactory:
And then I have a bit of LUA magic in our reverse proxy in front of the code-marketplace, that adds the signature:
Just finished setting up the code-marketplace with Artifactory and getting the same error.
In my case, clicking Install
in the cog wheel generates an error:
Unable to verify the first certificate
That might be because vscode does not trust the server certificate of the marketplace service
I am using coder with code-server, the pod running the coder workspace is trusting the domain, Is there a different certificate configuration for code-server?
With vscode desktop I had to put the ca cert of the ca that issued the Code-Server certificate to the chrome trust store.
(Separate trust stores for different software instances are certainly an invention from hell. They're just there to ruin your day 😉)
That sounds terrible! @code-asher Do you know how to configure code-server to trust the code-marketplace? I'm working in an air-gapped environment and want to use code-server with code-marketplace and Artifactory.
If you mean extension signing, there is no way to do that currently as far as I know aside from the workarounds above. It needs to be implemented here, and disabling signature verification in code-server appears to have no effect from what I read (I have not tried it myself though, so maybe it does work).
If you mean trust as in a TLS certificate, then likely you need to add your CA to both the local machine (some requests are made from the browser) and the remote machine (other requests are made from the server).
Edit: oh I missed the conversation above, you definitely mean the TLS cert. Yeah you have to trust your CA on both machines.
That's exactly what I was thinking, both the client machine and the code-server pod trust the CA (curl works just fine with HTTPS)
But still I'm getting the Unable to verify the first certificate
error when trying to install from the cog wheel install button.
I have uploaded the extension to Artifactory using the the code-marketplace CLI and a VSIX downloaded from Microsoft's store.
Any other ideas?
Edit 1
When opening the dev tools (F12) on the code-server browser it looks like all requests to the code-marketplace domain are HTTPS and work well (200 OK), for example, fetching the README.md
. But the error looks internal to VSCode, these are the logs in the VSCode output console:
Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1076:8)
...
Edit 2
These are the logs in the code-server log file:
Getting Manifest... <extension-name>
#1 <https-marketplace-url>/assets/<extension-publisher>/<extension-name>/<version>/Microsoft.VisualStudio.Code.Manifest - error GET unable to verify the first certificate
Tried compiling my own extension and pushing to the registry and got the same error.
When using CURL on the same URL printed, from the pod running the code-server, it works fine, and return a redirect to package.json
Problem Statement
It seems that VS Code 1.94+ is not compatible with extensions hosted in the code-marketplace. They all have this signature warning (Screenshot 1) which prevents them from being installed in the standard way i.e. blue Install button, or automatically if you’ve enabled auto updates. You can still install via the cog wheel if you proceed passed the warning (Screenshots 2 & 3).
🖥️ Screenshots
**Screenshot 1** **Screenshot 2** **Screenshot 3**Potentially related issues