VPC Service Controls 可協助您降低服務資料遭竊的風險。 Google Cloud 您可以使用 VPC Service Controls 建立 service perimeter,保護您明確指定的服務資源和資料。
如要將 Looker (Google Cloud Core) 服務新增至 VPC Service Controls service perimeter,請按照「建立 service perimeter」說明文件頁面的操作說明建立 service perimeter,並在「指定要限制的服務」對話方塊中選取「Looker (Google Cloud Core) API」。如要進一步瞭解如何使用 VPC Service Controls,請參閱「VPC Service Controls 總覽」說明文件頁面。
VPC Service Controls 支援符合下列兩項條件的 Looker (Google Cloud Core) 執行個體:
必要的角色
如要瞭解設定 VPC Service Controls 時需具備的 IAM 角色,請參閱 VPC Service Controls 說明文件的「使用 IAM 控管存取權」頁面。
移除預設路徑
在Google Cloud VPC Service Controls 範圍內的專案中,或在新增至 VPC Service Controls 範圍的專案中建立 Looker (Google Cloud Core) 執行個體時,您必須移除連往網際網路的預設路徑。移除預設路徑後,傳出流量只會流向符合 VPC Service Controls 規範的服務。舉例來說,如果移除預設路徑,由於用於傳送電子郵件的 API 不符合 VPC Service Controls 規定,因此傳送電子郵件會失敗。
如要移除私人服務存取執行個體的網際網路預設路由,請選取下列任一選項:
gcloud
gcloud services vpc-peerings enable-vpc-service-controls --network=NETWORK --service=servicenetworking.googleapis.com
將 NETWORK 換成 Looker (Google Cloud Core) 執行個體的虛擬私有雲網路。
詳情請參閱「gcloud services vpc-peerings enable-vpc-service-controls」說明文件頁面。
REST
HTTP 方法和網址:
PATCH https://servicenetworking.googleapis.com/v1/{parent=services/*}:enableVpcServiceControls
JSON 要求主體:
{
"consumerNetwork": NETWORK
}
將 NETWORK 換成 Looker (Google Cloud Core) 執行個體的虛擬私有雲網路。
詳情請參閱「方法:services.enableVpcServiceControls」說明文件頁面。
連線至 VPC Service Controls 範圍外的資源或服務
如要連線至其他 Google Cloud 資源或服務,如果資源所在的專案位於 VPC Service Controls 範圍外,您可能需要設定輸入和輸出規則。
如要瞭解如何存取其他外部資源,請按照「使用私人服務存取權存取外部服務」或「使用 Private Service Connect 從 Looker (Google Cloud Core) 向南存取外部服務」說明文件頁面上的指示操作 (視執行個體是否使用私人服務存取權或 Private Service Connect 而定)。
將 CMEK 金鑰新增至 perimeter
有時,啟用客戶自行管理的加密金鑰 (CMEK) 的 Looker (Google Cloud Core) 執行個體,其 Cloud KMS 金鑰會託管在不同的 Google Cloud 專案中。在這種情況下,啟用 VPC Service Controls 時,您必須將 KMS 金鑰代管專案新增至安全防護範圍。