Search code examples
azure-devopsazure-blob-storageazurite

How do you run Azurite with oauth and a self signed certificate?


I'm trying to do some local testing using Azurite, which should enable me to do all the things I want to do against blob containers etc. I want to be able to used a managed identity as well and therefore use DefaultAzureCredential when creating the blob client.

I found this really useful article that explains all this. However, it assumes you're just kicking off Azurite yourself as you've downloaded it as an npm package. However, if you're using Visual Studio 2022 Azurite is built in and will 'just run' if you've got it setup as a service dependency. I don't know how I can therefore specify I want azurite to run with oauth and run with the cert specified. In other words I can't see how I can replicate this step in the article:

azurite --oauth basic --cert 127.0.0.1.pem --key 127.0.0.1-key.pem

'azurite' isn't a commandlet that is known as it's not an npm package. The Azurite 'README' also specifies to do this but doesn't say how.


Solution

  • I ended up using the docker image specified here. I then had to specify --oauth basic as an additional argument at the end. This seems to work.