locked
SAS URL used for secure download from a specific website RRS feed

  • Question

  • I am trying to store a file in a blob storage and then generate an SAS URL for a specific website (our companies) to allow others on the website to download the file.  I only want those on our website to be able to download the file.  I am new to using Azure and have been working with all its functions through the Azure Portal and the Explorer built into it.  If my understanding of documentation is correct, I can utilize the "Allowed IP addresses" function/field on the Generate SAS screen to do this.  I should be able to add my company website IP Address, then generate the URL, add the URL as a link onto our website, and that is all.  Now all downloads are restricted to requests coming from our website.  

    I tested this and it did not work for me so I must be missing something or not understanding how this works.  I have generated an SAS URL with no IP Address limitations to test functionality.  This worked.  I tested different permissions and time stamps and all passed.  I just need help getting (or understanding) the "Allowed IP addresses" to work.  

    Any help is appreciated.  

    Wednesday, May 23, 2018 2:58 PM

Answers

  • I have reviewed these.  After some more checking on things, I believe I have found the answer.  The SAS IP Address being sent to Azure is the originating IP Address of the user, not my website the user is on.  It was unclear to me which IP Address Azure was using and/or being sent.  

    Thanks for the help.  

    • Marked as answer by vikranth s Tuesday, May 29, 2018 1:46 PM
    Tuesday, May 29, 2018 1:19 PM

All replies

  • How exactly have you generated the SAS URI?

    Have you generated a Service SAS or an account SAS?

    Are you getting any error message?

    If you haven’t referred, refer the below documentations for detailed information on SAS:

    https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1

    Constructing an Account SAS

    Constructing a Service SAS

    Service SAS Examples

    Wednesday, May 23, 2018 5:54 PM
  • I have seen those documents.  For how I am doing this, they didn't help me much.  

    The process I took is as follows:

    Go to azure.portal.com, select Storage Accounts, then select the Container, then select the File.  Once the file is selected, I have some menu buttons on the top of the file (Save, Discard, Refresh, Download, etc.).  Right below those menu buttons are 4 Tabs (Overview, Snapshots, Edit Blobs, Generate SAS).  

    On the 4 Tabs described above, I select Generate SAS.  Once selected, I fill in the data and select Generate blob SAS Token and URL.  

    Again, this has worked for me if I do not specify and IP Address.  I have used this screen to specify a SAS URL that is time limited and that works just fine.  I want to be able use the IP Address field to allow downloads only from a particular website though.  

    I tried attaching a picture of the screen I use as described above but my email/Account has not been verified.  Once verified, I can attach one if that helps.  


    Wednesday, May 23, 2018 6:52 PM
  • Are you getting any error message while using the SAS with IP address?

    Verify your MSDN/TechNet forums account so that you can post images and links:

    http://social.technet.microsoft.com/wiki/contents/articles/15960.how-to-verify-your-msdntechnet-forums-account-so-that-you-can-post-images-and-links.aspx

    Thursday, May 24, 2018 1:19 PM
  • Just checking in if you have had a chance to see the previous response.  Could you share screenshots of the issue to understand/investigate this issue further?

    Tuesday, May 29, 2018 1:09 PM
  • I have reviewed these.  After some more checking on things, I believe I have found the answer.  The SAS IP Address being sent to Azure is the originating IP Address of the user, not my website the user is on.  It was unclear to me which IP Address Azure was using and/or being sent.  

    Thanks for the help.  

    • Marked as answer by vikranth s Tuesday, May 29, 2018 1:46 PM
    Tuesday, May 29, 2018 1:19 PM
  • I'm glad to hear that you resolve this issue. Thank you for sharing your solutions and experience here. It will be very beneficial for other community 

    Tuesday, May 29, 2018 1:46 PM