MAC signature found in HTTP request "..." does not match any computed signature

I am sending the following request to Postman to get a simple .jpg from Azure Blob storage at this URL https://steamo.blob.core.windows.net/testcontainer/dog.jpg

GET /testcontainer/dog.jpg HTTP/1.1
Host: steamo.blob.core.windows.net
Authorization: SharedKey steamo:<my access key>
x-ms-date: Tue, 26 May 2015 17:35:00 GMT
x-ms-version: 2014-02-14
Cache-Control: no-cache
Postman-Token: b1134f8a-1a03-152c-2810-9cb351efb9ce

      

If you're unfamiliar with Postman, it's just a REST client - the Postman-Token header can probably be ignored.

My access key was copied from my Azure Management Portal.

I am getting this error:

Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:2482503d-0001-0033-60da-9708ed000000 Time:2015-05-26T17:35:41.4577821Z

      

With this AutheticationErrorDetail:

The MAC signature found in the HTTP request '<my access key>' is not the same as any computed signature. Server used following string to sign: 'GET x-ms-date:Tue, 26 May 2015 17:35:00 GMT x-ms-version:2014-02-14 /steamo/testcontainer/dog.jpg'.

      

How to fix it? Let me know if you need more information from me.

+3


source to share


1 answer


Authentication to Azure Storage is not just a matter of providing an access token (which is not very secure). You need to create a signature string that represents the given request, sign the string with the HMAC-SHA256 algorithm (using the storage key for signing) and encode the result in base 64. See https://msdn.microsoft.com/en-us/library/ See azure / dd179428.aspx for full details, including how to build a signature line.



+5


source







All Articles