Skip to content
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

Regression in ImdsManagedIdentitySource from Azure.Identity behavior for invalid json responses #5016

Open
christothes opened this issue Dec 10, 2024 · 0 comments

Comments

@christothes
Copy link

Prior to the migration of IMDS logic migration from Azure.Identity, when the IMDS endpoint returned invalid json, the exception thrown was distinguishable from other general failures such that it could be treated as if the IMDS endpoint was unavailable.

In the MSAL implementation of ImdsManagedIdentitySource.HandleResponseAsync the MsalError.ManagedIdentityRequestFailed error code is thrown unconditionally.

In the Azure.Identity implementation, when the response from IMDS cannot be parsed as valid json, a distinct exception is thrown so that we can handle it appropriately.

In the case of MSAL, perhaps a distinct MsalError could be used so that Azure.Identity could handle this in the same way as before to prevent the regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Committed High Priority
Development

No branches or pull requests

2 participants