使用云端在 S3 上流式传输服务器端加密视频

Streaming server side encrypted videos on S3 with cloudfront

我正在使用亚马逊 S3 存储以及使用客户提供的密钥 (SSE-C) 的服务器端加密来存储视频文件。我使用 Django 作为我的后端服务器,并将与每个文件关联的所有名称密钥和密钥存储在 EC2 容器的数据库中。

我想使用亚马逊云端服务流式传输这些视频。我已经创建并配置了一个带有 S3 存储的云端分布。我能够非常轻松地提供非加密视频,但我无法访问加密视频,因为它需要名称密钥和密钥才能访问服务器端加密数据。

在这方面我找不到任何帮助。甚至可以使用云端服务服务器端加密 (SSE-C) 媒体文件吗?

如果可能,请指导我找到最佳解决方案。 在这方面的任何帮助将不胜感激。谢谢

it requires the name key and secret key in order to access the server side encrypted data.

这不是问题的全部;然而。 CloudFront signed URLs with an origin access identity 将透明地 re-sign 请求,这样当 CloudFront 断定请求已获得授权时,S3 将允许访问那些 objects,但您无法创建 CloudFront 签名的 URL与 SSE-C.

兼容

反过来,这是因为 S3 中的 SSE-C 不支持在查询字符串中向 S3 传递必要的参数。

When using the presigned URL to upload a new object, retrieve an existing object, or retrieve only object metadata, you must provide all the encryption headers in your client application

http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html

加密参数必须作为 headers 发送,而不是作为查询参数发送,SSE-C。

而且,如果您考虑一下,使用每次发出的请求都会显示 并记录 的密钥来加密 objects 似乎没有什么意义 --键将在查询字符串中。

SSE-S3 与 CloudFront 透明地协同工作。 SSE-KMS,我希望也能得到支持(因为根据 S3 API 文档,[=10] 不需要(或允许)encryption-related headers =] 请求)。

Encryption request headers, like x-amz-server-side-encryption, should not be sent for GET requests if your object uses server-side encryption with AWS KMS–managed encryption keys (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3)

http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html