Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

CLI managed identity authentication does not work with non-IMDS token endpoints or sytem-assigned managed identities

未关闭
#511 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
azure, csharp

调研方向

从 Microsoft.DevTunnels.Cli.Authentication.ManagedIdentityApp.AcquireTokenAsync 开始,将其 IMDS 请求与 Azure Container Apps 终结点的要求进行比较。考虑 IDENTITY_ENDPOINT 和 IDENTITY_HEADER,同时省略系统分配的标识的标识参数。完成标准是托管标识登录同时支持 IMDS 和非 IMDS 托管平台。

由索引模型根据 Issue 内容生成。

描述

devtunnel user login allows managed identity authentication using --mi-client-id, --mi-object-id or --mi-resource-id. The implementation in Microsoft.DevTunnels.Cli.Authentication.ManagedIdentityApp.AcquireTokenAsync tries to acquire an access token from the IMDS managed identity token endpoint http://169.254.169.254/metadata/identity/oauth2/token with the Metadata header.

This does not work with hosting platforms that expose managed identities on a different endpoint. For example Managed identities in Azure Container Apps expose the token endpoint at an endpoint defined in the environment variable IDENTITY_ENDPOINT, in practice this is always http://localhost:42356/msi/token. ACA also requires a x-identity-header with the value of the IDENTITY_HEADER environment variable.

This also does not work for system-assigned managed identities which require the object_id/client_id/msi_res_id parameters to be omitted.

Consider support for authenticating using managed identity on platforms with non-IMDS managed identity token endpoints.

主要语言
C#
星标
517
派生
54
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/dev-tunnels 的其他 Issue

查看 microsoft/dev-tunnels 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。