BlobServiceClient timeout

Lorenz Weinzierl 21 Reputation points
2022-07-15T14:39:43.523+00:00

Problem: we are reaching a timeout error with the BlobServiceClient instead of receving a error that shows that the credentials are invalid:

from azure.storage.blob import BlobServiceClient

BlobServiceClient(account_url="sdf.blob.core.windows.net", credential="sdf").get_account_information()

Question: is there any way to validate such credentials without reaching a timeout error?

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
0 comments No comments
{count} votes

Accepted answer
  1. risolis 8,741 Reputation points
    2022-07-18T02:39:29.723+00:00

    Hello @Lorenz Weinzierl

    Thank you for your post.

    As per your case scenario description, I would like to advice you on how to review this in deep , so please see below:

    • Are you using Private Endpoint to reach your storage?
    • Did you configure Private DNS for the same?
    • Did you provide any role permission to this or are you using the owner user account?
    • Have you tried to use SAS for this storage?
    • Did you allow your IP address or IP range on the firewall tab on your storage account?

    When using a SAS string to access your storage, you can double check this by using Azure Explorer storage app and follow this:

    221702-image.png

    After that you will see this:

    221594-image.png

    furthermore, you will paste your SAS string to this section below:

    221647-image.png

    Finally, you will confirm if the issue is authentication or any other issue on this environment.

    I hope that was relevant to keep going with your task.

    Have a good one.

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


1 additional answer

Sort by: Most helpful
  1. Lorenz Weinzierl 21 Reputation points
    2022-07-26T16:06:33.47+00:00

    Hi @risolis

    Let me first try to answer your questions:

    Are you using Private Endpoint to reach your storage?

    • the endpoint we are using is sdf.blob.core.windows.net

    Did you configure Private DNS for the same?

    • no we do not configure this

    Did you provide any role permission to this or are you using the owner user account?

    • credentials are sdf, so an existing domain but invalid access key.

    Did you allow your IP address or IP range on the firewall tab on your storage account?

    • I assume we would need to do this on sdf account in our case which is not ours of course :)

    Let me give you some more information on the background of our problem:
    We are trying to build a validation logic to check if the credentials in combination with the URL are valid.

    During testing, we have tried using BobServiceClient with the account_url sdf.blob.core.windows.net and username "sdf"

    BlobServiceClient(account_url="sdf.blob.core.windows.net", credential="sdf").get_account_information()

    The problem we have is that instead of returning an error, the API times out after more than a minute.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.