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

Don't stop trying dev credentials on failures #35771

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

billwert
Copy link
Contributor

@billwert billwert commented Jul 6, 2023

Fixes #34733

For our dev time credentials we want to always keep going. This change wraps any failure from the credentials in a CredentialUnavailableException so ChainedTokenCredential will continue them properly.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@joshfree joshfree added this to the 2023-08 milestone Jul 11, 2023
@joshfree joshfree added bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. labels Jul 11, 2023
Fixes Azure#34733

For our dev time credentials we want to always keep going. This change wraps any failure from the credentials in a `CredentialUnavailableException` so `ChainedTokenCredential` will continue them properly. It only does so in the context of a `ChainedTokenCredential`. Regular uses of these credentials is unaffected.
@billwert billwert force-pushed the identity-keep-trying-dac-creds branch from 87a2af5 to 33f6a77 Compare July 14, 2023 23:21
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.

Hey, @billwert. Should this logic of always returning CredentialUnavailableException for dev credentials also apply to user-created ChainedTokenCredentials which may contain several dev credentials? Seems like only DAC has isChained set to true.

@billwert
Copy link
Contributor Author

billwert commented Jul 20, 2023 via email

@billwert billwert merged commit 0d8f074 into Azure:main Jul 21, 2023
@billwert billwert deleted the identity-keep-trying-dac-creds branch July 21, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DAC: do not stop trying with dev credentials until obtaining a valid token or completing the chain
7 participants