{Core} Make the recommendation for SSLError more accurate#27857
{Core} Make the recommendation for SSLError more accurate#27857
SSLError more accurate#27857Conversation
🔄AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Core |
| 'Please add this certificate to the trusted CA bundle. More info: https://docs.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy.') | ||
| SSLERROR_TEMPLATE = ('An SSL error occurred. This typically happens when using Azure CLI behind a proxy or firewall. ' | ||
| 'For more information, see: ' | ||
| 'https://learn.microsoft.com/cli/azure/use-cli-effectively#work-behind-a-proxy') |
There was a problem hiding this comment.
Can we distinguish the firewall error and certificate error further based on error message?
The certificate error is Caused by SSLError(SSLCertVerificationError.
The firewall error is Caused by SSLError(SSLEOFError. In this case, we can suggest users adding endpoints to allowlist: https://learn.microsoft.com/en-us/cli/azure/azure-cli-endpoints?tabs=azure-cloud
There was a problem hiding this comment.
To some extent, firewall is a special type of proxy. I think we can elaborate it in the doc, but keep the error message simple.
Also, I think SSLEOFError is only one type of SSLError caused by firewall. There may be other firewalls out there causing other SSLErrors. Capturing the base SSLError covers more scenarios.
Description
#11093 added recommendation for
requests.exceptions.SSLError. However, not allSSLErrors are caused by untrusted self-signed certificate. For example, when a firewall blocks https://management.azure.com/, anrequests.exceptions.SSLErrorwill be raised:This PR refines the recommendation message to make it more accurate.
Testing Guide
TBD