Google Cloud VPC Service Controls 可讓您設定服務 perimeter,防範資料遭竊。使用 VPC Service Controls 設定 Audit Manager,讓 Audit Manager 能夠存取服務範圍外的資源和服務。
事前準備
- 確認您在組織層級具備設定 VPC Service Controls 的必要角色。
- 請視您是要註冊資源,還是要在稽核管理員中執行稽核,備妥下列資訊。
- 註冊稽核資源時:您在設定稽核管理員時指定的 Google Cloud 使用者帳戶。
- 執行稽核時:稽核資源註冊時自動建立的 Audit Manager 服務代理程式。
限制
- 您無法使用安全防護範圍保護資料夾層級或機構層級的 Audit Manager 資源。如要在資料夾或機構層級管理 Audit Manager 權限,建議使用 IAM。詳情請參閱「管理專案、資料夾和機構的存取權」。
設定輸入和輸出規則
根據服務範圍設定,設定輸入和輸出規則。詳情請參閱「服務安全防護範圍總覽」。
執行下列動作時,您可能需要設定輸入和輸出規則:
- 註冊資源以利稽核
- 執行稽核
註冊資源以進行稽核時,請設定輸入和輸出規則
您可以在稽核管理員中將機構、資料夾或專案註冊為稽核資源。
如果下列任一資源不在同一個 service perimeter 內,您就必須設定輸入或輸出規則:
- Audit Manager 服務代理
- 設定為稽核資料儲存目的地的 Cloud Storage bucket
- 稽核程序涉及的服務
下列範例中的 Cloud Storage 方法為必要項目。 您可以根據業務需求調整下列輸入和輸出規則範例。
請為設定稽核管理員時指定的 Google Cloud 使用者帳戶 完成下列工作。
設定下列輸入規則:
- ingressFrom: identities: - user: USER_EMAIL_ADDRESS sources: - accessLevel: "*" ingressTo: operations: - serviceName: storage.googleapis.com methodSelectors: - method: google.storage.buckets.getIamPolicy - method: google.storage.buckets.testIamPermissions - method: google.storage.objects.getIamPolicy - method: google.storage.buckets.setIamPolicy - method: google.storage.objects.setIamPolicy - method: google.storage.objects.create - method: google.storage.objects.get resources: "*"更改下列內容:
- USER_EMAIL_ADDRESS:設定稽核管理員時指定的電子郵件地址
設定下列輸出規則:
- egressFrom: identities: - user: USER_EMAIL_ADDRESS sources: - accessLevel: "*" egressTo: operations: - serviceName: storage.googleapis.com methodSelectors: - method: google.storage.buckets.getIamPolicy - method: google.storage.buckets.testIamPermissions - method: google.storage.objects.getIamPolicy - method: google.storage.buckets.setIamPolicy - method: google.storage.objects.setIamPolicy - method: google.storage.objects.create - method: google.storage.objects.get resources: "*"更改下列內容:
- USER_EMAIL_ADDRESS:設定稽核管理員時指定的電子郵件地址
執行稽核時設定輸入和輸出規則
您可以針對預先定義或自訂的法規遵循架構執行稽核。
如果受稽核的資料夾或專案,以及已註冊的 Cloud Storage bucket 位於不同的服務安全防護範圍,請設定下列輸入或輸出規則。
下列範例中的 Cloud Storage 方法為必要項目。您可以根據業務需求調整下列輸入和輸出規則範例。
對資料夾執行稽核時,請設定輸入規則
如果您為資料夾執行稽核,且已註冊的 Cloud Storage bucket 或資料夾中的其中一個專案位於 perimeter 內,請設定下列連入規則。
請為 Audit Manager 服務帳戶完成這項工作。
- ingressFrom:
identities:
- serviceAccount: SA_EMAIL_ADDRESS
- user: USER_EMAIL_ADDRESS
sources:
- accessLevel: "*"
ingressTo:
operations:
- serviceName: "*"
resources: "*"
更改下列內容:
- SA_EMAIL_ADDRESS:Audit Manager 服務帳戶的電子郵件地址
- USER_EMAIL_ADDRESS:設定稽核管理員時指定的電子郵件地址
如果已註冊的 Cloud Storage bucket 位於服務範圍內,請設定輸入規則
如果稽核是針對專案執行,且已註冊的 Cloud Storage bucket 位於 service perimeter 內,請設定下列輸入規則。
請為 Audit Manager 服務帳戶完成這項工作。
- ingressFrom:
identities:
- serviceAccount: SA_EMAIL_ADDRESS
- user: USER_EMAIL_ADDRESS
sources:
- accessLevel: "*"
ingressTo:
operations:
- serviceName: storage.googleapis.com
methodSelectors:
- method: google.storage.buckets.getIamPolicy
- method: google.storage.buckets.testIamPermissions
- method: google.storage.objects.getIamPolicy
- method: google.storage.buckets.setIamPolicy
- method: google.storage.objects.setIamPolicy
- method: google.storage.objects.create
- method: google.storage.objects.get
resources: "*"
更改下列內容:
- SA_EMAIL_ADDRESS:Audit Manager 服務帳戶的電子郵件地址
- USER_EMAIL_ADDRESS:設定稽核管理員時指定的電子郵件地址
如果已註冊的 Cloud Storage bucket 位於服務範圍外,請設定輸出規則
如果稽核是針對服務範圍內的專案執行,且已註冊的 Cloud Storage bucket 位於範圍外,請設定下列輸出規則。
請為包含 Cloud Storage bucket 的專案完成這項工作。
- egressFrom:
identities:
- serviceAccount: SA_EMAIL_ADDRESS
- user: USER_EMAIL_ADDRESS
sources:
- accessLevel: "*"
egressTo:
operations:
- serviceName: storage.googleapis.com
methodSelectors:
- method: google.storage.buckets.getIamPolicy
- method: google.storage.buckets.testIamPermissions
- method: google.storage.objects.getIamPolicy
- method: google.storage.buckets.setIamPolicy
- method: google.storage.objects.setIamPolicy
- method: google.storage.objects.create
- method: google.storage.objects.get
resources: "*"
更改下列內容:
- SA_EMAIL_ADDRESS:Audit Manager 服務帳戶的電子郵件地址
- USER_EMAIL_ADDRESS:設定稽核管理員時指定的電子郵件地址
如果遇到 VPC Service Controls 相關問題,請使用 VPC Service Controls 違規分析工具進行偵錯及分析。詳情請參閱「使用違規分析工具中的專屬 ID 診斷存取遭拒問題」。
後續步驟
- 進一步瞭解 VPC Service Controls。
- 請參閱「VPC Service Controls 支援的產品」表格中的 Audit Manager 項目。