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

Add support for Azure Stack HCI IMDS Identity/token endpoint #22894

Open
bnichms opened this issue May 14, 2024 · 2 comments
Open

Add support for Azure Stack HCI IMDS Identity/token endpoint #22894

bnichms opened this issue May 14, 2024 · 2 comments
Assignees
Labels
Azure.Identity feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@bnichms
Copy link

bnichms commented May 14, 2024

Feature Request

My team owns the IMDS endpoint for Azure Stack HCI. Recently, we were working with another Azure team as they tried to implement MSI authentication utilizing our endpoint and it does not seem to be supported.

After that team and I looked through the code we see that support for our endpoint would work if not for the constant definition of the endpoint, and attempting to set environment variables so that the "HIMDS" code flow triggered also fails because of getAzureArcSecret().

The response for our endpoint is the same as Azure IMDS endpoint and contains an access token. And like Arc/HIMDS we also only support system-assigned identities (not user-defined). I am happy to engage in further talks if needed so that support can be brought to the Azure sdk.

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 14, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@chlowell chlowell added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team labels May 15, 2024
@jhendrixMSFT jhendrixMSFT removed the Client This issue points to a problem in the data-plane of the library. label May 15, 2024
@chlowell
Copy link
Contributor

Thanks for opening this issue! Azure Arc has a unique protocol for managed identity authentication. If Azure Stack HCI's protocol is truly identical to IMDS's, then you don't want to imitate Arc, only override azidentity's hardcoded IMDS endpoint. That isn't possible today, however it is possible in Azure SDK authentication libraries for other languages and we could implement their solution here.

The way it works for e.g. the Azure SDK for Python is the managed identity client uses the value of environment variable AZURE_POD_IDENTITY_AUTHORITY_HOST as the base IMDS URL. So, you set that variable and when in IMDS mode, the client sends token requests to $AZURE_POD_IDENTITY_AUTHORITY_HOST/metadata/identity/oauth2/token. The variable name is perhaps awkward for your case but the feature seems to do exactly what you want and it's straightforward for us to copy it to azidentity.

That said, I have a couple questions:

  1. Setting the variable name aside, would this feature work for Azure Stack HCI? Does its managed identity implementation have any different requirements or behaviors compared to IMDS?
  2. If this is the right feature, is AZURE_POD_IDENTITY_AUTHORITY_HOST an acceptable name or a blocker e.g. because users are responsible for setting it?

@RickWinter RickWinter added this to the Backlog milestone Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity feature-request This issue requires a new behavior in the product in order be resolved.
Projects
Status: In Progress
Development

No branches or pull requests

4 participants