使用 IAM 控管存取權
本頁說明如何使用身分與存取權管理 (IAM) 管理 Colab Enterprise 資源的存取權。如要管理其他 Vertex AI 資源的存取權,請參閱「運用 IAM 執行 Vertex AI 存取控管」。
使用 IAM 控管 Notebook 的存取權
您可以在專案層級或個別筆記本層級管理 Colab Enterprise 筆記本 (IPYNB 檔案) 的存取權。
- 如要在專案層級授予 Notebook 存取權,請將一或多個角色指派給主體 (使用者、群組或服務帳戶)。
- 如要授予特定 Notebook 的存取權,請將一或多個角色指派給 Notebook 中的實體。詳情請參閱「管理筆記本存取權」。
執行與其他 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
)。如要瞭解與執行階段管理相關的角色,請參閱「Notebook 執行階段管理員」(
roles/aiplatform.notebookRuntimeAdmin
) 和「Notebook 執行階段使用者」(roles/aiplatform.notebookRuntimeUser
)。Vertex AI 管理員 (
roles/aiplatform.admin
)、Vertex AI 使用者 (roles/aiplatform.user
) 和 Vertex AI 檢視者 (roles/aiplatform.viewer
) 也包含 Colab Enterprise 權限。
Role | Permissions |
---|---|
Vertex AI Administrator( Grants full access to all resources in Vertex AI |
|
Vertex AI Batch Prediction Service Agent( Vertex AI Batch Prediction Service Agent for serving batch prediction requests. |
|
Colab Enterprise Admin( Admin role of using colab enterprise. |
|
Colab Enterprise User( User role of using colab enterprise. |
|
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 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:
|
|
Vertex AI Platform Express Admin Beta( Grants admin access to Vertex AI Express |
|
Vertex AI Platform Express User Beta( Grants user access to Vertex AI Express |
|
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 Feature Store Admin( Grants full access to all resources in Vertex AI Feature Store Lowest-level resources where you can grant this role:
|
|
Vertex AI Feature Store Data Viewer( This role provides permissions to read Feature data. Lowest-level resources where you can grant this role:
|
|
Vertex AI Feature Store Data Writer( This role provides permissions to read and write Feature data. Lowest-level resources where you can grant this role:
|
|
Vertex AI Feature Store Instance Creator( Administrator of Featurestore resources, but not the child resources under Featurestores. Lowest-level resources where you can grant this role:
|
|
Vertex AI Feature Store Resource Viewer( Viewer of all resources in Vertex AI Feature Store but cannot make changes. Lowest-level resources where you can grant this role:
|
|
Vertex AI Feature Store User Beta( Deprecated. Use featurestoreAdmin instead. |
|
Vertex AI Migration Service User( Grants access to use migration service in Vertex AI |
|
Vertex AI Model Monitoring Service Agent( Gives Vertex AI Model Monitoring the permissions it needs to function. |
|
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 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 Platform Provisioned Throughput Admin Beta( Grants access to use all resources related to Vertex AI Provisioned Throughput |
|
Vertex AI RAG Data Service Agent( Vertex AI Service Agent used by Vertex RAG to access user imported data, Vertex AI, Document AI processors 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 Tensorboard Web App User Beta( Grants access to the Vertex AI TensorBoard web app. |
|
Vertex AI Tuning Service Agent( Vertex AI Service Agent used for tuning in user project. |
|
Vertex AI User( Grants access to use all resource in Vertex AI |
|
Vertex AI Viewer( Grants access to view all resource in Vertex AI |
|
基本角色
舊版 Google Cloud 基本角色是所有 Google Cloud 服務通用的角色。這些角色包括擁有者、編輯者和檢視者。
基本角色會在 Google Cloud中提供權限,而不僅限於 Colab Enterprise。因此,請盡可能使用 Colab Enterprise 角色。
自訂角色
如果 Colab Enterprise 的預先定義 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,而非移除角色。