0

我们正在 Azure DevOps 扩展中构建一个自定义任务,我们希望picklist使用所选存储帐户的可用 blob 容器填充一个。

task.json特定的数据源绑定中定义如下:

"dataSourceBindings": [{
  "target": "Containers",
  "endpointId": "$(ConnectedServiceNameARM)",
  "dataSourceName": "AzureStorageContainer",
  "resultTemplate": "{ \"Value\" : \"{{ Name }}\", \"DisplayValue\" : \"{{ Name }}\" }",
  "parameters": {
  "storageAccount": "$(StorageAccountName)"
  }
}]

但是在使用任务 UI 期间执行时,服务端点代理返回以下错误:

{
    "result": [],
    "statusCode": "forbidden",
    "errorMessage": "Failed to query service connection API: 'https://mystorageaccount.blob.core.windows.net/?comp=list'. Status Code: 'Forbidden', Response from server: '<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:bf0c79e1-701e-00f7-7417-0fe758000000\nTime:2020-04-10T09:08:53.2050841Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request 'Bv31SGYbznN4gAzUMyrVHV3SfVxDUWHpvD5Zihn6IDM=' is not the same as any computed signature. Server used following string to sign: 'GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Fri, 10 Apr 2020 09:08:53 GMT\nx-ms-version:2017-04-17\n/mystorageaccount/\ncomp:list'.</AuthenticationErrorDetail></Error>'"
}

我们做错了什么?

4

0 回答 0