-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Intermittent ManagedIdentityCredential authentication failure #13894
Comments
Hello @ewh! I'm Daniel. I'll be doing my best to help you. Thank you for trying our libraries! We're working on improving the experience of
I will make a pull request fixing this on our side. We'll be discussing when to release this. If you always use How does this sound? Please let us know how else we can help 👍 |
Hi @sadasant. Thanks for the response. I tried an experiment using (In production we do not use Also, regarding "We'll be discussing when to release this.", do you know very roughly (days, weeks, months, years, centuries) when this PR might get released to NPM? Thanks! |
@ewh Hello again!
Yes! We'll be releasing a preview version on the first week of March and a GA with many updates on the first week of April.
No,
In the service, If it helps, you can build your own credential similar to the import { ChainedTokenCredential, AzureCliCredential, ManagedIdentityCredential } from "@azure/identity";
export class MyCredential extends ChainedTokenCredential {
constructor() {
super(new AzureCliCredential(), new ManagedIdentityCredential());
}
} Keep in mind that this example is very simple, but something similar can give you a customized experience. Let me know if this helps! Or if we can help in any other way. |
@sadasant Ok, this is good news. Thanks so much for your quick responsiveness! I think my own custom super(new AzureCliCredential(), new ManagedIdentityCredential()); If I'm running locally, the |
Question for you: Regarding your questions:
Looking forward for your response! |
@ewh also! If we provide you an alpha package tomorrow with the fix, would you be able to test it? It will have a weird version but it will come directly from NPM. |
This pull request makes the ManagedIdentityCredential: - Treat unreachable host as we were treating unreachable network. - This should have been done before, but we didn't catch it. - I couldn't find any other error that seemed relevant to me, using this as reference: [link](https://github.com/nodejs/node/blob/606df7c4e79324b9725bfcfe019a8b75bfa04c3f/deps/uv/src/win/error.c). - Treat errors with undefined status code as if the credential was unavailable, to avoid breaking the chained token credentials in that case. - Add tests (turns out that some where being skipped by mistake!) - Add more comments to improve reading. This PR: Fixes #13894
Hi @sadasant. Your reply responsiveness is AMAZING!
I am definitely willing to try the alpha package tomorrow. However, I'm not sure I can confirm if the alpha package fixes anything because my underlying issue with Yes, I think I have only hit this problem locally on my dev machine. |
@ewh sorry I closed this issue automatically! I'll keep it open until we're able to confirm we've definitely fixed this. Here's the alpha release that has the latest fix: https://www.npmjs.com/package/@azure/identity/v/1.2.4-alpha.20210223.1 Make sure to install it with something like I understand this is intermittent! But no rush. If it takes a couple of weeks that's fine. If you have the time, please try with this version and let us know if you find it more reliable. Thank you for your feedback and your time! We'll be looking forward for your response. |
@ewh hello again. We've released Identity 1.2.4, which includes a fix that should help for your case: https://www.npmjs.com/package/@azure/identity/v/1.2.4 I'll close the issue for the time being! Please let us know if anything else comes up. We're here to help! |
Hi @sadasant. I finally got around to testing this issue today (testing with the alpha release package you mentioned earlier). It appeared to completely address the issue! Thanks so much for your help with this! I'll upgrade to |
Thank you for letting us know, @ewh . You’re welcome here anytime! |
Describe the bug
(I do not know that this is an actual bug.) I frequently see 'ManagedIdentityCredential authentication failures' when using
DefaultAzureCredential
on my laptop. This behavior is highly intermittent and I don't know how to debug it.To Reproduce
Steps to reproduce the behavior:
az login
.DefaultAzureCredential
to try to establish an Azure auth identity.Comments
http://169.254.169.254
from my laptop!The text was updated successfully, but these errors were encountered: