Skip to content
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

async download_blob authenticationerror when equal sign '=' in the url #9783

Closed
gverkes opened this issue Feb 8, 2020 · 5 comments
Closed
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Milestone

Comments

@gverkes
Copy link

gverkes commented Feb 8, 2020

  • Package Name: azure-storage-blob
  • Package Version: 12.1.0
  • Operating System: Windows 10
  • Python Version: 3.7.3

Describe the bug
Whenever there is a blob that has a equal sign ('=') in the url the async BlobServiceClient will give me an AuthenticationError. The same file without the equal sign or using non-async BlobServiceClient works fine.

To Reproduce
The following code will give me a an authentication error AuthenticationErrorDetail:The MAC signature found in the HTTP request '...' is not the same as any computed signature.

from azure.storage.blob.aio import BlobServiceClient
blob_service_client = BlobServiceClient.from_connection_string(conn_str)

async with blob_service_client:
    container_client = blob_service_client.get_container_client("data")

    with open("./dl_test2/height=10.png", "wb") as f:
        stream = await container_client.download_blob("height=10.png")
        data = await stream.readall()
        f.write(data)

Whereas the following two work:

  1. without the equal sign in the url:
from azure.storage.blob.aio import BlobServiceClient
blob_service_client = BlobServiceClient.from_connection_string(conn_str)

async with blob_service_client:
    container_client = blob_service_client.get_container_client("data")

    with open("./dl_test2/height=10.png", "wb") as f:
        # exactly same file without the equal sign
        stream = await container_client.download_blob("height10.png")
        data = await stream.readall()
        f.write(data)
  1. using the non-async BlobServiceClient, with the equal sign in the url
from azure.storage.blob import BlobServiceClient
blob_service_client = BlobServiceClient.from_connection_string(conn_str)

async with blob_service_client:
    container_client = blob_service_client.get_container_client("data")

    with open("./dl_test2/height=10.png", "wb") as f:
        # with the equal sign
        stream = container_client.download_blob("height=10.png")
        data = stream.readall()
        f.write(data)
@kaerm kaerm added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files) labels Feb 10, 2020
@kaerm
Copy link
Contributor

kaerm commented Feb 10, 2020

Thanks for the feedback @gverkes, I am looping in the right team to take a look at this.

@xiafu-msft xiafu-msft self-assigned this Feb 13, 2020
@xiafu-msft
Copy link
Contributor

xiafu-msft commented Feb 14, 2020

Hi @gverkes

Thanks so much for reporting the problem and providing the detailed steps to reproduce that!
I was able to reproduce the problem. It should be a storage bug. we are still investigating that.
Sorry about the inconvenience...

@xiafu-msft
Copy link
Contributor

Created an issue in our dependency and see if they have any insight about this aio-libs/yarl#420

@Petermarcu Petermarcu added the Service Attention This issue is responsible by Azure service team. label Apr 17, 2020
@ghost
Copy link

ghost commented Apr 17, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@lmazuel lmazuel added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 4, 2020
@lmazuel lmazuel added this to the Backlog milestone May 5, 2020
@aviramha
Copy link
Contributor

Probably a duplicate of this #11028

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

7 participants