我尝试通过REST Api访问Windows Azure存储帐户时遇到身份验证问题。Windows Azure表REST Api身份验证
我已阅读以下资源,以确定如何生成的要求:只有4个在请求变量
http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx
http://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/
Azure Blob Service REST API returns 403 error: "Request date header not specified"
从我的理解: 确定服务端点的实际URI, GMT时间的当前日期 主要访问密钥 帐户名称。
我有两个来自MSDN资源,另外两个来自我的Windows Azure Portal。
GET http://<account_name>.table.core.windows.net/ HTTP/1.1 x-ms-date: Sun, 24 Feb 2013 09:19:31 GMT x-ms-version: 2009-09-19 Authorization: SharedKey <account_name>:<primary_key> Accept-Charset: UTF-8 Accept: application/atom+xml,application/xml DataServiceVersion: 1.0;NetFx MaxDataServiceVersion: 1.0;NetFx Host: <account_name>.table.core.windows.net
我检查,以确保帐户名和主键是正确的,而X-MS-日期戳是基于与其他职位的建议,在15分钟内。
我会收到以下消息:
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: d78c2c11-8699-4737-9592-82813eac356e
Date: Sun, 24 Feb 2013 21:20:03 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:d78c2c11-8699-4737-9592-82813eac356e
Time:2013-02-24T21:20:03.2036675Z</message>
</error>
上固定正确地认证的要求有什么建议?
此外,我能够下载Azure存储资源管理器实用程序并以这种方式访问服务,因此我知道存储帐户有效且正在工作。
我做了同样的事情,虽然它的工作原理并没有真正解释为什么原始请求失败。 此外,它带来了另外两个问题: 1. SharedKey和SharedKeyLite有什么区别? 这是我的理解ShareKeyLite只是基于用于生成哈希的信息的一个不太安全的SharedKey形式。 2.哪里可以找到Windows Azure Portal中的SharedKeyLite? 我发现的所有内容都是位于底部功能区中的“管理密钥”按钮,同时查看存储帐户页面。它只是通过执行base64手动生成的(sha1(something)) – 2013-02-27 06:36:28
是的,马特。天蓝色的问题有很多... – DmitryBLR 2013-02-27 11:02:51