根據預設,Security Command Center 會加密靜態儲存的客戶內容。Security Command Center 會為您處理加密作業,您不必採取任何其他動作。這項做法稱為「Google 預設加密」。
如要控管加密金鑰,您可以在 Cloud KMS 中使用客戶自行管理的加密金鑰 (CMEK),並搭配整合 CMEK 的服務 (包括 Security Command Center)。使用 Cloud KMS 金鑰可控管保護等級、位置、輪替時間表、使用權限和存取權,以及加密範圍。 使用 Cloud KMS 還可追蹤金鑰用量、查看稽核記錄,以及控管金鑰生命週期。 您可以在 Cloud KMS 中控制及管理用來保護您資料的對稱金鑰加密金鑰 (KEK),而不是由 Google 擁有及管理。
使用 CMEK 設定資源後,存取 Security Command Center 資源的體驗與使用 Google 預設加密類似。如要進一步瞭解加密選項,請參閱「客戶管理的加密金鑰 (CMEK)」。
為支援職責分離,並進一步控管金鑰存取權,建議您在不含其他 Google Cloud 資源的獨立專案中建立及管理金鑰。
在 Security Command Center 中使用 CMEK 時,專案可能會耗用 Cloud KMS 密碼編譯要求配額。在 Security Command Center 中讀取或寫入資料時,以 CMEK 加密的執行個體會耗用配額。 只有在使用硬體 (Cloud HSM) 或外部 (Cloud EKM) 金鑰時,使用 CMEK 金鑰的加密和解密作業才會影響 Cloud KMS 配額。 詳情請參閱 Cloud KMS 配額。如要搭配 CMEK 使用 Security Command Center,您必須在啟用 Security Command Center 機構時選擇 CMEK。啟用 Security Command Center 後,您就無法再設定資料加密。在專案層級啟用時,無法設定 CMEK。詳情請參閱下列資源:
啟用 Security Command Center 時,您可以透過 CMEK 機構政策強制執行所選的加密設定。如要瞭解如何搭配使用 CMEK 組織政策與 Security Command Center,請參閱「使用 CMEK 組織政策」。
CMEK 會加密 Security Command Center 和 Security Command Center API 中的下列資料:
- 發現項目
- 通知設定
- BigQuery 匯出
- 忽略設定
事前準備
為 Security Command Center 設定 CMEK 前,請先完成下列步驟:
安裝並初始化 Google Cloud CLI:
-
Install the Google Cloud CLI.
-
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
建立啟用 Cloud KMS 的專案。 Google Cloud 這是您的重要專案。
在正確位置建立金鑰環。金鑰環位置必須與您打算啟用 Security Command Center 的位置相符。如要查看每個 Security Command Center 位置對應的鑰匙圈位置,請參閱本文「主要位置」一節中的表格。如要進一步瞭解如何建立金鑰環,請參閱「建立金鑰環」。
在金鑰環上建立 Cloud KMS 金鑰。如要進一步瞭解如何在金鑰環上建立金鑰,請參閱「建立金鑰」。
為確保 Cloud Security Command Center 服務帳戶具備加密及解密資料的必要權限,請管理員授予 Cloud Security Command Center 服務帳戶 Cloud KMS 金鑰的 Cloud KMS CryptoKey 加密者/解密者 (roles/cloudkms.cryptoKeyEncrypterDecrypter) IAM 角色。
管理員或許也能透過自訂角色或其他預先定義的角色,將必要權限授予 Cloud Security Command Center 服務帳戶。
金鑰位置
Cloud KMS 金鑰位置必須與您啟用 Security Command Center 的位置相符。下表列出各個 Security Command Center 位置對應的 Cloud KMS 金鑰位置。
| Security Command Center 位置 | Cloud KMS 金鑰位置 |
|---|---|
eu |
europe |
global |
us |
sa |
me-central2 |
us |
us |
如果您在啟用 Security Command Center 時未啟用資料落地設定,請使用 global 做為 Security Command Center 位置,並使用 us 做為 Cloud KMS 金鑰位置。如要進一步瞭解資料落地,請參閱「規劃資料落地」。
如果您搭配使用 constraints/gcp.restrictNonCmekServices 機構政策限制和 Security Command Center,則只能選擇 CMEK 加密。
限制
使用 CMEK 時,Security Command Center 有下列限制:
- 如果您已在要啟用的機構或機構內的專案中啟用 Security Command Center,就無法在該機構的 Security Command Center 中使用 CMEK。
- 在專案層級啟用時,無法設定 CMEK。
啟用 Security Command Center 後,您就無法變更 Cloud KMS 金鑰或切換至Google-owned and Google-managed encryption key 。
您可以輪替金鑰,讓 Security Command Center 使用新的金鑰版本。不過,部分 Security Command Center 功能仍會使用舊金鑰 30 天。
搭配使用 CMEK 機構政策與 Security Command Center
如要強制 Security Command Center 使用 CMEK,您可以在機構、資料夾或專案層級套用下列機構政策:
constraints/gcp.restrictNonCmekServices,這需要使用 CMEK。 如果您在機構中設定constraints/gcp.restrictNonCmekServices,並將 Security Command Center 列為必須使用 CMEK 的受限服務,則啟用 Security Command Center 時必須使用 CMEK。constraints/gcp.restrictCmekCryptoKeyProjects,使用 CMEK 和 Security Command Center 時,您必須使用特定專案或一組專案的金鑰。constraints/gcp.restrictCmekCryptoKeyProjects機構政策本身仍允許您選擇 Google 預設加密機制。
如果您在啟用 Security Command Center 的機構中同時設定 constraints/gcp.restrictNonCmekServices 和 constraints/gcp.restrictCmekCryptoKeyProjects,Security Command Center 會要求您使用 CMEK,且 CMEK 金鑰必須位於特定專案中。
如果您在專案或資料夾中設定 constraints/gcp.restrictNonCmekServices,則必須在啟用 Security Command Center 的機構中,使用 CMEK 並將 Security Command Center 列為受限服務,否則部分 Security Command Center 功能將無法正常運作。
如要瞭解系統如何在Google Cloud 資源階層 (機構、資料夾和專案) 中評估機構政策,請參閱「瞭解階層評估」。
如要瞭解如何使用 CMEK 組織政策,請參閱「CMEK 組織政策」。
為 Security Command Center 設定 CMEK
如要搭配 Security Command Center 使用 CMEK,請按照下列步驟操作:
- 為組織啟用 Security Command Center 時,請選取「編輯資料加密」。 「編輯資料加密設定」窗格隨即開啟。
- 選取「Cloud KMS 金鑰」。
- 選取專案。
- 選取金鑰。您可以從任何 Google Cloud 專案選取金鑰,包括其他機構的專案。清單中只會顯示相容地點的鑰匙。如要進一步瞭解 Security Command Center 的 CMEK 金鑰位置,請參閱「金鑰位置」一節中的表格。
- 按一下「完成」,繼續啟用 Security Command Center。
為貴機構啟用 Security Command Center 後,Security Command Center 會使用您選擇的 Cloud KMS 金鑰加密資料。
檢查 CMEK 設定
如要確認您已為 Security Command Center 成功設定 CMEK,請按照下列步驟操作:
- 在 Security Command Center 中選取「設定」。
- 前往「層級詳細資料」分頁。
- 前往「設定詳細資料」>「資料加密」,即可查看金鑰名稱。如果已設定 Security Command Center 的 CMEK,金鑰名稱會顯示在「資料加密」後方,並以連結形式呈現。
排解 Security Command Center 的 CMEK 問題
在 Security Command Center Standard 和 Premium 中啟用 CMEK 不會產生額外費用,但 Security Command Center 使用 CMEK 加密及解密資料時,Cloud KMS 會收取費用。詳情請參閱 Cloud KMS 定價。
還原 Security Command Center 的存取權
啟用 CMEK 後,Security Command Center 服務帳戶必須有權存取 Cloud KMS 金鑰,才能正常運作。請勿撤銷服務帳戶對 CMEK 的權限、停用 CMEK 或排定 CMEK 的銷毀時間。這些動作都會導致下列 Security Command Center 功能停止運作:
- 發現項目
- 持續匯出設定
- BigQuery 匯出
- 忽略規則
如果您嘗試使用 Security Command Center 時,Cloud KMS 金鑰無法使用,系統會顯示錯誤訊息或 FAILED_PRECONDITION API 錯誤。
如果 Cloud KMS 金鑰發生下列任一問題,您可能會無法使用 Security Command Center 功能:
- 服務帳戶的金鑰可能已撤銷 Cloud KMS CryptoKey Encrypter/Decrypter 角色。您可以在金鑰遭撤銷後還原 Security Command Center 的存取權。
- Cloud KMS 金鑰可能已停用。金鑰停用後,您可以還原 Security Command Center 的存取權。
- 金鑰可能已排定刪除時間。您可以在金鑰排定銷毀時間後還原 Security Command Center 的存取權。
在金鑰遭撤銷後還原 Security Command Center 的存取權
如要還原 Security Command Center 中金鑰的存取權,請將金鑰的 Cloud KMS CryptoKey Encrypter/Decrypter 角色授予 Cloud Security Command Center 服務帳戶:
gcloud kms keys add-iam-policy-binding KEY_NAME \
--keyring KEY_RING \
--location LOCATION \
--member=serviceAccount:service-org-ORG_NUMBER@security-center-api.iam.gserviceaccount.com \
--role=roles/cloudkms.cryptoKeyEncrypterDecrypter
更改下列內容:
- KEY_RING:Cloud KMS 金鑰的金鑰環
- LOCATION:Cloud KMS 金鑰的位置
- KEY_NAME:Cloud KMS 金鑰的名稱
- ORG_NUMBER:您的機構號碼
在停用金鑰後還原 Security Command Center 的存取權
如要進一步瞭解如何啟用已停用的金鑰,請參閱「啟用金鑰版本」。
在排定刪除金鑰後還原 Security Command Center 的存取權
如要進一步瞭解如何還原已排定刪除的金鑰,請參閱「刪除與還原金鑰版本」一文。
金鑰刪除後就無法復原,也無法還原 Security Command Center 的存取權。
建立受保護資源時發生錯誤
如果建立新發現項目、通知設定、靜音設定或 BigQuery 匯出作業時發生錯誤,請檢查是否為機構或該機構中的任何專案或資料夾設定 CMEK 機構政策。
如果您在啟用 Security Command Center 組織時選擇 Google-owned and Google-managed encryption keys ,並在組織的專案或資料夾中設定 constraints/gcp.restrictNonCmekServicesCMEK 組織政策,且將 Security Command Center 列為受限制的服務,則無法在該專案或資料夾中建立新的受保護資源。詳情請參閱「搭配使用 CMEK 組織政策與 Security Command Center」。
定價
在 Security Command Center 標準版或進階版中啟用 CMEK 不會產生額外費用,但 Security Command Center 使用 CMEK 加密或解密資料時,Cloud KMS 會向您收費。詳情請參閱 Cloud KMS 定價。