简体   繁体   English

如何使用 Firebase 从移动设备访问尝试访问 Google Cloud 中的存储位置的日志?

[英]How can you access the log of attempts to access a storage location in Google Cloud done from a mobile device with Firebase?

The person who is using Firebase on a mobile device to upload files to Google Storage should have access to a log that reports each access attempt, the remote IP address, and the outcome of the access attempt.在移动设备上使用 Firebase 将文件上传到 Google 存储的人应该有权访问报告每次访问尝试的日志、远程 IP 地址以及访问尝试的结果。 I do not see this from my Firebase console.我没有从我的 Firebase 控制台看到这个。 This is a concern, since as someone with a bucket in the Google Cloud storage, I would like to see each attempt from a mobile device logged.这是一个问题,因为作为在谷歌云存储中拥有存储桶的人,我希望看到来自移动设备的每次尝试都被记录下来。 Right now it would help with debugging problems on the mobile device, but when a system goes into production, doesn't the owner of the bucket want to see each access attempt?现在它可以帮助调试移动设备上的问题,但是当系统投入生产时,存储桶的所有者不希望看到每次访问尝试吗?

I believe that you would need to use Audit logs, you need to activate them though, you can do this through you console with the menu at the top left, then you would need to access to IAM & Admin > audit logs, here you would need to find cloud storage, and change the configuration in order start logging this actions (I believe these logs cover all that you described), you can follow the link on [3] if you need more information about how to activate them.我相信您需要使用审计日志,但您需要激活它们,您可以通过控制台使用左上角的菜单来执行此操作,然后您需要访问 IAM & Admin > 审计日志,在这里您可以需要找到云存储,并更改配置以开始记录此操作(我相信这些日志涵盖了您描述的所有内容),如果您需要有关如何激活它们的更多信息,可以点击 [3] 上的链接。

In order to view the logs, you would need to go to logging > logs viewer, here you need to select your service (cloud storage) and then you can select the type of logs (audited logs).为了查看日志,您需要 go 到日志 > 日志查看器,在这里您需要 select 您的服务(云存储),然后您可以 Z99938282F04071859941E18F16EFCF42 类型的日志。

Here are some useful links that you could use if you need more information.如果您需要更多信息,可以使用以下一些有用的链接。

[1] https://cloud.google.com/storage/docs/access-logs [1] https://cloud.google.com/storage/docs/access-logs

[2] https://firebase.google.com/docs/storage/gcp-integration [2] https://firebase.google.com/docs/storage/gcp-integration

[3] https://cloud.google.com/logging/docs/audit/configure-data-access?hl=uk#config-console [3] https://cloud.google.com/logging/docs/audit/configure-data-access?hl=uk#config-console

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

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