使用场景:对另一个项目中的 Managed Service for Apache Spark 集群进行访问权限控制
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页介绍了在部署和运行使用其他 Google Cloud 项目中的 Managed Service for Apache Spark 集群的流水线时,如何管理访问权限控制。
场景
默认情况下,当在Google Cloud 项目中启动 Cloud Data Fusion 实例时,该实例会使用同一项目中的 Managed Service for Apache Spark 集群来部署和运行流水线。不过,您的组织可能要求您使用其他项目中的集群。对于此使用情形,您必须管理项目之间的访问权限。以下页面介绍了如何更改基准(默认)配置并应用适当的访问权限控制。
对于此使用情形,请向 Managed Service for Apache Spark 项目中的服务账号授予 Cloud Data Fusion API Service Agent 角色。然后,在该项目中授予以下角色:
Compute Network User 角色
Dataproc Editor 角色
IAM:Managed Service for Apache Spark 服务账号
基准
使用场景
用于在 Managed Service for Apache Spark 集群中以作业形式运行流水线的服务账号。默认情况下,它是 Compute Engine 服务账号。
可选:在基准配置中,您可以将默认服务账号更改为同一项目中的其他服务账号。向新服务账号授予以下 IAM 角色:
Cloud Data Fusion Runner 角色。此角色允许 Managed Service for Apache Spark 与 Cloud Data Fusion API 通信。
Dataproc Worker 角色。此角色允许作业在 Managed Service for Apache Spark 集群上运行。
重点小结:
必须向新服务的 API 代理服务账号授予 Managed Service for Apache Spark 服务账号的“服务账号用户”角色,以便服务 API 代理可以使用该服务账号启动 Managed Service for Apache Spark 集群。
此使用情形示例假设您使用的是 Managed Service for Apache Spark 项目的默认 Compute Engine 服务账号 (PROJECT_NUMBER-compute@developer.gserviceaccount.com)。
向 Managed Service for Apache Spark 项目中的默认 Compute Engine 服务账号授予以下角色。
Dataproc Worker 角色
Storage Admin 角色(或至少是 `storage.buckets.create` 权限),以便 Managed Service for Apache Spark 为 BigQuery 创建临时存储桶。
BigQuery Job User 角色。此角色允许 Managed Service for Apache Spark 创建加载作业。作业默认在 Managed Service for Apache Spark 项目中创建。
BigQuery Dataset Editor 角色。此角色允许 Managed Service for Apache Spark 在加载数据时创建数据集。
向 Managed Service for Apache Spark 项目的默认 Compute Engine 服务账号上的 Cloud Data Fusion 服务账号授予 Service Account User 角色。此操作必须在 Managed Service for Apache Spark 项目中执行。
将 Managed Service for Apache Spark 项目的默认 Compute Engine 服务账号添加到 Cloud Data Fusion 项目。
另授予以下角色:
Storage Object Viewer 角色,用于从 Cloud Data Fusion Consumer 存储桶检索流水线作业相关制品。
Cloud Data Fusion Runner 角色,以便 Managed Service for Apache Spark 集群在运行时可以与 Cloud Data Fusion 通信。
API
基准
使用场景
启用 Cloud Data Fusion API 后,系统还会启用以下 API。如需详细了解这些 API,请前往项目中的“API 和服务”页面。