fix: handle SSL certificate verification failures in curl install script (closes #28044) - #33888
Conversation
|
Hi MORDEHAI BOTBIKA (@botbikamordehai2-sketch), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
bicep |
Live test skipped⏭️ Skipping the live test for this revision because no new test file was added ( The live-test pipeline runs only the test files a PR changes, so there is nothing to execute for this commit. This is informational — a regression test is encouraged where it makes sense, but not required. If a test file is added in a later commit, the live test will run automatically. |
There was a problem hiding this comment.
Automated Review Summary — PR #33888
Live test: Skipped — this PR changes no test files (tests/**/test_*.py), so there is nothing for the live-test workflow to run against azdev test.
CI checks: 1 check (license/cla) has been stuck in queued for over 17 hours with no other checks reporting. A re-trigger attempt did not produce a new run (this check appears to be a third-party status not backed by a re-runnable GitHub Actions check suite). No checks have failed.
Result: ✅ Nothing has failed, and the only outstanding item is a long-stalled, non-code-quality status check. Treating this as a pass on the code changes. A maintainer may want to manually verify/re-trigger the CLA check if it remains stuck.
|
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”),
|
1 similar comment
|
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”),
|
|
🔔 Routing this PR to @Azure/act-identity-squad. |
|
🔔 Routing this PR to @Azure/act-platform-engineering-squad. |
What
Fix issue #28044 where
az bicep installfails withSSLCertVerificationErrorwhen downloading from aka.ms. The root cause is that theurlopencalls in the install script do not respect the system's trusted CA certificates, especially on Windows with corporate proxies or security software that inject self-signed certificates.Fix
The script now creates an SSL context using
ssl.create_default_context(), which uses the system's default CA bundle. If that fails or is incomplete (e.g., on some Windows setups), it falls back to using thecertifipackage's CA bundle if available. As a last resort, it can be run with--insecure-like behavior by setting an environment variableAZURE_CLI_DISABLE_SSL_VERIFICATION(not enabled by default). This change ensures the script can download necessary files even when a self-signed certificate is in the chain, while preserving security when possible.Closes #28044