microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
365 stars 85 forks source link

Connect via PE - Disable Proxy - Authentication Failed (Self signed certificate in certificate chain) #7901

Closed KennyM86 closed 1 month ago

KennyM86 commented 2 months ago

Preflight Checklist

Storage Explorer Version

1.23.0

Regression From

No response

Architecture

x64

Storage Explorer Build Number

20220223.14

Platform

All

OS Version

Windows 10

Bug Description

When disabling proxy server to be able to connect to storage account via Private Endpoint, re-authentication is needed and fails.

After authenticating, it gives the following error message: { "message": "\"{\n \\"name\\": \\"Error\\",\n \\"message\\": \\"self signed certificate in certificate chain\\",\n \\"stack\\": \\"Error: self signed certificate in certificate chain\\n at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)\\n at TLSSocket.emit (node:events:394:28)\\n at TLSSocket._finishInit (node:_tls_wrap:944:8)\\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)\\",\n \\"code\\": \\"SELF_SIGNED_CERT_IN_CHAIN\\"\n}\"" }

Enabling proxy = Working authentication, but access storage via public endpoint Disabling proxy = Authentication not working

Steps to Reproduce

  1. Launch storage explorer
  2. Disable proxy
  3. (restart app)
  4. Message that states account need to re-authenticate
  5. click re-authenticate now
  6. complete authentication
  7. Error shows

Actual Experience

{ "message": "\"{\n \\"name\\": \\"Error\\",\n \\"message\\": \\"self signed certificate in certificate chain\\",\n \\"stack\\": \\"Error: self signed certificate in certificate chain\\n at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)\\n at TLSSocket.emit (node:events:394:28)\\n at TLSSocket._finishInit (node:_tls_wrap:944:8)\\n at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)\\",\n \\"code\\": \\"SELF_SIGNED_CERT_IN_CHAIN\\"\n}\"" }

Expected Experience

Login succesfull Access Storage Account via PE

Additional Context

No response

KennyM86 commented 2 months ago

I've found the similar link : https://github.com/CawaMS/StorageExplorerTroubleshootingGuide/blob/master/se-troubleshooting-guide.md#self-signed-certificate-in-certificate-chain

After executing: Execute s_client -showcerts -connect microsoft.com:443

I found no self-signed certs are used. ("No client certificate CA names sent")

craxal commented 2 months ago

@KennyM86 Please update your version of Storage Explorer to the latest available (1.33.1 as of today). 1.23.0 is quite old (almost 3 years old) and is no longer supported. Storage Explorer has received major improvements since then.

If you are still encountering issues after upgrading, here are some things you can try:

JasonYeMSFT commented 2 months ago

I've found the similar link : https://github.com/CawaMS/StorageExplorerTroubleshootingGuide/blob/master/se-troubleshooting-guide.md#self-signed-certificate-in-certificate-chain

After executing: Execute s_client -showcerts -connect microsoft.com:443

I found no self-signed certs are used. ("No client certificate CA names sent")

The message you referenced is expected. As far as I know, our error is about SSL certificates (aka. server certificates). They are different from client certificates. To send client certificates, there should have been a -cert argument in the openssl command. You should look at the server certificate(s) in the command output and see if there are any self-signed certificates. Let us know if you don't see any server certificates in the command output.

KennyM86 commented 2 months ago

@craxal

Ah, I thought I always updated 'on close' but indeed it did nothing in the past apparently. I manually updated to latest version but problem still exists.

Unable to retrieve child resources

ProducerError:{
  "name": "Node Fetch Error",
  "message": "{\"name\":\"Node Fetch Error\",\"cause\":{\"cause\":{\"code\":\"SELF_SIGNED_CERT_IN_CHAIN\"}},\"code\":\"SELF_SIGNED_CERT_IN_CHAIN\"}"
}

@JasonYeMSFT : Ok, I did found two certificates:

MRayermannMSFT commented 2 months ago

@KennyM86 your best bet with certificate errors is to stay in system proxy mode, and try to work things out using that. However, it does sound like you have quite a bit unique network constraints going on here. At this point I would recommend you open an Azure support ticket via the portal.