Google Cloud Armor
本文提供相關指引,協助您設定 Google Cloud Armor 並與 Google Security Operations 整合。
必要條件
請務必先完成所有必要步驟,再設定整合功能。
建立及設定 IAM 角色
前往 Google Cloud 控制台的「IAM Roles」(IAM 角色) 頁面。
按一下「建立角色」,建立具有整合項目所需權限的自訂角色。
如果是新的自訂角色,請提供「名稱」、「說明」和專屬「ID」。
將「角色發布階段」設為「正式發布」。
將下列權限新增至建立的角色:
compute.backendBuckets.setSecurityPolicy
compute.backendServices.setSecurityPolicy
compute.regionBackendServices.setSecurityPolicy
compute.regionSecurityPolicies.create
compute.regionSecurityPolicies.get
compute.regionSecurityPolicies.list
compute.regionSecurityPolicies.update
compute.securityPolicies.create
compute.securityPolicies.get
compute.securityPolicies.list
compute.securityPolicies.update
點選「建立」。
建立服務帳戶
如要建立服務帳戶,請按照建立服務帳戶的程序操作。
建立服務帳戶後,請將其下載為 JSON 檔案。設定整合參數時,您需要提供下載的 JSON 檔案內容。
如要使用 GKE 電子郵件地址的 Workload Identity 聯盟,而非服務帳戶 JSON 檔案內容,請將
Service Account Token Creator
角色指派給整合中使用的服務帳戶。
將 Cloud Armor 與 Google SecOps 整合
如要設定整合,請使用下列參數:
參數 | |
---|---|
API Root |
必要 Cloud Armor 服務的 API 根層級。 預設值為 |
Project ID |
選用 用於 Cloud Armor 整合的專案 ID。如未提供值,系統會從 User Service Account 參數中提供的 JSON 檔案內容擷取專案 ID。 |
Workload Identity Email |
選用 服務帳戶的用戶端電子郵件地址。 您可以設定這個參數或「使用者服務帳戶」參數。 如要使用 Workload Identity Federation for GKE 電子郵件地址模擬服務帳戶,請將「服務帳戶符記建立者」角色授予服務帳戶。如要進一步瞭解工作負載身分和使用方式,請參閱「工作負載的身分」。 |
User Service Account |
選用 您用於 Cloud Armor 服務的服務帳戶 JSON 檔案內容。 提供服務帳戶 JSON 檔案的完整內容。 您可以設定這個參數或「Workload Identity 電子郵件」參數。 |
Verify SSL |
選用 如果選取這個參數,系統會驗證連線至 Cloud Armor 服務的 SSL 憑證是否有效。 (此為預設選項)。 |
動作
部分動作不需要輸入參數。
在安全性政策中新增規則
在 Cloud Armor 服務中,為安全性政策新增規則。
實體
這項操作不會對實體執行。
動作輸入內容
如要設定動作,請使用下列參數:
參數 | |
---|---|
Policy Name |
必要 要新增規則的安全政策名稱。 |
Region |
選用 要在哪個區域新增規則。 如果未提供任何值,系統會將規則新增至全域層級的安全政策。 |
Rule JSON |
必要 要新增的規則的 JSON 定義。 如要進一步瞭解如何將規則新增至政策,請參閱方法:securityPolicies.addRule。 |
動作輸出內容
動作輸出類型 | |
---|---|
案件總覽附件 | 不適用 |
案件總覽連結 | 不適用 |
案件訊息牆表格 | 不適用 |
補充資訊表格 | 不適用 |
JSON 結果 | 可用 |
指令碼結果 | 可用 |
指令碼結果
指令碼結果名稱 | 值 |
---|---|
is_success | True 或 False |
JSON 結果
{
"kind": "compute#securityPolicy",
"id": "ID",
"creationTimestamp": "2024-04-14T05:39:05.798-07:00",
"name": "example",
"description": "Test for integration",
"rules": [
{
"kind": "compute#securityPolicyRule",
"description": "test",
"priority": 100,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
},
{
"kind": "compute#securityPolicyRule",
"description": "Default rule, higher priority overrides it",
"priority": 2147483647,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
}
],
"fingerprint": "A3hq2ZQYxj8=",
"selfLink": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1/securityPolicies/example",
"type": "CLOUD_ARMOR",
"labelFingerprint": "42WmSpB8rSM=",
"region": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1"
}
案件總覽
這項動作會提供下列輸出訊息:
輸出訊息 | 訊息說明 |
---|---|
Successfully added a new rule to the security policy! |
動作成功。 |
Error executing action "Add a Rule to a Security Policy".
Reason: ERROR_REASON |
動作失敗。 檢查與伺服器的連線、輸入參數、憑證、區域名稱、JSON 檔案內容或政策名稱。 |
建立安全性政策
在 Cloud Armor 服務中建立安全性政策。
實體
這項操作不會對實體執行。
動作輸入內容
如要設定動作,請使用下列參數:
參數 | |
---|---|
Region |
選用 要建立政策的區域。 如果未提供任何值,系統會建立全域層級的安全性政策。 |
Policy JSON |
必要 要建立的政策 JSON 定義。 如要進一步瞭解政策,請參閱「REST 資源:securityPolicies」。 |
動作輸出內容
動作輸出類型 | |
---|---|
案件總覽附件 | 不適用 |
案件總覽連結 | 不適用 |
案件訊息牆表格 | 不適用 |
補充資訊表格 | 不適用 |
JSON 結果 | 可用 |
指令碼結果 | 可用 |
指令碼結果
指令碼結果名稱 | 值 |
---|---|
is_success | True 或 False |
JSON 結果
{
"kind": "compute#securityPolicy",
"id": "ID",
"creationTimestamp": "2024-04-14T05:39:05.798-07:00",
"name": "example",
"description": "Test for integration",
"rules": [
{
"kind": "compute#securityPolicyRule",
"description": "test",
"priority": 100,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
},
{
"kind": "compute#securityPolicyRule",
"description": "Default rule, higher priority overrides it",
"priority": 2147483647,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
}
],
"fingerprint": "A3hq2ZQYxj8=",
"selfLink": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1/securityPolicies/example",
"type": "CLOUD_ARMOR",
"labelFingerprint": "42WmSpB8rSM=",
"region": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1"
}
案件總覽
這項動作會提供下列輸出訊息:
輸出訊息 | 訊息說明 |
---|---|
Successfully created a new security policy! |
動作成功。 |
Error executing action "Create a Security Policy". Reason:
ERROR_REASON |
動作失敗。 檢查與伺服器的連線、輸入參數、憑證、區域名稱或 JSON 檔案內容。 |
乒乓
使用整合設定頁面提供的參數,測試與 Cloud Armor 服務的連線。
實體
這項操作不會對實體執行。
動作輸入內容
不適用
動作輸出內容
動作輸出類型 | |
---|---|
案件總覽附件 | 不適用 |
案件總覽連結 | 不適用 |
案件訊息牆表格 | 不適用 |
補充資訊表格 | 不適用 |
JSON 結果 | 不適用 |
指令碼結果 | 可用 |
指令碼結果
指令碼結果名稱 | 值 |
---|---|
is_success | True 或 False |
案件總覽
這項動作會提供下列輸出訊息:
輸出訊息 | 訊息說明 |
---|---|
Successfully connected to the Google Cloud Armor service with
the provided connection parameters! |
動作成功。 |
Failed to connect to the Google Cloud Armor service! Error is
ERROR_REASON |
動作失敗。 檢查伺服器的連線、輸入參數或憑證。 |
更新安全性政策
更新 Cloud Armor 服務中的現有安全性政策。
這項操作無法更新政策中的規則。如要為相關政策新增規則,請使用「Add a Rule to a Security Policy」(為安全性政策新增規則) 動作。
實體
這項操作不會對實體執行。
動作輸入內容
如要設定動作,請使用下列參數:
參數 | |
---|---|
Policy Name |
必要 要新增規則的安全政策名稱。 |
Region |
選用 新版政策適用區域。 如果未提供任何值,系統會建立全域層級的安全性政策。 |
Rule JSON |
必要 要更新的政策 JSON 定義。 如要進一步瞭解政策更新,請參閱「方法:securityPolicies.patch 」。 您無法透過這項操作更新規則。 如要為政策新增規則,請使用「Add a Rule to a Security Policy」(為安全性政策新增規則) 動作。 |
動作輸出內容
動作輸出類型 | |
---|---|
案件總覽附件 | 不適用 |
案件總覽連結 | 不適用 |
案件訊息牆表格 | 不適用 |
補充資訊表格 | 不適用 |
JSON 結果 | 可用 |
指令碼結果 | 可用 |
指令碼結果
指令碼結果名稱 | 值 |
---|---|
is_success | True 或 False |
JSON 結果
{
"kind": "compute#securityPolicy",
"id": "ID",
"creationTimestamp": "2024-04-14T05:39:05.798-07:00",
"name": "example",
"description": "Test for integration",
"rules": [
{
"kind": "compute#securityPolicyRule",
"description": "test",
"priority": 100,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
},
{
"kind": "compute#securityPolicyRule",
"description": "Default rule, higher priority overrides it",
"priority": 2147483647,
"match": {
"versionedExpr": "SRC_IPS_V1",
"config": {
"srcIpRanges": [
"*"
]
}
},
"action": "allow",
"preview": false
}
],
"fingerprint": "A3hq2ZQYxj8=",
"selfLink": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1/securityPolicies/example",
"type": "CLOUD_ARMOR",
"labelFingerprint": "42WmSpB8rSM=",
"region": "https://www.googleapis.com/compute/v1/projects/PROJECT_NAME/regions/northamerica-northeast1"
}
案件總覽
這項動作會提供下列輸出訊息:
輸出訊息 | 訊息說明 |
---|---|
Successfully added comment to the
identity protection detection with ID
DETECTION_ID in CrowdStrike |
動作成功。 |
Error executing action "Update a Security Policy". Reason:
ERROR_REASON |
動作失敗。 檢查伺服器的連線、輸入參數或憑證。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。