【问题标题】:Unauthorized access to storage's table using API Management使用 API 管理对存储表进行未经授权的访问
【发布时间】:2023-02-03 02:56:12
【问题描述】:

我在我的 API 管理中将 MSI 配置为表存储:

然后,在 inboud 策略中,我将模拟 url 设置为表存储:

    <inbound>
        <base />
        <set-backend-service base-url="https://<storage>.table.core.windows.net/<table>()?$top=10" />
        <authentication-managed-identity resource="https://storage.azure.com/" />
    </inbound>

我看到,该令牌已正确获取:

我收到 403 回复如下:

{
    "response": {
        "status": {
            "code": 403,
            "reason": "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature."
        },

我的问题是,如何使用managed identityApi Management调用table存储?

【问题讨论】:

    标签: azure azure-storage azure-api-management azure-managed-identity


    【解决方案1】:

    只需将其添加到入站策略中:

    <set-header name="x-ms-version" exists-action="override">
        <value>@{string version = "2017-11-09"; return version;}</value>
    </set-header>
    

    【讨论】:

      猜你喜欢
      • 2014-05-09
      • 1970-01-01
      • 2016-09-05
      • 2016-08-12
      • 1970-01-01
      • 1970-01-01
      • 2017-02-26
      • 2020-04-10
      • 1970-01-01
      相关资源
      最近更新 更多