-
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
[QUERY] DefaultAzureCredential authentication failed #10657
Comments
//cc: @schaabs |
Also see https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md#troubleshooting for how to troubleshoot requests and get more information that can help diagnose, and if Application Monitoring is enabled for your app you should get more information as well. It would be helpful to see other calls being made, since I'm wondering if this could be a dup of #9737 since our Azure.* builders make simultaneous async calls. /cc @pakrym for configuration builder. |
Thanks for looking at it, looks like pakrym beat me to formatting the stack. We don't have any code blocks. It is the ConfigBuilder that makes calls to the KeyVault to retrieve the secrets using the system assigned managed identity. Azure.Identity, Version 1.1.1.0 An extract of the web.config is as follows:
|
Based on their source, this is probably the same as #9737. As a temporary workaround - and if you only have 2 values (assuming that matches your use case) - can you disable greedy mode? From what I'm seeing in their implementation, it might alleviate the problem and probably not affect performance. Getting all secrets from a Key Vault still has to call to get each actual secret individual, though they run that in parallel. But depending on the size of the vault and given its low rate limit, may still be as slow or slower than trying to potentially fetch 2 secrets individually. |
Thanks for looking into this, we will try disabling Greedy. Will let you know how we get on. |
I also have a fix prepared and will get a servicing update out soon. |
Fixes Azure#9737 and fixes Azure#10657
Thanks very much for the fix. Just to note we tried changing Greedy to Strict but we still observed the same behaviour. |
I believe I have a fix and was hoping you could try it to verify before we release it, given the nature of this problem is impacted by machine and scenario differences.
Please let me know if this solves your problem and we'll get a release out on nuget.org. Thank you. |
We had one customer from the other bug verify the fix works, so you can use that for now. We want to do some additional testing to make sure we didn't regress anything and fixed all the related issues here, and will get a servicing release out on nuget.org shortly. |
Hello, apologies for the delay, I had been distracted by another problem. Deployed the new package and we are, unfortunately, observing, the same error. I verified the binary is being deployed and can see it being referenced in the latest Azure Diagnostics. |
Can you verify you are seeing our pipeline trace messages in your diagnostics (if not, see my link to troubleshooting steps above), and send my any events named Azure* via email so we can diagnose further? My email is my GitHub username @microsoft.com. |
Query/Question
I am not sure if this is a bug or not or even belongs here? The reason I am posting here is the stack trace from the kudu console. We are using key vault, secrets with config builders to update our web.config during pre-application start initialisation.
Environment:
We have followed a couple of how-tos :
https://docs.microsoft.com/en-us/azure/key-vault/vs-secure-secret-appsettings
https://docs.microsoft.com/en-us/azure/key-vault/managed-identity
https://docs.microsoft.com/en-us/azure/key-vault/overview-security#identity-and-access-management
We have set up the system assigned managed identity, and have given the managed identity RBAC role read to the keyvault, and applied the access policy to secrets (Get, List).
When looking at Azure Diagnostics on the key vault we see the Authentication event is successfult but then receive the httpStatusCode_d 401 and the following stack trace. Unfortunately, the we cannot get any more information that this.
If this is the wrong place, I hope someone can point us in the correct direction. We do have a support ticket open with Azure support, but because we cannot move forward with our test cycles, I am hoping to find some insight.
Here is the following stack trace:
Thanks
The text was updated successfully, but these errors were encountered: