Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

az keyvault key encrypt - ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) #28352

Closed jodok closed 5 months ago

jodok commented 7 months ago

Describe the bug

I'm trying to encrypt a piece of text via az commandline with a key, however the HTTP connection seems to time out. listing keys and other commands work, though.

Related command

az keyvault key encrypt --name <myname> --vault-name <myvault> --algorithm RSA-OAEP --value "this is plaintext" --data-type plaintext

Errors

('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Issue script & Debug output

cli.knack.cli: Command arguments: ['keyvault', 'key', 'encrypt', '--name', 'sops', '--vault-name', 'terraform-staging', '--algorithm', 'RSA-OAEP', '--value', 'this is plaintext', '--data-type', 'plaintext', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1035da660>, <function OutputProducer.on_global_arguments at 0x1036459e0>, <function CLIQuery.on_global_arguments at 0x1036936a0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command.
cli.azure.cli.core: Command index has been invalidated.
cli.azure.cli.core: No module found from index for '['keyvault', 'key', 'encrypt', '--name', 'sops', '--vault-name', 'terraform-staging', '--algorithm', 'RSA-OAEP', '--value', 'this is plaintext', '--data-type', 'plaintext', '--debug']'
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: acr                       0.428        36       149
cli.azure.cli.core: acs                       0.070        12        69
cli.azure.cli.core: advisor                   0.002         3         6
cli.azure.cli.core: ams                       0.007        22       100
cli.azure.cli.core: apim                      0.008        14        68
cli.azure.cli.core: appconfig                 0.006         9        47
cli.azure.cli.core: appservice                0.159        73       260
cli.azure.cli.core: aro                       0.041         1        10
cli.azure.cli.core: backup                    0.009        16        60
cli.azure.cli.core: batch                     0.101        34       102
cli.azure.cli.core: batchai                   0.005        10        30
cli.azure.cli.core: billing                   0.024        20        53
cli.azure.cli.core: botservice                0.004        12        42
cli.azure.cli.core: cdn                       0.282        23        91
cli.azure.cli.core: cloud                     0.003         1         7
cli.azure.cli.core: cognitiveservices         0.004        10        33
cli.azure.cli.core: config                    0.002         2         7
cli.azure.cli.core: configure                 0.002         2         5
cli.azure.cli.core: consumption               0.044         8         9
cli.azure.cli.core: container                 0.055         1        11
cli.azure.cli.core: containerapp              0.367        36       115
cli.azure.cli.core: cosmosdb                  0.022        58       199
cli.azure.cli.core: databoxedge               0.006         5        27
cli.azure.cli.core: dla                       0.005        23        62
cli.azure.cli.core: dls                       0.004         7        41
cli.azure.cli.core: dms                       0.003         3        22
cli.azure.cli.core: eventgrid                 0.007        25        96
cli.azure.cli.core: eventhubs                 0.030        13        19
cli.azure.cli.core: extension                 0.002         1         7
cli.azure.cli.core: feedback                  0.001         1         2
cli.azure.cli.core: find                      0.001         1         1
cli.azure.cli.core: hdinsight                 0.016         8        39
cli.azure.cli.core: identity                  0.003         2        11
cli.azure.cli.core: interactive               0.001         1         1
cli.azure.cli.core: iot                       0.493        19        82
cli.azure.cli.core: keyvault                  0.019        20       113
cli.azure.cli.core: kusto                     0.003         3        14
cli.azure.cli.core: lab                       0.008        11        34
cli.azure.cli.core: managedservices           0.003         3         8
cli.azure.cli.core: maps                      0.003         5        13
cli.azure.cli.core: marketplaceordering       0.004         1         2
cli.azure.cli.core: monitor                   2.969        17        61
cli.azure.cli.core: mysql                     0.365        14        49
cli.azure.cli.core: netappfiles               0.008        17        96
cli.azure.cli.core: network                   0.802       103       338
cli.azure.cli.core: policyinsights            0.030         9        17
cli.azure.cli.core: privatedns                0.047        14        60
cli.azure.cli.core: profile                   0.003         2         8
cli.azure.cli.core: rdbms                     0.092        49       202
cli.azure.cli.core: redis                     0.004         7        38
cli.azure.cli.core: relay                     0.053         7         8
cli.azure.cli.core: resource                  0.019        51       228
cli.azure.cli.core: role                      0.004        17        61
cli.azure.cli.core: search                    0.018         7        19
cli.azure.cli.core: security                  0.007        48       104
cli.azure.cli.core: servicebus                0.023        12        14
cli.azure.cli.core: serviceconnector          0.038        16       244
cli.azure.cli.core: servicefabric             0.073        27        76
cli.azure.cli.core: signalr                   0.004         9        34
cli.azure.cli.core: sql                       0.025        56       215
cli.azure.cli.core: sqlvm                     0.115         4        20
cli.azure.cli.core: storage                   0.062        59       273
cli.azure.cli.core: synapse                   0.017        54       246
cli.azure.cli.core: util                      0.002         3         7
cli.azure.cli.core: vm                        0.218        58       233
cli.azure.cli.core: Total (65)                7.255      1215      4718
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: account                   0.004         4        13  /Users/jodok/.azure/cliextensions/account
cli.azure.cli.core: Total (1)                 0.004         4        13
cli.azure.cli.core: Loaded 1205 groups, 4731 commands.
cli.azure.cli.core: Updated command index in 0.002 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x104636a20>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/jodok/.azure/commands/2024-02-11.11-13-29.keyvault_key_encrypt.10013.log'.
az_command_data_logger: command args: keyvault key encrypt --name {} --vault-name {} --algorithm {} --value {} --data-type {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x1046bbec0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x1046bbf60>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x1046bbb00>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x107e9a2a0>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x103645a80>, <function CLIQuery.handle_query_parameter at 0x103693740>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x1046bbd80>]
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/jodok/.azure/service_principal_entries.json', encrypt=False
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/jodok/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/jodok/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
urllib3.connectionpool: Starting new HTTPS connection (1): terraform-staging.vault.azure.net:443
urllib3.connectionpool: https://terraform-staging.vault.azure.net:443 "GET /keys/sops/?api-version=7.5-preview.1 HTTP/1.1" 401 97
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://vault.azure.net/.default',), kwargs={'tenant_id': '1b69f86a-c318-4aa6-ba6f-522783c89060'}
cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://vault.azure.net/.default',), kwargs={}
msal.telemetry: Generate or reuse correlation_id: e8c0f80b-0867-4bd4-a37a-952fc530a15c
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/token HTTP/1.1" 200 1380
msal.token_cache: event={
    "client_id": "37b9f1bf-5249-4cda-80c6-b8f346d6d7e4",
    "data": {
        "claims": "{\"access_token\": {\"xms_cc\": {\"values\": [\"CP1\"]}}}",
        "scope": [
            "https://vault.azure.net/.default"
        ]
    },
    "environment": "login.microsoftonline.com",
    "grant_type": "client_credentials",
    "params": null,
    "response": {
        "access_token": "********",
        "expires_in": 3599,
        "ext_expires_in": 3599,
        "token_type": "Bearer"
    },
    "scope": [
        "https://vault.azure.net/.default"
    ],
    "token_endpoint": "https://login.microsoftonline.com/a81e4223-cbfa-4da7-b6ec-1250befd12f2/oauth2/v2.0/token"
}
urllib3.connectionpool: https://terraform-staging.vault.azure.net:443 "GET /keys/sops/?api-version=7.5-preview.1 HTTP/1.1" 401 345
urllib3.connectionpool: https://terraform-staging.vault.azure.net:443 "POST /keys/sops//encrypt?api-version=7.5-preview.1 HTTP/1.1" 401 345
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://vault.azure.net/.default',), kwargs={'tenant_id': '1b69f86a-c318-4aa6-ba6f-522783c89060'}
cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://vault.azure.net/.default',), kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 0e2c1ba2-51c1-42e7-b5e6-e3adf874609a
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 112, in keyvault_command_handler
    result = op(**command_args)
             ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/custom.py", line 1174, in encrypt_key
    return crypto_client.encrypt(EncryptionAlgorithm(algorithm), value,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/keyvault/keys/crypto/_client.py", line 290, in encrypt
    operation_result = self._client.encrypt(
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/keyvault/keys/_generated/operations/_key_vault_client_operations.py", line 1909, in encrypt
    pipeline_response: PipelineResponse = self._client._pipeline.run(  # pylint: disable=protected-access
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 213, in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  [Previous line repeated 2 more times]
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/policies/_redirect.py", line 181, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 489, in send
    raise err
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/policies/_retry.py", line 467, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/policies/_authentication.py", line 131, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 70, in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
  [Previous line repeated 2 more times]
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/_base.py", line 108, in send
    self._sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/pipeline/transport/_requests_basic.py", line 376, in send
    raise error
azure.core.exceptions.ServiceResponseError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 729, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 138, in keyvault_command_handler
    return keyvault_exception_handler(self.command_loader, ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/keyvault/_command_type.py", line 51, in keyvault_exception_handler
    raise CLIError(ex)
knack.util.CLIError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

cli.azure.cli.core.azclierror: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
az_command_data_logger: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x104636ca0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 133.583 seconds (init: 0.407, invoke: 133.175)
cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/__main__.py", line 62, in <module>
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/__main__.py", line 55, in <module>
    sys.exit(exit_code)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/decorators.py", line 79, in _wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/telemetry.py", line 532, in _get_secrets_warning_config
    show_secrets_warning = _get_config().getboolean('clients', 'show_secrets_warning', fallback=None)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/knack/config.py", line 147, in getboolean
    raise ValueError('Not a boolean: {}'.format(val))
ValueError: Not a boolean: None

telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3661 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/__init__.py /Users/jodok/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

it returns the encrypted value of the string

Environment Summary

azure-cli                         2.57.0

core                              2.57.0
telemetry                          1.1.0

Extensions:
account                            0.2.5

Dependencies:
msal                              1.26.0
azure-mgmt-resource             23.1.0b2

Python location '/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/bin/python'
Extensions directory '/Users/jodok/.azure/cliextensions'

Python (Darwin) 3.11.7 (main, Dec  4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)]

Additional context

No response

azure-client-tools-bot-prd[bot] commented 7 months ago

Hi @jodok,

2.55.0 is not the latest Azure CLI(2.57.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 7 months ago

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

jodok commented 7 months ago

problem is the same with latest azure-cli. updated the issue accordingly (version info, traceback)

evelyn-ys commented 7 months ago

Can you check if the terraform-staging keyvault really exist and contains a key naming sops?

jodok commented 7 months ago

yes, it exists (encryption is still not workin):

➜  ~ az keyvault key list --vault-name treely-staging
[
  {
    "attributes": {
      "created": "2024-02-11T00:34:59+00:00",
      "enabled": true,
      "expires": null,
      "exportable": false,
      "hsmPlatform": "0",
      "notBefore": null,
      "recoverableDays": 90,
      "recoveryLevel": "Recoverable+Purgeable",
      "updated": "2024-02-11T00:34:59+00:00"
    },
    "kid": "https://treely-staging.vault.azure.net/keys/sops",
    "managed": null,
    "name": "sops",
    "releasePolicy": null,
    "tags": {
      "Environment": "staging",
      "Provider": "terraform",
      "TFWorkspace": "bootstrap-staging"
    }
  }
]
jodok commented 7 months ago

HA! it's treely-staging and not terraform-staging. thanks for pointing out. (an error message "doesn not exist" would be preferred to a "connection timeout")