[BUG][Azure.Identity] ManagedIdentityClient cache issue #23028
Labels
Azure.Identity
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Each ManagedIdentityClient object caches a ManagedIdentitySource instance, when initialized ImdsManagedIdentitySource try to probe the imds endpoint.
We uses pod identity to work with Managed Identity. We found sometimes ImdsManagedIdentitySource failed to probe imds endpoint due to temporary network issue.
When this happen, ManagedIdentityClient caches a default null ManagedIdentitySource, and all following token requests will get CredentialUnavailableException.
Is it ok to only cache good ManagedIdentitySource instance in ManagedIdentityClient? Then the retry code can work without the need to rebuild a new ManagedIdentityCredential.
Environment:
The text was updated successfully, but these errors were encountered: