Skip to content

Identity token cred env#41060

Merged
xiangyan99 merged 12 commits intomainfrom
identity_token_cred_env
May 13, 2025
Merged

Identity token cred env#41060
xiangyan99 merged 12 commits intomainfrom
identity_token_cred_env

Conversation

@xiangyan99
Copy link
Member

@xiangyan99 xiangyan99 commented May 13, 2025

Add a way to environmentally configure what set of credentials are used in DefaultAzureCredential.

@xiangyan99 xiangyan99 marked this pull request as ready for review May 13, 2025 16:11
Copilot AI review requested due to automatic review settings May 13, 2025 16:11
@xiangyan99 xiangyan99 requested review from a team and pvaneck as code owners May 13, 2025 16:11
Copy link
Contributor

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 selecting credential groups via the new AZURE_TOKEN_CREDENTIALS environment variable. It adds tests to cover async and sync credential selection behaviors, updates the default version, and updates configuration constants and changelog accordingly.

Reviewed Changes

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

Show a summary per file
File Description
sdk/identity/azure-identity/tests/test_token_credentials_env_async.py Added tests for async credential selection based on AZURE_TOKEN_CREDENTIALS.
sdk/identity/azure-identity/tests/test_token_credentials_env.py Added tests for sync credential selection based on AZURE_TOKEN_CREDENTIALS.
sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py Updated async DefaultAzureCredential to support the new environment variable.
sdk/identity/azure-identity/azure/identity/_version.py Bumped version from 1.22.1 to 1.23.0.
sdk/identity/azure-identity/azure/identity/_credentials/default.py Updated sync DefaultAzureCredential to support the new environment variable.
sdk/identity/azure-identity/azure/identity/_constants.py Introduced AZURE_TOKEN_CREDENTIALS constant.
sdk/identity/azure-identity/CHANGELOG.md Documented changes for release 1.23.0.

@xiangyan99 xiangyan99 requested a review from pvaneck May 13, 2025 20:05
Copy link
Member

@pvaneck pvaneck left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure Identity SDK Improvements May 13, 2025
@xiangyan99 xiangyan99 merged commit 95b6c31 into main May 13, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure Identity SDK Improvements May 13, 2025
@xiangyan99 xiangyan99 deleted the identity_token_cred_env branch May 13, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants