Skip to content
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

Unable to verify the first certificate #19

Closed
cschyma opened this issue Feb 18, 2020 · 15 comments
Closed

Unable to verify the first certificate #19

cschyma opened this issue Feb 18, 2020 · 15 comments

Comments

@cschyma
Copy link

cschyma commented Feb 18, 2020

I am getting the following error message right after entering the basic configuration (url, user, pwd). There is no output at the output / JFrog console.

VSCode 1.42.1
JFrog Visual Studio Code Extension 1.1.1
Windows 10 1803

grafik

@yahavi
Copy link
Member

yahavi commented Feb 18, 2020

Thanks for reporting this issue, @cschyma! We are looking into it.
Does your Xray server use self signed certificates?

@cschyma
Copy link
Author

cschyma commented Feb 18, 2020

Yes it does. But Root CA certificates are imported to the Windows trust store.

Interestingly it does work running VS Code with Ubuntu.

@yahavi
Copy link
Member

yahavi commented Feb 20, 2020

Could be related to this: https://arstechnica.com/information-technology/2020/01/patch-windows-10-and-server-now-because-certificate-validation-is-broken

Can you please try to install the latest Windows updates?

@cschyma
Copy link
Author

cschyma commented Feb 20, 2020

Thanks, but https://support.microsoft.com/de-de/help/4534293/windows-10-update-kb4534293 has already been installed.

@yahavi
Copy link
Member

yahavi commented Feb 20, 2020

Thanks for sharing this information!
In that case, we may try to bump the Axios client in the next release from 0.19.0 to 0.19.2.
They have a long list of fixes: https://github.com/axios/axios/blob/master/CHANGELOG.md#0192-jan-20-2020. Hopefully, one of them will resolve this issue.

We can, however, consider to support bypassing SSL certificates validation. Please let me know if you think it's necessary.

@cschyma
Copy link
Author

cschyma commented Feb 24, 2020

Thanks, I do not need bypassing SSL certificate validation. Please give the Axios client update a try.

@yahavi
Copy link
Member

yahavi commented Feb 25, 2020

@cschyma,
JFrog VS-Code extension 1.1.2 is released.
This release includes an update to Axios client 0.19.2: 8c014fd#diff-32607347f8126e6534ebc7ebaec4853dR172.

Feel free to upgrade. We'll appreciate your feedback for that!

@cschyma
Copy link
Author

cschyma commented Feb 25, 2020

Unfortunately I still get the same error message with 1.1.2.

Is there a way to get more details about this error? What exactly is the first certificate? What cannot be verified?

@yahavi
Copy link
Member

yahavi commented Feb 26, 2020

Thanks for your feedback.
I found a good explanation in SO: https://stackoverflow.com/a/60020493/4233342.

I wonder if win-ca may help. According to their README:

Special extension for VS Code was created to import win-ca in context of VS Code's Extension Host.

Since all VS Code extensions share the same process, root certificates imported by one of them are immediately available to others. This can allow VS Code extensions to connect to (properly configured) intranet sites from Windows machines.

Can you please try this out?
If it works, we'll add it to the documentation.

@cschyma
Copy link
Author

cschyma commented Feb 26, 2020

Still no success.

We are not using self-signed certificates for the Artifactory server. Also I tried it with only the JFrog extension installed.

@yahavi
Copy link
Member

yahavi commented Feb 26, 2020

We are not using self-signed certificates for the Artifactory server

JFrog VS-Code extension uses direct APIs to Xray. Artifactory does not stand between them.

You probably did it, but I'm just making sure - Did you reload VS-Code after installing win-ca?

@cschyma
Copy link
Author

cschyma commented Feb 27, 2020

Yes, I did reload it.

Xray is using a self-signed certificate, meaning it is signed by our local CA. CA certs are installed at the Windows cert store.

@cschyma
Copy link
Author

cschyma commented Feb 27, 2020

Two more things that could be of interest:

  • the Visual Studio extension is working without such an issue
  • with Fiddler proxiing the HTTPS traffic the VSCode extension is working as expected

@cschyma
Copy link
Author

cschyma commented Mar 10, 2020

I did solve my issue by fixing the certificate file I am using at the Xray server. It was missing the intermediate CA certificates. Check https://medium.com/@superseb/get-your-certificate-chain-right-4b117a9c0fce for more background.

Interestingly this VSCode Extension was the first to complain about it. For Artifactory it seems to be alright.

@yahavi yahavi pinned this issue Mar 10, 2020
@yahavi
Copy link
Member

yahavi commented Mar 10, 2020

Thanks for this information, @cschyma. So glad to hear that this issue is resolved!
I pinned this issue to help others.

@cschyma cschyma closed this as completed Mar 10, 2020
@yahavi yahavi changed the title unable to verify the first certificate Unable to verify the first certificate Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants