本頁面說明如何使用 VPC Service Controls 設定 Database Center,這項 Google Cloud 功能可保護資料和資源。
VPC Service Controls 可協助降低從 Database Center 執行個體竊取資料的風險。您可以使用 VPC Service Controls 建立服務範圍,保護您明確指定的服務資源和資料。
如要大致瞭解 VPC Service Controls、其安全性優點,以及支援產品的相關功能,請參閱「VPC Service Controls 總覽」。
事前準備
開始前,請先參閱「VPC Service Controls 總覽」和「使用 VPC Service Controls 時的資料庫中心限制」。接著,請按照下列步驟操作,確認您具備使用 VPC Service Controls 的正確權限。
前往 Google Cloud 控制台的「專案選取器」頁面。
- 選取或 建立 Google Cloud 專案。
- 請確認您已為 Google Cloud 專案啟用計費功能。瞭解如何 檢查專案是否已啟用計費功能。
- 啟用 Compute Engine API。
- 啟用 Service Networking API。
- 將 身分與存取權管理 (IAM) 角色新增至您用來設定及管理 VPC Service Controls 的使用者或服務帳戶。詳情請參閱「 用於管理 VPC Service Controls 的 IAM 角色」。
- 使用 VPC Service Controls 與 Database Center 時,請查看 限制。
如何使用 VPC Service Controls 保護 Database Center 服務
為 Database Center 專案設定 VPC Service Controls 的步驟如下:
-
首先,請選取要由服務範圍保護的 Database Center 專案,然後建立及管理服務範圍。
-
如要允許外部存取 perimeter 內受保護的資源,您可以使用存取層級。存取層級僅適用於來自服務範圍外的受保護資源存取要求。您無法使用存取層級,授權受保護的資源或 VM 存取範圍外的資料和服務。
建立及管理服務範圍
如要建立及管理服務安全防護範圍,請完成下列步驟:
選取要由服務範圍保護的資料庫中心專案。
按照「建立服務範圍」的指示操作。
在服務範圍中新增更多執行個體。如要將現有 Database Center 執行個體新增至 perimeter,請按照「更新服務範圍」一文中的操作說明進行。
將 API 新增至服務範圍。為降低資料從資料庫中心外洩的風險,您必須限制資料庫中心 API、Compute Engine API、Cloud Storage API、Container Registry API、Certificate Authority Service API 和 Cloud KMS API。詳情請參閱「
access-context-manager perimeters update」。如要將 API 新增為受限制的服務,請完成下列步驟:
控制台
- 前往 Google Cloud 控制台的「VPC Service Controls」頁面。
- 在「VPC Service Controls」頁面的資料表中,按一下要修改的服務範圍名稱。
- 按一下 [編輯]。
- 在「Edit VPC Service Perimeter」頁面中,按一下「Add Services」。
- 選取「資料庫中心」 (
databasecenter.googleapis.com)。 - 按一下 [儲存]。
gcloud
gcloud access-context-manager perimeters update PERIMETER_ID \ --policy=POLICY_ID \ --add-restricted-services=databasecenter.googleapis.com
- PERIMETER_ID:perimeter 的 ID 或完整 ID。
- POLICY_ID:存取權政策的 ID。
建立及管理存取層級
如要建立及管理存取層級,請按照「允許 perimeter 外的受保護資源存取要求」的說明操作。