首页 > 解决方案 > 在 Google Cloud 中创建 OAuth 客户端 ID 的权限

问题描述

我想在 GCP 中创建一些 OAuth 客户端 ID,但我没有一些权限。我收到警告“您无权创建 OAuth 客户端”

在此处输入图像描述

我可以简单地将我添加到该角色roles/owner并执行此操作,但我希望拥有诸如创建 OAuth 客户端 ID 的最小权限/角色之类的东西。我应该使用此列表中的哪些权限/角色?

https://cloud.google.com/iam/docs/understanding-roles#service_account_roles

我试过roles/iam.serviceAccountTokenCreator了,但它不起作用。

标签: google-cloud-platformoauthgoogle-oauth

解决方案


除了至少分配Viewer 角色以查看 Google Cloud Platform 项目和导航 Cloud Console之外,创建 OAuth 客户端的唯一相关权限clientauthconfig.clients.create应该是. 但请注意,除了创建它们之外,用户将无法删除或更新它们。

我的建议是创建一个至少具有以下权限的自定义角色:

clientauthconfig.clients.create
clientauthconfig.clients.createSecret
clientauthconfig.clients.delete
clientauthconfig.clients.get
clientauthconfig.clients.getWithSecret
clientauthconfig.clients.list
clientauthconfig.clients.listWithSecrets
clientauthconfig.clients.undelete
clientauthconfig.clients.update

并确保用户至少具有查看者角色以及分配的此自定义角色。


推荐阅读