Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.8k stars 320 forks source link

Connect via SAS connection string #104

Closed subesokun closed 3 years ago

subesokun commented 5 years ago

Hi, I'd like to know if it's possible to generate a SAS connection string via Azurite? So far I've been able to generate a SAS token but when using it within a connection string (e.g. SharedAccessSignature=<SAS>;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;) I always get the error that the connection string is malformed. Any ideas? Thanks a lot :)

edwin-huber commented 5 years ago

Hi, are you starting with the "-accountAuth" for auth option? Are you just using curl, or are you using an SDK?

It would help if you could provide more detailed steps to reproduce the errors that you see. Thanks, Edwin

subesokun commented 5 years ago

We're using the (latest) Python SDK for connecting to the storage account and starting the dockerized Azurite server with its default settings. The README didn't mention this -accountAuth flag but if there is such a flag, how can we set it in the Docker container?

Also just noticed in the README https://github.com/Azure/Azurite#blob-storage---api-implementation-status Account SAS Support [TODO] :/ Are there any indications when this feature will be available?

edwin-huber commented 5 years ago

If you are using the standard Docker Image that is linked in the documentation, AFAIK this is not yet updated with the latest release, and you need to build your own image.

SAS auth should be working... I'm just checking on some of the last kinks.

Regarding the -accountAuth option, you need to just override the default CMD used in the dockerfile: https://docs.docker.com/engine/reference/run/#overriding-dockerfile-image-defaults

But if you build it yourself, you can just modify the CMD command with the options that you need.

edwin-huber commented 3 years ago

SAS support added in v3