-
Notifications
You must be signed in to change notification settings - Fork 219
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
MI doesn't work for environments that don't have a shell #2647
Comments
You need to set the environment variable This will prevent the |
Thanks for the response, @jmprieur . I've tried setting that environment variable in our helm chart. I can see this set on the environment variables list, but same failure occurs:
Can you confirm this is the right Environment Variable to set, please? Thanks! |
@jmprieur - any chance you can weigh in on this? |
@jmprieur - bump |
I think this was fixed in the latest version. |
@keegan-caruso. I believe this is done? |
Working through previews with a partner. Not on main yet. |
Microsoft.Identity.Web Library
Microsoft.Identity.Web.Certificate
Microsoft.Identity.Web version
latest
Web app
Not Applicable
Web API
Not Applicable
Token cache serialization
Not Applicable
Description
See here: https://github.com/AzureAD/microsoft-identity-web/blob/master/src/Microsoft.Identity.Web.Certificate/KeyVaultCertificateLoader.cs#L49-L53
Azure.Identity will fault if it cannot open a shell, distroless containers will not have a shell so they are guaranteed to fault.
There are options here: https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredentialoptions?view=azure-dotnet
That allow excluding flows from the authentication chain.
The ability to supply my own or modify the options should work.
Reproduction steps
Use MI on a container build from a distroless image.
Error message
AzureCliCredential authentication failed: An error occurred trying to start process '/bin/sh' with working directory '/bin/'. No such file or directory
Id Web logs
No response
Relevant code snippets
Regression
No response
Expected behavior
Able to use MI in distroless containers.
The text was updated successfully, but these errors were encountered: