【问题标题】:When accessing Azure MSI IMDS endpoint in app service - getting error 'unable to connect to the remote server'在应用服务中访问 Azure MSI IMDS 端点时出现错误“无法连接到远程服务器”
【发布时间】:2018-12-23 16:24:02
【问题描述】:

我已经为应用服务启用了托管服务端点,并且能够看到环境中注入的 MSI_ENDPOINT 和 MSI_SECRET。在调用 MSI_ENDPoint 时,我也能够获得天蓝色的 AD 访问令牌。 但根据 Azure 文档 (https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview),我们必须使用 IMDS 端点。但是当使用 api-version 和元数据正确访问 URL http://169.254.169.254/metadata/identity/oauth2/token 时,通过 powershell 出现“无法连接到远程服务器”的错误 虽然在点击http://localhost:xxxx/MSI/token的MSI_Endpoint时能够从同一个powershell获取访问令牌

【问题讨论】:

    标签: azure azure-managed-identity


    【解决方案1】:

    IMDS(实例元数据服务)仅适用于 Azure 虚拟机和虚拟机规模集资源。您将无法从应用服务中调用 IMDS。从 localhost:xxxx 迁移到 IMDS 的文档仅与虚拟机和虚拟机规模集资源相关。

    Here 是特定于应用服务的文档。注意这里使用MSI_ENDPOINT

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-20
      • 2013-06-04
      • 2013-04-16
      • 2015-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多