Allow overriding endpoint for VirtualMachineManagedIdentityCredential via IDENTITY_ENDPOINT env var #2286
Labels
Azure.Identity
The azure_identity crate
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Milestone
Feature Summary
This would allow users to override the endpoint that this credential looks at to talk to IMDS/HIMDS when running on an Azure VM or Arc Enabled Server.
Feature Description
Other azure sdk implementations including the dotnet sdk will look at the
IDENTITY_ENDPOINT
environment variable as an override to determine where to reach IMDS/HIMDS. See here.This is an essential thing for any app running on an Arc enabled server in particular, because the Arc Agent configures that env var on installation so that applications can authenticate as the Arc Server correctly: https://learn.microsoft.com/en-us/azure/azure-arc/vmware-vsphere/azure-arc-agent
In the rust SDK the IMDS endpoint is currently hardcoded into the
VirtualMachineManagedIdentityCredential
implementation which wrapsImdsManagedIdentityCredential
.The proposal here is to allow overriding the endpoint via the
IDENTITY_ENDPOINT
env var either inImdsManagedIdentityCredential
or inVirtualMachineManagedIdentityCredential
(not sure what the long term vision is for hierarchy here).I'm happy to add this in myself if someone can point me to the preferred place to add it into the type hierarchy.
Use Case
No response
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: