gdal icon indicating copy to clipboard operation
gdal copied to clipboard

vsiaz - fail over for anonymous-access resources

Open wsmitchell3 opened this issue 5 months ago • 2 comments

What is the bug?

When accessing an Azure blob storage resource that has anonymous access available, an error is being thrown: Failed to open raster dataset [Failed to open raster dataset: AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN or AZURE_NO_SIGN_REQUEST configuration option not defined] Failed to open raster dataset [Failed to open raster dataset: AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN or AZURE_NO_SIGN_REQUEST configuration option not defined]

If it failed over to the vsicurl driver, this would be successful.

Steps to reproduce the issue

  1. Put COG in Azure Blob Storage
  2. Enable anonymous access at container level
  3. Use vsiaz to access COG with no credentials defined (fails)
  4. Use vsicurl to access COG (succeeds)

Versions and provenance

Windows 11, 3.11.0, from OSGeo4W

Additional context

Several desktop GIS clients use GDAL under the hood, and may not always provide options for the user to use the correct GDAL driver (either for a standalone layer or within a virtual raster). Adding this fail-over behavior at the GDAL level would fix the issues for the desktop clients.

wsmitchell3 avatar Aug 05 '25 21:08 wsmitchell3

Please add exact gdalinfo commands for repeating your steps 3 and 4.

Did you define the configuration options which are mentioned in the message: AZURE_STORAGE_ACCESS_KEY or AZURE_STORAGE_SAS_TOKEN or AZURE_NO_SIGN_REQUEST? I think the one for you would be --config AZURE_NO_SIGN_REQUEST=YES.

jratike80 avatar Aug 06 '25 06:08 jratike80

@wsmitchell3 , did you try --config AZURE_NO_SIGN_REQUEST=YES or the other options?

jratike80 avatar Oct 07 '25 13:10 jratike80