Google Cloud Policy Troubleshooter说,尽管在IAM中分配了服务帐户,但该帐户没有权限 [英] Google Cloud Policy Troubleshooter says service account doesn't have permissions despite being assigned in IAM

查看:82
本文介绍了Google Cloud Policy Troubleshooter说,尽管在IAM中分配了服务帐户,但该帐户没有权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已添加了角色"Cloud Tasks Enqueuer",到我的project-id@appspot.gserviceaccount.com服务帐户(请参阅第一个屏幕截图).但是,当我尝试检查帐户是否有权调用"cloudtasks.tasks.create"时,它表示服务帐户缺少cloudtasks.enquerer角色(第二张屏幕截图).怎么了?

(注意:我正在添加此角色来尝试解决其他问题,解决方案

糟糕,原来我有两个名称相似的项目,我感到困惑. Firebase项目是通过Firebase创建的,project-prod,而Google Cloud项目是通过Google Cloud创建的,project.

因此,我为正确的服务帐户授予了权限,但为错误的项目授予了权限.调试器工作正常!

I have added the role "Cloud Tasks Enqueuer" to my project-id@appspot.gserviceaccount.com service account (see first screenshot). However, when I try and check if the account has permission to call "cloudtasks.tasks.create" it says that the service account lacks the cloudtasks.enquerer role (second screenshot). What is going wrong?

(note: I am adding this role to try and solve my other question, creating Google Cloud Task in a firebase function)

解决方案

Whoops, turned out that I had two projects with similar names, and I got confused. The firebase project was project-prod created through firebase, and the google cloud project was project created through google cloud.

Therefore, I granted permissions to the correct service account but for the wrong project. The debugger was working correctly!

这篇关于Google Cloud Policy Troubleshooter说,尽管在IAM中分配了服务帐户,但该帐户没有权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆