I followed this article to setup file download/upload to an Azure storage account.
In addition to limiting the permissions on the storage account to the service principal of our power pages site, my company requires that our storage accounts be network restricted.
I was able to get the sample code working with my storage account being open to all networks, but I've been trying to figure out the best way to restrict it. Its my understanding that the file upload works by having the client side script call the power pages API, which in turn passes the file stream along to the storage account. This means that my users don't need network access to the storage account, but the power pages API does.
I haven't found much information on this so far, the best I've been able to come up with is to check the "Enable from selected virtual networks and IP addresses" setting under "Networking" on the storage account, then I provided the IP of the power pages API. I got the IP by digging it out of the storage account's logs, and later found that it is included in the IP ranges listed my Microsoft's "Azure IP Ranges and Service Tags" page. That list has dozens of IP ranges for my region, I'm assuming I'd have to whitelist them all.
|
I'm wondering if anyone has a better solution to allow the power pages API to reach a storage account that is not open to all networks.