Azure / azure-sdk-for-node

Azure SDK for Node.js - Documentation
https://github.com/Azure/azure-sdk-for-node#documentation
MIT License
1.19k stars 567 forks source link

AuthenticationFailed: Incorrect MAC signature on node.js 0.10 #645

Closed laktak closed 11 years ago

laktak commented 11 years ago

Dev Estimate: 5 Test Estimate: 3

The following sample works on 0.8.*:

var azure = require("azure");
var bs=azure.createBlobService();
bs.createContainerIfNotExists("blobtest", function(err) { if (err) return console.log(err); });

With node.js 0.10.0 I get this error:

[Error: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:7c216bd2-c096-4c97-ab20-7c9bab23bce5 Time:2013-03-12T12:20:14.5786882Z] code: 'AuthenticationFailed', message: 'Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:7c216bd2-c096-4c97-ab20-7c9bab23bce5\nTime:2013-03-12T12:20:14.5786882Z', authenticationerrordetail: 'The MAC signature found in the HTTP request \'38FEh9Xf1irPcg9ZYSTVnHOZfw5Ms5ZVa8/S91Nq+p0=\' is not the same as any computed signature. Server used following string to sign: \'PUT\n\n\n0\n\n\n\n\n\n\n\n\nx-ms-date:Tue, 12 Mar 2013 12:20:15 GMT\nx-ms-version:2011-08-18\n/uac2/blobtest%3Frestype=container\'.' }

markcowl commented 11 years ago

@viyano This is a known issue with 0.10.0. We are investigating support for 0.10, but for now, 0.8.x is the maximum supported version for the sdk

laktak commented 11 years ago

OK thank you.

fyi: I did compare the MAC that's computed for the given input string with v0.8 and it matches v0.10.

xuezhai commented 11 years ago

test it on 0.10.4, no error from the above code

altano commented 11 years ago

I'm still seeing this issue with 0.10.12. :(

cajones commented 11 years ago

I'm still seeing this with 0.8.26 :(

I've have reverted to 0.8.19 and everything seems OK.

andrerod commented 11 years ago

Could you share some more details in private @cajones ? andrerod AT microsoft DOT com

We do not see this issue at all with any of the accounts so i think there may be something you could be doing wrong ? (or something we do not know about)

Andre

andrerod commented 11 years ago

Did you setup the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables in the above snipet ?