【发布时间】:2021-03-10 17:21:06
【问题描述】:
我在一个谷歌计算引擎项目中创建了一个新的虚拟机。创建 VM 后,我将“Compute Engine”访问范围更改为“Read Write”。
在现有的(长期运行的)VM 上,如果我这样做:
gcloud iam service-accounts list
我看到了项目的默认服务帐户。
但是,如果我在新创建的 VM 上执行相同的操作,则会收到错误消息:
gcloud iam service-accounts list
ERROR: (gcloud.iam.service-accounts.list) User [<service-account>] does not have permission to access projects instance [<project>] (or it may not exist): Request had insufficient authentication scopes.
原来的虚拟机是 ubuntu-16,新的虚拟机是 ubuntu-18 新从谷歌镜像创建的。
如果我查看项目 IAM 角色,我的用户具有以下角色:
- Access Approval Config Editor
- Compute Admin
- Role Viewer
- Service Account Admin
- Owner
- Organization Administrator
我错过了什么? 两个虚拟机的访问范围是一样的:
- Compute Engine Read Write
- Service Control Enabled
- Service Management Read Only
- Stackdriver Logging API Write Only
- Stackdriver Monitoring API Write Only
- Stackdriver Trace Write Only
- Storage Read Only
除了访问范围之外,还有什么控制单个 VM 的访问?
【问题讨论】:
标签: list permissions google-compute-engine roles google-cloud-iam