docker-volume-backup icon indicating copy to clipboard operation
docker-volume-backup copied to clipboard

Add option for Azure Blob Storage connection strings for authentication

Open bennyweise opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. I'm attempting to use this to backup to Azure Blob Storage, however the two connection options don't work particularly well for me. I can't use a managed identity as I am running things in my office lab, and I would prefer not to use the primary account credentials.

Describe the solution you'd like It would be great to be able to use an Azure Blob Storage connection string to authenticate, rather than primary account keys - primarily so we can reduce the scope of authorisation that is used for the backups.

Describe alternatives you've considered I'm also considering backing up locally and then running something else to write to the blob store - but would prefer if it could be incorporated into docker-volume-backup.

bennyweise avatar Feb 20 '24 00:02 bennyweise

I'm not an Azure user myself, so I don't know how this authentication method really works, however if you want to add the option to support it, I'm happy to merge a PR that adds it.

Documentation for the Go SDK is found here https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob#readme

m90 avatar Feb 20 '24 08:02 m90

A code sample is found here https://github.com/Azure/azure-sdk-for-go/blob/ec67edd9006dba369e8c0ab4164b8e77cfbc2e13/sdk/storage/azblob/examples_test.go#L152-L162

Client creation in this tool is happening here: https://github.com/offen/docker-volume-backup/blob/dd8ff5ee0cd61db055f73fc2352d6430c72c78b2/internal/storage/azure/azure.go#L52-L72

m90 avatar Feb 20 '24 08:02 m90

This is now possible in v2.39.0

m90 avatar Mar 08 '24 19:03 m90

Amazing, thanks so much! I had intended to have a crack at this, but hadn't yet got around to it.

bennyweise avatar Mar 10 '24 21:03 bennyweise