AzureStorageExplorer icon indicating copy to clipboard operation
AzureStorageExplorer copied to clipboard

Allow hinting correct schema and hostname for Azurite container

Open danegsta opened this issue 2 months ago • 6 comments

Problem

If an Azurite container is running with HTTPS support, the automatic detection logic can't connect to it

Desired Solution

I'd like to be able to hint (either via well known environment variables or container labels) the appropriate schema and address to use to connect to Azurite in a container

Alternatives and Workarounds

No response

Additional Context

No response

danegsta avatar Nov 11 '25 02:11 danegsta

I'm actively working on adding the ability to configure individual resources (such as Azurite containers) with HTTPS support, either via the ASP.NET development certificate or a custom user provided certificate. Storage Explorer currently assumes that container endpoints are always http://127.0.0.1, but that may not be valid in all cases anymore (may need to use https://localhost for certificates such as the .NET dev cert). Ideally I could add hints to the container itself via some well known config properties that could be retrieved when inspecting the container. That would allow the explorer to use the values from the container if present (otherwise falling back to http://127.0.0.1).

danegsta avatar Nov 11 '25 02:11 danegsta

We used localhost not too long ago, but I seem to recall that it did not work well.

craxal avatar Nov 11 '25 18:11 craxal

I've found that the .NET Storage SDK does NOT like localhost (it assumes anything that isn't an IP address MUST be a custom storage domain and tries to parse it as such).

danegsta avatar Nov 11 '25 18:11 danegsta

I'd still like to be able to at least hint at https vs http via some mechanism to allow lighting up HTTPS automatically when possible.

danegsta avatar Nov 11 '25 18:11 danegsta

If you are using HTTPS, you need to pass a --cert option to Azurite with the certificate file. These args are preserved in the container inspect data, which we already query for port info and custom accounts. So if we see the presence of that option, we can reasonably assume HTTPS is in use.

craxal avatar Nov 11 '25 19:11 craxal

Yeah, that would be a clean way to detect things since it would "just work" if someone manually setup a container for certificates.

danegsta avatar Nov 11 '25 19:11 danegsta