-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[BUG] ManagedIdentityCredential authentication failed: Status: 410 (Gone) #28568
Comments
//cc: @christothes |
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Hello, We had the exact same issue in the same environment. Being on version 1.5.0, it triggerred an exception similar to #24158. We will update to 1.6.0 in the meantime. |
Hi there, |
@christothes is there any plan to fix this? IMDS can return HTTP 410 by design and their documentation requires caller to retry up to 70 secs, but |
Just out of curiosity - how often are you seeing failures due to this error code (410)? I would think that it's rare. |
Hi @zhiweiv. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
@christothes, not super high rate, but enough to cause us troubles. It caused our services to have four sev3 incidents in the past 2 weeks alone. |
That's way more frequently than I would have guessed! We can add status 410 to the retry statuses, however we wouldn't want to extend the default retry timeout to accommodate the 70 second delay. The main reason being that in a local development scenario, we need the endpoint failure to fail fast. There is a workaround, however. You could supply a custom retry policy to the credentialOptions and customize the behavior for your specific scenario. See these docs for details |
Hi @zhiweiv, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
@christothes Thanks for getting this change in. Do you know if there's a target date/release for this yet? |
It should be released on the next monthly release, which is early next month. |
Library name and version
Azure.Identity 1.6.0
Describe the bug
Sometimes managed identity authentication failed due to 410 error from IMDS.
Expected behavior
Per https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux#frequently-asked-questions
410 is a retriable error, Azure.Identity should retry for better stability. I guess it is probably here:
azure-sdk-for-net/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs
Lines 151 to 162 in 068b3de
Environment
.net 6.0 console app in AKS Linux container
The text was updated successfully, but these errors were encountered: