fix: Improve TLS verification fallback for connection errors (closes #28044) - #34015
Conversation
|
Hi MORDEHAI BOTBIKA (@botbikamordehai2-sketch), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution MORDEHAI BOTBIKA (@botbikamordehai2-sketch)! We will review the pull request and get back to you soon. |
|
TLS |
|
MORDEHAI BOTBIKA (@botbikamordehai2-sketch) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
What
Users behind corporate proxies or with self-signed certificates in the chain experience SSL certificate verification failures when the CLI makes HTTPS requests to aka.ms (e.g.,
az bicep install). The current code usesverify=(not should_disable_connection_verify()), which only disables verification if the environment variable is set. Many users see errors likeSSLCertVerificationError: self-signed certificate in certificate chain.Fix
Enhance the connection logic to:
certifi's CA bundle as a fallback if the default verification fails.AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=true, keep verification disabled.verify=Falseonly as a last resort to unblock users, but log a warning that this is insecure.This change applies to the extension command tree fetch. A similar fix should be applied to the bicep install code path.
Closes #28044