【问题标题】:Permissions to create OAuth client ID in Google Cloud在 Google Cloud 中创建 OAuth 客户端 ID 的权限
【发布时间】:2019-11-20 14:34:31
【问题描述】:

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

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

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

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

【问题讨论】:

标签: google-cloud-platform oauth google-oauth


【解决方案1】:

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

我的建议是创建一个至少具有以下权限的custom role

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

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

【讨论】:

    【解决方案2】:

    您可以尝试创建一个具有clientauthconfig.*权限的自定义角色

    注意:根据https://cloud.google.com/iam/docs/custom-roles-permissions-support,这些权限处于测试阶段,因此请在投入生产之前彻底试用。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-04
      • 2018-09-06
      • 2019-08-12
      • 2023-03-17
      • 1970-01-01
      • 2020-10-13
      • 1970-01-01
      相关资源
      最近更新 更多