Add shared key support for private AzureBlobStorage#836
Add shared key support for private AzureBlobStorage#836FynnSchapdick wants to merge 4 commits intovelopack:developfrom
Conversation
|
Hi 👋 Just a gentle reminder regarding this PR. |
|
Thanks for taking the time to create this PR, contributions are always appreciated. I hadn't responded because I am still contemplating whether or not this is something I would accept and maintain. There's several parts of the code (BuildStringToSign, BuildCanonicalizedResource) which feel odd and brittle, my gut feeling is this can be simplified or reorganized to be more robust. From what I can tell, this could have been achieved by creating a custom IFileDownloader (possibly just deriving from HttpClientFileDownloader) rather than duplicating the logic in SimpleWebSource. We also have other languages (rust, c++, etc) for which we are trying to reach feature parity. There's also no tests, and improving test coverage/confidence is another goal of ours at the moment. If I'm thinking out loud, possibly the long term way to support sources like these is to have separate NuGet/other-lang packages (think a "Velopack.Sources.AzureStorage" package) that pull in official dependencies like the Azure Storage SDK. It's a bit of a hassle to maintain those packages but it would require us to understand, maintain and test less knowledge of those platforms. Given all of this, I've not yet decided if I want to move this forward, so I appreciate your patience. Since you are already able to use your custom source in your own application, I'm confident that there's no urgency here. P.S. no need to keep merging develop into your branch. There are no conflicts (if there were, you'd have seen so in the GitHub UI). If you do want to update your branch I'd prefer you rebase. |
✨ Add Azure Blob Storage update source with Shared Key authentication
Summary
This PR introduces a new
AzureBlobStorageSourceimplementation ofIUpdateSourceto enable retrieving Velopack updates from Azure Blob Storage containers secured via Shared Key authentication.Motivation
The existing
SimpleWebSourceworks well for publicly accessible endpoints, but does not support authenticated sources.Azure Blob Storage is a common deployment target for update packages, and many setups require authenticated access (e.g. private containers). This change enables Velopack to securely fetch updates directly from Azure Storage without requiring SAS URLs or public exposure.
What’s included
New
AzureBlobStorageSourceimplementationSupport for:
GETrequests using Shared KeyRELEASESfeedAutomatic signing of requests based on:
x-ms-datex-ms-versionImplementation details
Follows the official Azure Storage REST API specification for Shared Key authentication:
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
Implements:
Reuses existing
IFileDownloaderabstraction for HTTP requestsNotes / Limitations
Future improvements (optional)
Usage example