vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Connection through X.509 doesn't work.

Open bambrozio opened this issue 4 years ago • 2 comments

Issue Type: Bug

Hi, I have a Shared Atlas MongoDB sandbox that I can successfully connect MongoDB for VS Code extension through user and password (SCRAM). However, I cannot connect through X.509 authentication method.

I have tried using both "connection string" option and filling out the "advanced connection settings" form. Yet, none of them works when using X.509 methods.

VS Code keep raising the error: Unable to resolve your shell environment in a reasonable time. Please review your shell configuration. whenever I try to establish the connection.

Here's the connection string I'm using:

mongodb+srv://<subdomain>.<domain>.mongodb.net/test-db?authSource=%24external&authMechanism=MONGODB-X509&tls=true&tlsCertificateKeyFile=/path/to/X509-cert.pem

In order to make sure the connection string is valid, I successfully used it to connect to my database using Mongoose.

Please, let me know if you need more info to help troubleshooting.

Thanks in advance! Bruno.

Extension version: 0.6.12 VS Code version: Code 1.61.0 (ee8c7def80afc00dd6e593ef12f37756d8f504ea, 2021-10-07T18:11:58.853Z) OS version: Darwin x64 20.6.0 Restricted Mode: No

bambrozio avatar Oct 24 '21 22:10 bambrozio

Did you see https://code.visualstudio.com/docs/supporting/faq#_resolving-shell-environment-fails? It contains some helpful points for where to start debugging a situation like this.

addaleax avatar Oct 25 '21 09:10 addaleax

@bambrozio in our recent releases we've updated a connection logic and a MongoDB node driver version. Could you see if this issue still persists?

alenakhineika avatar May 23 '22 10:05 alenakhineika

Going to close this issue, feel free to reopen if there's more information. Was able to successfully connect using x.509. Thanks for checking out the extension and opening the issue.

Anemy avatar Nov 18 '22 13:11 Anemy