google-app-engine - ndb.BlobProperty 与 BlobStore : which is more private and more secure

标签 google-app-engine python-2.7 google-cloud-datastore blobstore google-cloud-storage

我一直在阅读关于数据存储与 blobstore 存储和检索图像文件的所有 stackoverflow。一切都指向 blobstore,除了一个:隐私和安全。

在数据存储中,我的用户的照片是私有(private)的:我可以完全控制谁获得 blob。然而,在 blobstore 中,任何知道 url 的人都可以访问我的用户照片吗?是真的吗?

这里有一段话应该能让我安心,但它仍然不清楚。那么拥有 blob key 的任何人仍然可以访问照片吗? (来自Store Photos in Blobstore or as Blobs in Datastore - Which is better/more efficient /cheaper?)

the way you serve a value out of the Blobstore is to accept a request to the app, then respond with the X-AppEngine-BlobKey header with the key. App Engine intercepts the outgoing response and replaces the body with the Blobstore value streamed directly from the service. Because app logic sets the header in the first place, the app can implement any access control it wants. There is no default URL that serves values directly out of the Blobstore without app intervention.

所有这一切都是为了问:对于贩运图像,哪个更私密、更安全,为什么:数据存储或 blobstore?或者,嘿,google-cloud-storage(我目前对此一无所知)

最佳答案

如果您使用 google.appengine.api.images.get_serving_url 那么是的,the url returned is public .然而,返回的 url 不能从 blob 的键中猜测,甚至在调用 get_serving_url 之前该 url 也不存在。 (或在调用 delete_serving_url 之后)。

如果您需要对 blobstore 中的数据进行访问控制 you can write your own handlers并在那里添加访问控制。

关于google-app-engine - ndb.BlobProperty 与 BlobStore : which is more private and more secure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15551796/

相关文章:

java - Google Appengine 静态文件无法加载资源:net::ERR_CONTENT_DECODING_FAILED

java - Google Cloud Endpoints - API 未更新

google-app-engine - Google Cloud SDK 与 Google Cloud 客户端库

python - 通过将方法名称保存在 python 的 for 循环中的 var 中来连接到类方法

python - 图中图

node.js - 尝试在 Node js 中初始化 Google Cloud api 时,无服务器失败

google-app-engine - 如何在 Google App Engine 数据存储中创建引用列表?

python - 将 int 值平均分配到两个列表中,这两个列表的总和必须几乎相等

google-app-engine - 使用 Go 和 Datastore 查询数组

google-app-engine - App Engine 停机时间