azure-sdk-for-go
azure-sdk-for-go copied to clipboard
In FindBlobsByTags API it encode space character to + which result in error from Azure
Bug Report
- import path of package azblob/url_service.go
- SDK version e.g.
master
,latest
,18.1.0
Description:
We are using FindBlobsByTags API in our application and we have an blob in Azure which have following tags TagKey Tag1 TagValue Val 1
After executing API we are getting following error FindBlobsByTag github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /extsrc/go_sdk/azure/0.14e/src/github.com/Azure/azure-storage-blob-go/azblob/zc_storage_error.go:42\n===== RESPONSE ERROR (ServiceCode=AuthenticationFailed) =====\nDescription=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. The MAC signature found in the HTTP request is not the same as any computed signature. Server used following string to sign: 'GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-client-request-id:bcd44ba7-54e3-443e-4aa3-58c33b55bf65\nx-ms-date:Sat, 05 Mar 2022 13:49:37 GMT\nx-ms-version:2020-10-02\n/{storage_account_name}/\ncomp:blobs\nwhere:@container={container_name}AND"Tag"='Val+1''.\n
Thank you for your feedback. This has been routed to the support team for assistance.
@ketanpp We are looking into it and get back to you for any additional information.
Just FYI. I have gone through code and one thing i found in filterBlobsCreateRequest it is Encoding param for Url using Encode method as follows req.Raw().URL.RawQuery = reqQP.Encode() as Encode() converts space to + which making problem at Azure I have tried to query blobs by tags using azure cli which invoke azure REST API and encode query parameter space to %20 So we can use url.PathEscape instead of Encode() method
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
Issue Details
Bug Report
- import path of package azblob/url_service.go
- SDK version e.g.
master
,latest
,18.1.0
Description:
We are using FindBlobsByTags API in our application and we have an blob in Azure which have following tags TagKey Tag1 TagValue Val 1
After executing API we are getting following error FindBlobsByTag github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /extsrc/go_sdk/azure/0.14e/src/github.com/Azure/azure-storage-blob-go/azblob/zc_storage_error.go:42\n===== RESPONSE ERROR (ServiceCode=AuthenticationFailed) =====\nDescription=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. The MAC signature found in the HTTP request is not the same as any computed signature. Server used following string to sign: 'GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-client-request-id:bcd44ba7-54e3-443e-4aa3-58c33b55bf65\nx-ms-date:Sat, 05 Mar 2022 13:49:37 GMT\nx-ms-version:2020-10-02\n/{storage_account_name}/\ncomp:blobs\nwhere:@container={container_name}AND"Tag"='Val+1''.\n
Author: | ketanpp |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Hi, I think I'm getting this one too (our tag values also contain space)
Hi @ketanpp, could you post the expression parameter you are passing into FindBlobsByTag?