mercredi 7 octobre 2015

Prevent direct access to Azure file except through Ember Application

I need to prevent access to a file that my application can display. We're running an Ember.js on Node (not Ember-cli yet), and the file is retrieved through an Ember model. The file itself, when uploaded through our application, is stored in Azure Blob Storage, and our application is hosted through Azure.

Azure Blob seems to have access controls, but all the tutorials are for .NET I think, and I am, at the moment, unable to map the process one to one as the tutorials such as http://ift.tt/1L6sGwq seem to use the SDK.

So, for example, I need to provide a link to access a .pdf file. I'm using an ember action to open it in a new tab, but the tab's url reads :

"http://ift.tt/1VDIKje"

And if I copy and paste this to another window, or another tab, I can easily access it.

Based on that, I have a couple of questions:

  1. Can I restrict access to this file except though our application? If so, is it only possible through .NET or is there is a javascript equivalent? How would I go about doing this?
  2. Is there a broader method to display a file, but restrict access to the url? The closest thing I can see so far is to open it in a new window and hide the address bar, but that makes it dangerously close to a popup + you can easily retrieve this url.



Aucun commentaire:

Enregistrer un commentaire