-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 forbidden error when createShareIfNotExists #490
Comments
There is a header Following are server side log for this request. Removed header value of info: NephosFile.exe: Info: Processing exception: Microsoft.Cis.Services.Nephos.Common.Authentication.AuthenticationFailureException : The MAC signature found in the HTTP request 'GEiI8aunitHfD+m13DS92yrv7/gnXTaoNaVuiVJIRGU=' is not the same as any computed signature. Server used following string to sign: 'HEAD............x-ms-client-request-id:e7fd9bb0-909e-11e8-871f-919af9f38dfd.x-ms-date:Thu, 26 Jul 2018 06:41:20 GMT.x-ms-request-source-ikey:[removed value in this GitHub Issue].x-ms-version:2018-03-28./cs1685ba005af8dx4b04x8f1/[removed value in this GitHub Issue].restype:share'. |
no idea of why the header was there. here's my code to make storage call, azure storage version:
|
@yungezz A similar issue microsoft/ApplicationInsights-node.js#143 |
thanks for investigation. Just curious, why the issue only reproducible on some machines, on majority cases, it works well. |
@yungezz sorry for the late response. It's hard to say without investigation, there maybe some plugins or other environments difference. |
@XiaoningLiu thanks for investigation. We've got more and more customer escalation on this issue. Our extension code didn't specify the header |
@XiaoningLiu any update on this? |
@yungezz azure-storage-node doesn't set the header. I cannot tell which VSC plugin or extension modify the request before sending out. You need some debugging to find out who modify this. Using shared key for authentication will force Azure Storage server check headers integrity, e.g. injecting headers will lead auth error. But one workaround is that you can use Azure Storage SAS token or OAuth token for authentication. |
@XiaoningLiu I did debug the extension, the extension has no way to add header to request to azure storage since we're calling sdk to make the call, you can see it from code snippet:
we'll try using SAS token to see if the error persistents. |
close this since sas workaround the issue. |
I have a vscode extension, which call createShareIfNotExists to createFileShare. While I found that on one of my laptop, this call always got 403 error, but this scenario is not reproachable on other machines.
I debugged the code, its' using correct account name and key(reason why it passed on other machine). I did some search found, storage auth might fail with 403 if time between service and request time stamp is out of sync. And I did see some time service error on that laptop.
actually my laptop date & time setting is in right time zone, right time. No idea why this 403 happens even with right accoutn name and key. below is sample call and response
The text was updated successfully, but these errors were encountered: