-
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] Handling all errors instead of just 403 in ManagedIdentitySource causes unexpected regression error #46709
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
I've hit the same issue. I updated my code to use In my case, I'm running an
|
Hi @nikolaia - would you be willing to validate that this version dev build from our public dev NuGet feed of Azure.Identity resolves the |
@christothes: I've tested with 1.14.0-alpha.20241022.1 and seem to hit the same issue:
Downgrading to 1.12.1 without any other change solves it:
|
Thanks @nikolaia - I'd like to confirm what the response looks like from the request to the IMDS endpoint, because the updated code should be handling responses like Would you mind providing the logging output (with any secrets redacted) after reproducing this with logging enabled? |
Hi @nikolaia. 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. |
|
Thanks - I got a local repro and I believe this is now fixed with #46787 |
@nikolaia Would you mind verifying with your repro also using this latest build? 1.14.0-alpha.20241023.3 |
@christothes seems to work fine with the latest alpha.20241023.3-package 🙌 :
|
This is now available on the public nuget as 1.13.1 |
Library name and version
Azure.Identity 1.13.0
Describe the bug
When updating from 1.12.1 to 1.13.0 I get a regression error with AzureDefaultCredential usage (in a .NET app) inside Github Actions using Federated Credentials for a UAI to migrate my database.
I'm relying on the AzureCliCredentials inside my action, but the following change seems to stop the credential chain because the github action has a endpoint that responds with Bad Request: https://github.com/Azure/azure-sdk-for-net/pull/45236/files#diff-72571e3cca761ecd73c5855b39621f8883c8ee115319a0ecbb629deb5b8c0513L85
Expected behavior
DefaultAzureCredentials() is not able to get a managed identity and proceeds through the default chain to AzureCliCredential
With 1.12.1 I get:
Actual behavior
The IMDS endpoint responds with 400 Bad Request and stops the chain.
With 1.13.0 I get:
Reproduction Steps
This is the code I use with Npsql inside my DbContext to get a token:
The config value is set in my Container App, but in the github action it logs in with a seperate UAI (with Federated Credentials setup up) that can do migrations on the database:
Environment
This is inside a Github Action:
The text was updated successfully, but these errors were encountered: