我的 appengine 应用程序创建了云存储文件。这些文件将由第三方下载。这些文件包含个人医疗信息。
下载的首选方式是什么:
这两种解决方案都需要第三方登录(谷歌登录)。性能不是问题。隐私和安全错误和错误的发生。
使用加密的 zip 文件下载是一种选择。这意味着我必须将密码存储在项目中。或者通过电子邮件发送一个随机密码?
更新我用来创建签名下载 url 的 appengine 代码
import time
import urllib
from datetime import datetime, timedelta
from google.appengine.api import app_identity
import os
import base64
API_ACCESS_ENDPOINT = 'https://storage.googleapis.com'
# Use the default bucket in the cloud and not the local SDK one from app_identity
default_bucket = '%s.appspot.com' % os.environ['APPLICATION_ID'].split('~', 1)[1]
google_access_id = app_identity.get_service_account_name()
def sign_url(bucket_object, expires_after_seconds=60):
""" cloudstorage signed url to download …Run Code Online (Sandbox Code Playgroud) authentication google-app-engine acl blobstorage google-cloud-storage
我找不到如何使用Python在Google App Engine上实现Google Cloud Storage Signed Urls的简单示例。请编写分步指南。:)