Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.98k forks source link

Azure CLI version 2.65.0 has deprecated modules #30147

Open h44mkk opened 1 week ago

h44mkk commented 1 week ago

Describe the bug

Hi! After upgrading homebrew packages on my macOS, the Azure-CLI version got updated as well. The new version shows always following errors: /usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "cipher": algorithms.TripleDES, /usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "class": algorithms.TripleDES,

My work colleagues have the same issue as well. Can somebody fix that please?

Related command

All commands are affected! Here is an example: az staticwebapp hostname delete --name my-static-web-app --hostname example.com --resource-group MY-RESOURCE-GROUP

Errors

/usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "cipher": algorithms.TripleDES, /usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "class": algorithms.TripleDES,

Issue script & Debug output

/usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "cipher": algorithms.TripleDES, /usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0. "class": algorithms.TripleDES,

Expected behavior

Should work without logging erros!

Environment Summary

azure-cli 2.65.0

core 2.65.0 telemetry 1.1.0

Dependencies: msal 1.31.0 azure-mgmt-resource 23.1.1

Python location '/usr/local/Cellar/azure-cli/2.65.0_1/libexec/bin/python' Extensions directory '/Users/h44mkk/.azure/cliextensions'

Python (Darwin) 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Nothing to add.

yonzhan commented 1 week ago

Thank you for opening this issue, we will look into it.

github-actions[bot] commented 1 week ago

Here are some similar issues that might help you. Please check if they can solve your problem.

h44mkk commented 1 week ago

Thank you for the suggestion. However, the proposed solution involves downgrading to version 2.64.0, which isn't ideal for our needs. We're looking for a proper fix rather than reverting to an older CLI version.

jaromirmikulik commented 1 week ago

From my perspective, it could be caused by: https://github.com/Azure/azure-cli/issues/30148

h44mkk commented 1 week ago

I tried the suggested solution to install the setup tools, but I still have the same issue:

Image Still getting here the same warnings: Image

/usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  "cipher": algorithms.TripleDES,
/usr/local/Cellar/azure-cli/2.65.0_1/libexec/lib/python3.12/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  "class": algorithms.TripleDES,
jaromirmikulik commented 5 days ago

try to update azure-cli via homebrew: brew update && brew upgrade

it should fix also this kind of issue.

dvasdekis commented 5 days ago

try to update azure-cli via homebrew: brew update && brew upgrade

it should fix also this kind of issue.

I still get this issue even though I have the latest Azure CLI version:

➜  az version
{
  "azure-cli": "2.65.0",
  "azure-cli-core": "2.65.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "resource-graph": "2.1.0"
  }
}
➜   az functionapp show --subscription "..." --resource-group "..." --name "my-funcapp-name"
/opt/az/lib/python3.11/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  "cipher": algorithms.TripleDES,
/opt/az/lib/python3.11/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
  "class": algorithms.TripleDES,
Subscription '...' not recognized.
Not Found({"error":{"code":"MissingSubscription","message":"The request did not have a subscription or a valid tenant level resource provider."}})

You can replace the ... with your real IDs for a real example but the above still illustrates the issue