使用 IAM 控管存取權
本頁說明如何使用 Identity and Access Management (IAM) 管理 Colab Enterprise 資源的存取權。如要管理其他 Vertex AI 資源的存取權,請參閱「在 Vertex AI 運用 IAM 進行存取控管」。
使用 IAM 控管筆記本存取權
您可以在專案層級或個別筆記本層級,管理 Colab Enterprise 筆記本 (IPYNB 檔案) 的存取權。
執行與其他 Google Cloud 服務互動的程式碼
筆記本存取權僅限於與筆記本互動的特定權限。舉例來說,您可以授予建立筆記本、在筆記本中編寫程式碼或刪除筆記本的權限。
如要執行與其他 Google Cloud 服務互動的程式碼,請使用下列其中一種方法:
在啟用使用者憑證的執行階段中執行程式碼。這表示筆記本與筆記本使用者具有相同的 Google Cloud 服務 Google Cloud 存取權。
執行程式碼,驗證及授權筆記本與Google Cloud 服務互動。
詳情請參閱「執行與 Google Cloud互動的程式碼」。
IAM 角色類型
在 Colab Enterprise 中可以使用不同類型的 IAM 角色:
預先定義的角色可讓您在專案層級,將一組相關權限授予 Colab Enterprise 資源。
基本角色 (擁有者、編輯者和檢視者) 可在專案層級控管 Colab Enterprise 資源的存取權,且適用於所有 Google Cloud服務。
自訂角色可讓您選擇特定的一組權限,使用這些權限建立您自己的角色,然後將該角色授予機構中的使用者。
如要在 Colab Enterprise 專案中新增、更新或移除這些角色,請參閱管理專案、資料夾和機構的存取權的說明文件。
Colab Enterprise 的預先定義角色
Colab Enterprise 是 Vertex AI 的一部分,且 Colab Enterprise 資源是透過 Vertex AI API 管理。因此,您可以透過 Vertex AI 角色,授予主體 Colab Enterprise 資源的存取權。
下表列出所有 Vertex AI 預先定義的角色。
如要使用預先定義的角色執行常見的 Colab Enterprise 作業,請參閱「Colab Enterprise 管理員」(
roles/aiplatform.colabEnterpriseAdmin) 和「Colab Enterprise 使用者」(roles/aiplatform.colabEnterpriseUser)。如要瞭解與執行階段管理相關的角色,請參閱「筆記本執行階段管理員」(
roles/aiplatform.notebookRuntimeAdmin) 和「筆記本執行階段使用者」(roles/aiplatform.notebookRuntimeUser)。Vertex AI 管理員 (
roles/aiplatform.admin)、Vertex AI 使用者 (roles/aiplatform.user) 和 Vertex AI 檢視者 (roles/aiplatform.viewer) 也包含 Colab Enterprise 權限。
| Role | Permissions |
|---|---|
Agent Platform Administrator( Grants full access to all resources in Agent Platform. |
|
Aiplatform Editor( Editor role for aiplatform |
|
Agent Platform Express User Beta( Grants user access to Agent Platform Express. |
|
Agent Platform User( Grants access to use all resource in Agent Platform. |
|
Agent Platform Viewer( Grants access to view all resource in Agent Platform. |
|
Colab Enterprise Admin( Admin role of using colab enterprise. |
|
Colab Enterprise User( User role of using colab enterprise. |
|
Agent Platform Feature Store EntityType owner( Provides full access to all permissions for a particular entity type resource. Lowest-level resources where you can grant this role:
|
|
Agent Platform Express Admin Beta( Grants admin access to Agent Platform Express. |
|
Agent Platform Feature Store Admin( Grants full access to all resources in Agent Platform Feature Store. Lowest-level resources where you can grant this role:
|
|
Agent Platform Feature Store Data Viewer( This role provides permissions to read Feature data. Lowest-level resources where you can grant this role:
|
|
Agent Platform Feature Store Data Writer( This role provides permissions to read and write Feature data. Lowest-level resources where you can grant this role:
|
|
Agent Platform Feature Store Instance Creator( Administrator of Featurestore resources, but not the child resources under Featurestores. Lowest-level resources where you can grant this role:
|
|
Agent Platform Feature Store Resource Viewer( Viewer of all resources in Agent Platform Feature Store but cannot make changes. Lowest-level resources where you can grant this role:
|
|
Agent Platform Feature Store User Beta( Deprecated. Use featurestoreAdmin instead. |
|
Agent Platform Memory Bank Editor Role( Grants edit access to Agent Platform Memory Bank. |
|
Agent Platform Memory Bank User Role( Grants full user access to Agent Platform Memory Bank. |
|
Agent Platform Memory Bank Viewer Role( Grants viewer access to Agent Platform Memory Bank. |
|
Agent Platform Migration Service User( Grants access to use migration service in Agent Platform |
|
Notebook Executor User Beta( Grants users full access to schedules and notebook execution jobs. |
|
Notebook Runtime Admin( Grants full access to all runtime templates and runtimes in Notebook Service. |
|
Notebook Runtime User( Grants users permissions to create runtime resources using a runtime template and manage the runtime resources they created. |
|
Vertex AI Platform Provisioned Throughput Admin Beta( Grants access to use all resources related to Vertex AI Provisioned Throughput |
|
Vertex AI Platform Publisher Provisioned Throughput Admin Beta( Grants Publisher access to use all resources related to Vertex AI Provisioned Throughput Orders |
|
Vertex AI Platform Publisher Provisioned Throughput Viewer Beta( Grants Publisher access to view all resources related to Vertex AI Provisioned Throughput Orders |
|
Agent Platform Sessions Editor Role( Grants edit access to Agent Platform Sessions. |
|
Agent Platform Sessions User Role( Grants full user access to Agent Platform Sessions. |
|
Agent Platform Sessions Viewer Role( Grants viewer access to Agent Platform Sessions |
|
Agent Platform Tensorboard Web App User Beta( Grants access to the Vertex AI TensorBoard web app. |
|
Service agent roles
Service agent roles should only be granted to service agents.
| Role | Permissions |
|---|---|
Vertex AI Agent Sandbox Service Agent( Vertex AI Service Agent used to access Agent Sandbox managed resources in consumer project with restricted permissions. |
|
Vertex AI Batch Prediction Service Agent( Vertex AI Batch Prediction Service Agent for serving batch prediction requests. |
|
Vertex AI Colab Service Agent( Gives Vertex AI Colab the proper permissions to function. |
|
Vertex AI Custom Code Service Agent( Gives Vertex AI Custom Code the proper permissions. |
|
Vertex AI Extension Custom Code Service Agent( Gives Vertex AI Extension that executes custom code the permissions it needs to function. |
|
Vertex AI Extension Service Agent( Gives Vertex AI Extension the permissions it needs to function. |
|
Vertex AI Model Monitoring Service Agent( Gives Vertex AI Model Monitoring the permissions it needs to function. |
|
Vertex AI Notebook Service Agent( Vertex AI Service Agent used to run Notebook managed resources in user project with restricted permissions. |
|
Vertex AI Online Prediction Service Agent( Gives Vertex AI Online Prediction the permissions it needs to function. |
|
Vertex AI RAG Data Service Agent( Vertex AI Service Agent used by Vertex RAG to access user imported data, Vertex AI, Document AI processors, and Vector Search in the project |
|
Vertex AI Rapid Eval Service Agent( Vertex AI Service Agent used by GenAI Rapid Evaluation Service to access publisher model endpoints in the user project |
|
Vertex AI Reasoning Engine Service Agent( Gives Vertex AI Reasoning Engine the proper permissions to function. The aiplatform.reasoningEngines.create IAM permission implies read access to the GCS objects of the consumer project through this service agent. |
|
Vertex AI Service Agent( Gives Vertex AI the permissions it needs to function. |
|
Vertex AI Telemetry Service Agent( Allows Vertex AI Telemetry Service Agent to access telemetry data. |
|
Vertex AI Tuning Service Agent( Vertex AI Service Agent used for tuning in user project. |
|
基本角色
舊版 Google Cloud 基本角色 Google Cloud 適用於所有服務。包括擁有者、編輯者和檢視者。
基本角色提供 Google Cloud的權限,不只是 Colab Enterprise。因此,建議您盡可能使用 Colab Enterprise 角色。
自訂角色
如果 Colab Enterprise 的預先定義 IAM 角色不符合您的需求,您可以定義自訂角色。自訂角色可讓您選擇特定的一組權限,使用這些權限建立您自己的角色,然後將該角色授予機構中的使用者。詳情請參閱「瞭解 IAM 自訂角色」。
Colab Enterprise 服務代理
Colab Enterprise 會自動建立及使用服務代理,代表您存取資源。建立服務代理程式時,系統會授予專案預先定義的角色。
下表列出 Colab Enterprise 服務專員、電子郵件地址和各自的角色:
| 名稱 | 適用於: | 電子郵件地址 | 角色 |
|---|---|---|---|
| Vertex AI 服務代理 | Vertex AI 功能 | service-PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com |
roles/aiplatform.serviceAgent |
| Vertex AI Colab 服務代理 | 授予 Colab Enterprise 運作所需的適當權限 | service-PROJECT_NUMBER@gcp-sa-vertex-nb.iam.gserviceaccount.com |
roles/aiplatform.colabServiceAgent |
| Vertex AI 筆記本服務代理 | 在使用者專案中執行筆記本代管資源,但權限受限 | service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com |
roles/aiplatform.notebookServiceAgent |
如果移除 Colab Enterprise 服務代理的預設角色,Colab Enterprise 可以自動重新指派這些角色,確保服務功能不會中斷。如要停用 Colab Enterprise 服務,請停用相關 API,而非移除角色。
Colab Enterprise 權限的安全考量
使用者建立 Colab Enterprise 筆記本時,系統會自動授予該筆記本的「程式碼擁有者」(roles/dataform.codeOwner) 角色。這項資源層級的角色授權與任何專案層級的 IAM 角色無關。
IAM 會以階層式方式整理政策:
- 使用者可以在專案 IAM 政策中擁有角色,這會自動傳播至專案中的所有資源。
- 使用者也可以在特定資源政策中擁有角色,例如個別筆記本。
如果使用者在資源政策或任何父項政策中擁有角色,就能存取資源。
如要完全撤銷使用者的存取權,管理員可以採取下列任一做法:
- 從每個個別記事本中移除使用者的角色。詳情請參閱「從筆記本移除資源層級的存取權」。
- 建立 IAM 拒絕政策,撤銷使用者在專案中所有資源的權限。