Cloud Build 部署到 Firebase 的适当权限?

Proper permission for Cloud Build to deploy to Firebase?

official Google documentation and the Firebase CLI community builder docs 中的 Cloud Build 服务帐户推荐的权限不足:

  1. In the permissions table, locate the email ending with @cloudbuild.gserviceaccount.com, and click on the pencil icon.
  2. Add Cloud Build Service Account, Firebase Admin and API Keys Admin roles.

当我执行 firebase deploy:

时,我在 Cloud Build 中仍然收到以下错误

Error: HTTP Error: 403, The caller does not have permission

我尝试过的是不同的 Firebase IAM 角色,EditorOwner。到目前为止,只有 Owner 角色有效。这对于 Cloud Build 服务帐户来说权限太大了,并且违反了最小权限模型​​。

一切都在同一个 Google 云项目中。

有人知道如何解决这个问题吗?或者知道缺少哪个 role/permission?

tl;dr 似乎是已更正的“意外权限扩展”。

我可以将角色限制为:

  1. Cloud Build Service Account
  2. Firebase Admin
  3. API Keys Admin