本页面介绍您在 Cloud Marketplace 上购买和管理商业产品所需的 Identity and Access Management (IAM) 角色和权限。
借助 IAM,您可以通过定义谁(身份)对哪些资源具有哪种访问权限(角色)来管理访问权限控制。对于 Cloud Marketplace 上的商业应用, Google Cloud 组织中的用户需要 IAM 角色,才能注册 Cloud Marketplace 方案和更改结算方案。
准备工作
- 如需使用
gcloud
授予 Cloud Marketplace 角色和权限,请安装 gcloud CLI。否则,您可以使用 Google Cloud 控制台授予角色。
用于购买和管理产品的 IAM 角色
我们建议您为从 Cloud Marketplace 购买服务的用户分配 Billing Account Administrator IAM 角色。
用户如需访问这些服务,必须至少具有 Viewer 角色。
如需更精细地控制用户权限,您可以使用要授予的权限创建自定义角色。
产品专属要求
如需在 Google Cloud 项目中使用以下服务,您必须拥有 Project Editor 角色:
- Google Cloud Dataprep by Trifacta
- Neo4j Aura Professional
IAM 角色和权限列表
您可以为用户授予以下一个或多个 IAM 角色。根据您向用户授予的角色,您还必须将角色分配给 Google Cloud 结算账号、组织或项目。如需了解详情,请参阅向用户授予 IAM 角色部分。
Role | Permissions |
---|---|
Commerce Business Enablement Configuration Admin Beta( Admin of Various Provider Configuration resources |
|
Commerce Business Enablement PaymentConfig Admin Beta( Administration of Payment Configuration resource |
|
Commerce Business Enablement PaymentConfig Viewer Beta( Viewer of Payment Configuration resource |
|
Commerce Business Enablement Rebates Admin Beta( Provides admin access to rebates |
|
Commerce Business Enablement Rebates Viewer Beta( Provides read-only access to rebates |
|
Commerce Business Enablement Reseller Discount Admin Beta( Provides admin access to reseller discount offers |
|
Commerce Business Enablement Reseller Discount Viewer Beta( Provides read-only access to reseller discount offers |
|
Commerce Business Enablement Configuration Viewer Beta( Viewer of Various Provider Configuration resource |
|
向用户授予 IAM 角色
对于上表中的角色,您必须在结算账号或组织级层分配 consumerprocurement.orderAdmin
和 consumerprocurement.orderViewer
角色,必须在项目或组织级层分配 consumerprocurement.entitlementManager
和 consumerprocurement.entitlementViewer
角色。
如需使用 gcloud
为用户授予角色,请运行以下命令之一:
组织
您必须具有 resourcemanager.organizationAdmin
角色才能在组织级层分配角色。
gcloud organizations add-iam-policy-binding organization-id \
--member=member --role=role-id
占位值如下:
- organization-id:您要向其授予角色的组织的数字 ID。
- member:要向其授予访问权限的用户。
- role-id:上表中的角色 ID。
结算账号
您必须具有 billing.admin
角色才能在结算账号级层分配角色。
gcloud beta billing accounts set-iam-policy account-id \
policy-file
占位值如下:
- account-id:您的结算账号 ID,您可以从“管理结算账号”页面获得。
- policy-file:IAM 政策文件,采用 JSON 或 YAML 格式。政策文件必须包含上表中的角色 ID,以及要为其分配这些角色的用户。
项目
您必须具有 resourcemanager.folderAdmin
角色才能在项目级层分配角色。
gcloud projects add-iam-policy-binding project-id \
--member=member --role=role-id
占位值如下:
- project-id:要为其授予角色的项目。
- member:要向其授予访问权限的用户。
- role-id:上表中的角色 ID。
如需使用 Google Cloud 控制台向用户授予角色,请参阅关于授予、更改和撤消用户的访问权限的 IAM 文档。
将自定义角色与 Cloud Marketplace 搭配使用
如果您想精细控制您授予用户的权限,您可以使用授予的权限创建自定义角色。
如果您要为从 Cloud Marketplace 购买服务的用户创建自定义角色,该角色必须包含其用于购买服务的结算账号的以下权限:
billing.accounts.get
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.orders.get
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.orders.list
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.orders.place
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.accounts.get
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.accounts.list
,通常使用roles/consumerprocurement.orderAdmin
角色授予。consumerprocurement.accounts.create
,通常使用roles/consumerprocurement.orderAdmin
角色授予。
通过单点登录 (SSO) 访问合作伙伴网站
某些 Marketplace 产品支持通过单点登录 (SSO) 访问合作伙伴的外部网站。组织内的授权用户可以使用产品详情页面上的“在提供商网站上管理”按钮。点击此按钮后,系统会将用户转到合作伙伴的网站。在某些情况下,系统会提示用户“使用 Google 账号登录”。在其他情况下,用户会通过共享账号上下文登录。
如需使用 SSO 功能,用户需要导航到产品详情页面,然后选择适当的项目。该项目必须与购买该方案的结算账号关联。如需详细了解 Marketplace 方案管理,请参阅管理结算方案。
此外,用户必须在所选项目中拥有足够的 IAM 权限。对于大多数产品,目前需要 roles/consumerprocurement.entitlementManager
(或 roles/editor
基本角色)。
特定产品的最小权限
以下产品可以基于一组不同的权限运行,以便使用单点登录功能:
- Apache Kafka on Confluent Cloud
- DataStax Astra for Apache Cassandra
- Elastic Cloud
- Neo4j Aura Professional
- Redis Enterprise Cloud
对于这些产品,您可以使用以下最小权限:
consumerprocurement.entitlements.get
consumerprocurement.entitlements.list
serviceusage.services.get
serviceusage.services.list
resourcemanager.projects.get
这些权限通常通过 roles/consumerprocurement.entitlementManager
或 roles/consumerprocurement.entitlementViewer
角色授予。