vsiaz - fail over for anonymous-access resources
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
- Put COG in Azure Blob Storage
- Enable anonymous access at container level
- Use vsiaz to access COG with no credentials defined (fails)
- 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.
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.
@wsmitchell3 , did you try --config AZURE_NO_SIGN_REQUEST=YES or the other options?