简体   繁体   English

为什么将HTTPS用于Azure Blob存储

[英]Why use HTTPS for Azure Blob Storage

I have an ASP.NET website which requires login and uses SSL on all pages to protect the user's credentials and authentication cookie. 我有一个ASP.NET网站,该网站要求登录并在所有页面上使用SSL来保护用户的凭据和身份验证Cookie。 Say one page has an image element with the following src : 假设一页的图像元素具有以下src

https://mystorageaccount.blob.core.windows.net/mycontainer/myimage.jpg?sv=...

This requests an image file from a private blob container on Azure Storage, using a time-limited Shared Access Signature. 这会使用限时的共享访问签名从Azure存储上的私有Blob容器中请求图像文件。 I don't particularly want this image to be intercepted. 我不特别希望此图像被截取。 However, is there any point in using HTTPS for this request? 但是,对于此请求使用HTTPS有什么意义吗? Surely a man-in-the-middle could just use the URL themselves within the SAS timescale to receive the image anyway? 当然,中间人可以只是在SAS时标内使用URL本身来接收图像吗?

I realise that a more secure option would be to fetch the image from storage server-side, and serve it only to authenticated users, but speed is important so I'd like to avoid this. 我意识到,更安全的选择是从存储服务器端获取映像,并将其仅提供给经过身份验证的用户,但是速度很重要,因此我想避免这种情况。 My question is, when the browser requests images from Azure Storage directly, is there any benefit in HTTPS or should I use HTTP instead? 我的问题是,当浏览器直接从Azure存储请求图像时,HTTPS是否有任何好处?还是应该改用HTTP?

With HTTPS the secure connection is done at the TCP layer before any HTTP traffic is transmitted. 使用HTTPS,在传输任何HTTP流量之前,在TCP层完成安全连接。 Only the host name and port number are submitted unsecured (since they are used to establish the TCP connection) and then once the secure connection is established then the remaining HTTP content (the path portion of the URL and any query parameters) is submitted securely over HTTPS. 仅主机名和端口号是不安全提交的(因为它们用于建立TCP连接),然后一旦建立了安全连接,其余的HTTP内容(URL的路径部分和任何查询参数)就会通过安全方式提交HTTPS。

This is all explained in the Wikipedia article for HTTPs - http://en.wikipedia.org/wiki/HTTPS . Wikipedia文章中的HTTPs- http://en.wikipedia.org/wiki/HTTPS都对此进行了解释。

I can definitely think of one benefit and that is avoiding Mixed Content warnings. 我绝对可以想到一个好处,那就是避免了混合内容警告。

Also, please note that if you're serving the content from the application server by fetching it from the storage first, you'll lose CDN benefits. 另外,请注意,如果要通过从存储中首先获取内容来从应用程序服务器提供内容,则会失去CDN的好处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM