Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old_azure_cli feature from azure_identity #2327

Open
heaths opened this issue Mar 13, 2025 · 2 comments
Open

Remove old_azure_cli feature from azure_identity #2327

heaths opened this issue Mar 13, 2025 · 2 comments
Assignees
Labels
Azure.Identity The azure_identity crate Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@heaths
Copy link
Member

heaths commented Mar 13, 2025

Because the caller of azure_identity can't know what version of the Azure CLI is installed, we should remove the old_azure_cli feature and support both expiresOn and expires_on as does Go: https://github.com/Azure/azure-sdk-for-go/blob/d34a8dd747cbaaac577a8b53ec56b970bff09eaa/sdk/azidentity/azure_cli_credential.go#L179-L185

This does mean more dependencies but I don't think is something we can avoid.

@heaths heaths added Azure.Identity The azure_identity crate Client This issue points to a problem in the data-plane of the library. labels Mar 13, 2025
@heaths heaths added this to the 2025-04 milestone Mar 13, 2025
@github-project-automation github-project-automation bot moved this to Untriaged in Azure SDK Rust Mar 13, 2025
@heaths
Copy link
Member Author

heaths commented Mar 13, 2025

@chlowell @joshfree do you agree? Basically, we use a feature named old_azure_cli that is part of the default features and reads the expiresOn field of the access token, but that causes us to pull in more date-time dependencies. The old code treats it as optional, but it seems to me that shouldn't be up to the dev using our SDKs, but we should support whatever version the end user has installed.

At some point do we cut support for that version of Azure, though? According to a comment in our azure_identity crate, that version is from before November 2023:

# If you are using and Azure CLI version older than 2.54.0 from November 2023,
# upgrade your Azure CLI version or enable this feature.
# Azure CLI 2.54.0 and above has an "expires_on" timestamp that we can use.
# https://github.com/Azure/azure-cli/releases/tag/azure-cli-2.54.0
# https://github.com/Azure/azure-cli/issues/19700
old_azure_cli = ["time/local-offset", "tz-rs"]

/cc @cataggar

@chlowell
Copy link
Member

Makes sense to me. The credential working seamlessly in both cases because it handles the old/new distinction internally is obviously a better user experience, modulo the additional dependencies.

At some point do we cut support for that version of Azure [CLI], though?

🤷 I expect to continue supporting the old format indefinitely because we can't tell whether anyone is using it

@heaths heaths assigned chlowell and unassigned heaths Mar 20, 2025
@heaths heaths modified the milestones: 2025-04, 2025-05 Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity The azure_identity crate Client This issue points to a problem in the data-plane of the library.
Projects
Status: Untriaged
Status: Untriaged
Development

No branches or pull requests

2 participants