Skip to content

Identity: 'AZURE_TOKEN_CREDENTIALS' env var support for specific credential names #6634

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

antkmsft
Copy link
Member

@antkmsft antkmsft commented Jun 21, 2025

This is a feature that was discussed within the Identity team, and certain details of the design may still change for all SDK languages (i.e. things like whether the possible values should be AzureCli vs AzureCliCredential), but I've got a bit of time and inspiration now to make this implementation maybe a bit ahead of time when design is finalized, but I am fine to make edits to this PR later, I think the main chunk of work is done - i.e. if we settle on AzureCliCredential or AZURE_CLI_CREDENTIAL instead of AzureCli value that is used in the initial iteration of this PR, it should be only a few lines of code to update.


Release-wise, I am thinking of making a GA release from current main, and releasing this feature as Beta first - we could do 2 releases in July then - one GA, one Beta. I will check with the Identity team.

@antkmsft antkmsft marked this pull request as ready for review June 21, 2025 13:52
@Copilot Copilot AI review requested due to automatic review settings June 21, 2025 13:52
@antkmsft antkmsft requested review from RickWinter, LarryOsterman and a team as code owners June 21, 2025 13:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for specifying a single credential type in DefaultAzureCredential via the AZURE_TOKEN_CREDENTIALS environment variable. Key changes include adding unit tests for various credentials, refactoring the credential selection logic in default_azure_credential.cpp, and updating the CHANGELOG.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
sdk/identity/azure-identity/test/ut/default_azure_credential_test.cpp Adds parameterized tests for verifying log messages for specific credentials
sdk/identity/azure-identity/src/default_azure_credential.cpp Refactors credential selection logic based on AZURE_TOKEN_CREDENTIALS
sdk/identity/azure-identity/CHANGELOG.md Documents new supported AZURE_TOKEN_CREDENTIALS values

@antkmsft antkmsft force-pushed the az-tok-creds-specific-cred branch from 546d863 to e180cd1 Compare June 23, 2025 01:09
@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure Identity SDK Improvements Jun 24, 2025
@antkmsft antkmsft requested a review from scottaddie June 24, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants