簡體   English   中英

如果我已經擁有 Cloud Functions Admin 角色,為什么我需要 Cloud Functions Invoker 角色來運行雲函數?

[英]If I already have Cloud Functions Admin role, why do I need Cloud Functions Invoker role to run cloud functions?

我已在 IAM 權限設置中分配了 Cloud Functions 管理員角色。 我創建了一個可由 HTTP 調用的雲 function。 當我提出請求時,它會拋出

Error: Forbidden
Your client does not have permission to get URL /<function name> from this server.

顯然,我必須添加 Cloud Functions Invoker 角色才能調用雲函數,但這似乎沒有必要,因為我已經是 Cloud Functions 管理員,其權限肯定包含 Cloud Functions Invoker 中持有的任何權限。

這種奇怪的行為是正確的還是我走錯了路?


我現在添加了Owner角色以及Cloud Functions Admin ,它仍然會拋出相同的 403。

我已經使用npm install -g firebase-tools更新了我的 CLI - 現在在v11.8.0上。

我已添加allUsers主體以擁有Cloud Functions Invoker

我檢查了控制台中記錄的所有錯誤,並且gcf-artifacts has failed as the Artifact Registry API is not active. Please enable the API and try again. gcf-artifacts has failed as the Artifact Registry API is not active. Please enable the API and try again. - 但是,當我檢查工件注冊表 API 是否已啟用時,它是。

我現在正在嘗試使用本文啟用未經身份驗證的 HTTP function 調用,但是我在谷歌雲控制台中找不到配置面板。

在此處輸入圖像描述

如果您遇到同樣的問題並且已經完成了我上面的所有故障排除,只需刪除您的雲 function 並重新部署它。 就是這么簡單。 感謝谷歌 - 非常酷!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM