【问题标题】:403 Server failed to authenticate the request while get azure storage data using soapui403 服务器在使用soapui 获取Azure 存储数据时未能对请求进行身份验证
【发布时间】:2020-08-23 18:29:32
【问题描述】:

我正在尝试使用soapUI 获取天蓝色存储表数据。这在邮递员中工作正常,但在soapUI中运行时发生错误。

在 Postman 中使用的 URL:

https://storagename.table.core.windows.net/tablename?$filter=CalUId%20eq%20'040000008200E00074C5B7101A82E0080000000030D26B53FE24D6010000000000000000100000005CC0FFC3A3676E4CB70214BB089618AE'&sv=2019-10-10&ss=t&srt=sco&sp=rl&se=2020-06-07T23:32:15Z&st=2020-05-07T15:32:15Z&spr=https&sig=nlrNa1GXTqQPOaKP3X3kDQ056S%2Bwq9Fl1Y%2BTS8A%2FAdQ%3D

SoapUI 中的请求:

GET https://storagename.table.core.windows.net/tablename?%24filter=CalUId%2520eq%2520%27040000008200E00074C5B7101A82E0080000000030D26B53FE24D6010000000000000000100000005CC0FFC3A3676E4CB70214BB089618AE%27&sv=2019-10-10&ss=t&srt=sco&sp=rl&se=2020-06-07T23%3A32%3A15Z&st=2020-05-07T15%3A32%3A15Z&spr=https&sig=nlrNa1GXTqQPOaKP3X3kDQ056S%25%252Bwq9Fl1Y%25%252BTS8A%25%252FAdQ%25%253D&accept=text%2F*%3Bq%3D0.3%2C%20text%2Fhtml%3Bq%3D0.7%2C%20text%2Fhtml%3Blevel%3D1%2Ctext%2Fhtml%3Blevel%3D2%3Bq%3D0.4%2C%20*%2F*%3Bq%3D0.5 HTTP/1.1
Accept-Encoding: gzip,deflate
Host: storagename.table.core.windows.net
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

SoapUI 中的错误响应:

HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Content-Length: 437
Content-Type: application/xml
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: f3375700-4002-0012-0c1d-25d9df000000
x-ms-error-code: AuthenticationFailed
Date: Fri, 08 May 2020 09:46:33 GMT

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code>AuthenticationFailed</code>
  <message xml:lang="en-US">Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:a15bcaa7-a002-001a-5f0c-25c3d0000000
Time:2020-05-08T07:43:20.2731207Z</message>
</error>

【问题讨论】:

  • 我无法重现此错误。我使用 SoapUI(社区版)在我的存储帐户中使用一个表进行了尝试,但它没有给我一个错误。我不得不添加“接受”请求标头。你能分享更多细节吗?您是否在同一台机器上运行这两种工具?您在两个工具中使用相同的 URL 吗?
  • 我在 Postman 和 SoapUI (5.5.0) 中使用完全相同的 URL。更新了完全错误的问题。
  • 您能否使用您在请求中使用的所有请求标头更新您的问题?
  • 完成。请检查。
  • 抱歉,我这边运气不好。不确定您是否可以这样做,但如果您可以分享实际的 SAS URL,我可以再试一次。只需在 cmets 中分享即可。

标签: groovy azure-storage soapui azure-table-storage


【解决方案1】:

在请求中添加接受标头将解决此问题。

accept */*

【讨论】:

    猜你喜欢
    • 2015-11-28
    • 2020-01-29
    • 2014-09-19
    • 1970-01-01
    • 2016-04-04
    • 2017-12-09
    • 1970-01-01
    • 2016-01-31
    • 2020-02-02
    相关资源
    最近更新 更多