pulumi-azure-native icon indicating copy to clipboard operation
pulumi-azure-native copied to clipboard

Remove legacy auth code

Open thomas11 opened this issue 8 months ago • 3 comments

Authentication was updated to use azidentity in release v2.69 in October 2024. There are no open issues that require users to fall back to the previous auth stack. Therefore, we should remove the legacy auth which would be a significant simplification of the provider code.

thomas11 avatar Mar 20 '25 15:03 thomas11

Requirements:

  • Issue warning if the following environment is specified, because it isn't supported: AZURESTACKCLOUD
  • official vars: https://github.com/Azure/azure-sdk/blob/main/_includes/tables/environment_variables.md
  • correct handling of AZUREUSGOVERNMENT vs AZUREUSGOVERNMENTCLOUD
  • support for AZURE_CLOUD (ref)
  • invoke:get-client-token
  • invoke:get-client-config
  • token caching (safely)
  • update: https://www.pulumi.com/docs/intro/cloud-providers/azure/setup/#service-principal-authentication
  • docs: recommend that subscription id be set
  • behavior when cli isn't installed
  • cli mode when a service principal is active (doc link)
  • environment "mismatch" detection, or how to use CLI auth with cloud argument
  • Add Florian Stadler as reviewer
  • Note: "AZ CLOUD CLI" environment is a service principal environment
  • AZURE_ENVIRONMENT of AzureCloud and AzurePublicCloud (https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/cloud.py#L352)
  • Tests for GetClientConfig
  • msgraph cloud endpoints

References:

  • https://github.com/microsoftgraph/msgraph-sdk-go/issues/235
  • old config: https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/previous-versions-quickstart.md

EronWright avatar Jun 30 '25 16:06 EronWright

A PR to cleanly separate the old/new code: https://github.com/pulumi/pulumi-azure-native/pull/4242

EronWright avatar Jul 28 '25 23:07 EronWright

Status update: https://github.com/pulumi/pulumi-azure-native/pull/4242 completed the transition to the new azidentity-based system, to be released while leaving the legacy option in place. After some time, we expect to merge https://github.com/pulumi/pulumi-azure-native/pull/4284 to remove the legacy option completely.

EronWright avatar Aug 26 '25 21:08 EronWright