About the TLS version of Azure CLI

m-hon 0 Reputation points
2023-12-25T00:52:45.65+00:00

I would like to know which TLS version Azure CLI uses.

Azure CLI Version

# az --version
azure-cli                         2.32.0 *
core                              2.32.0 *
telemetry                          1.0.6 *
Extensions:
express-route-cross-connection               0.1.1
Dependencies:
msal                              1.16.0
azure-mgmt-resource               20.0.0
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,770 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 50,021 Reputation points Microsoft Employee Moderator
    2024-01-02T10:26:34.3966667+00:00

    Hello @m-hon ,

    Apologies for the delay in response.

    I understand that you would like to know which TLS version Azure CLI uses.

    I discussed this with the Azure CLI Product Group team and below is the information they provided:

    Azure CLI internally uses Python 3.11, requests library and OpenSSL to make HTTP requests. It automatically chooses the highest TLS version supported by the server.

    According to https://docs.python.org/3/library/ssl.html#tls-1-3, Python 3.7 started to support TLS 1.3. And according to https://docs.python.org/3/library/ssl.html#ssl.SSLContext.minimum_version, we can check the minimum version of TLS used by Python: 

    >>> ssl.create_default_context().minimum_version
    <TLSVersion.TLSv1_2: 771>
    

    This means Azure CLI will use the higher one of TLS 1.2 or 1.3 when it is possible.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.