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

[rush] Add ChainedCredential to AzureAuthenticationBase to handle auth failover and add support for developer tools credentials #5169

Merged
merged 9 commits into from
Apr 1, 2025

Conversation

bmiddha
Copy link
Member

@bmiddha bmiddha commented Mar 21, 2025

Summary

Implement credential failover with ChainedTokenCredential from @azure/identity.
Add support for VisualStudioCodeCredential, AzureCliCredential, AzureDeveloperCliCredential, and AzurePowerShellCredential. These can help reduce or eliminate the interactive browser popups or device code prompts, which can be annoying.

Details

Implement credential failover with ChainedTokenCredential from @azure/identity
New default credential failover order:
AdoCodespacesAuthCredential
VisualStudioCodeCredential
AzureCliCredential
AzureDeveloperCliCredential
AzurePowerShellCredential
InteractiveBrowserCredential
DeviceCodeCredential

Add support for new login flows VisualStudioCodeCredential, AzureCliCredential, AzureDeveloperCliCredential, AzurePowerShellCredential.

Updated AdoCodespacesAuthCredential to throw CredentialUnavailableError to play nicely with the chaining.

How it was tested

Manually tested in a repo that uses Azure backed build cache.

Impacted documentation

@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Mar 21, 2025
@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage Mar 24, 2025
@bmiddha bmiddha changed the title [rush] Add chained credential to support failover and add support for developer tools credentials [rush] Implement login failover with ChainedTokenCredential and add support for developer tools credentials Mar 27, 2025
dmichon-msft
dmichon-msft previously approved these changes Mar 27, 2025
Copy link
Contributor

@dmichon-msft dmichon-msft left a comment

Choose a reason for hiding this comment

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

Just a minor bit of cleanup left.

@bmiddha bmiddha changed the title [rush] Implement login failover with ChainedTokenCredential and add support for developer tools credentials [rush] Add ChainedCredential to AzureAuthenticationBase to handle auth failover and add support for developer tools credentials Mar 27, 2025
@iclanton iclanton merged commit 6b358ea into microsoft:main Apr 1, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Bug Triage Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants