我在Google App Engine日志中发现了一些奇怪的请求:
2620:0:1000:3001:1c2f:1188:9a2a:f8d8 – – [26 / Oct / 2015:16:29:55 -0700]“HEAD / an / object / path HTTP / 1.1”404 – – “curl / 7.35.0“”xxx.appspot.com“ms = 2 cpu_ms = 0 cpm_usd = 0 instance = – app_engine_release = 1.9.27 trace_id = –
其中/ an / object / path是Google云端存储默认存储区中对象的path,用户不应该知道该存储的path。
我尝试使用另一个帐户列出存储分区内容:
gsutil ls gs://xxx.appspot.com
这给“AccessDeniedException:403禁止”,和
https://storage.cloud.google.com/xxx.appspot.com/
这什么也没有显示
gsutil acl get gs://xxx.appspot.com / …
输出:
[ { "entity": "project-owners-1096471376163", "projectTeam": { "projectNumber": "1096471376163", "team": "owners" }, "role": "OWNER" }, { "entity": "project-editors-1096471376163", "projectTeam": { "projectNumber": "1096471376163", "team": "editors" }, "role": "OWNER" }, { "entity": "project-viewers-1096471376163", "projectTeam": { "projectNumber": "1096471376163", "team": "viewers" }, "role": "READER" }, { "entity": "user-00b4903a978e00507e97b8a0898de74c6896e15ea3bf3e4c4fcdcbc4eb209c8f", "entityId": "00b4903a978e00507e97b8a0898de74c6896e15ea3bf3e4c4fcdcbc4eb209c8f", "role": "OWNER" } ]
所以我也怀疑
假设我的账号被黑了,黑客可以直接拿到桶对象,他/她并不需要向GAE发送请求,所以2和3的机会也很高。
所以我想问一下我能用什么工具/命令来检查我的存储桶是否真的可以安全地访问公共访问。
对于案例3,也许还有许多其他帐户也受到影响。
正如文档中所解释的 ,你可以用gsutil来完成。
就像是 :
gsutil acl get gs://«path-to-object»
从我更新后的问题中可以看到,回顾刚刚链接的相同文档,可以看到返回意味着以下内容:
项目业主也有对象的所有权,
项目编辑也有对象的所有权,
项目观众也有对这个对象的读取权限,
首先上传对象的人对它拥有所有权。