Security Command Center のポスチャー違反ログを収集する
このドキュメントでは、Cloud Storage を使用して Security Command Center のポスチャー違反ログをエクスポートし、Google Security Operations に取り込む方法について説明します。パーサーは、検出結果の未加工の JSON データを統合データモデル(UDM)に変換します。関連するフィールドを抽出し、データを再構築して UDM フィールドにマッピングし、さまざまな検証と拡充を行ってデータの品質と整合性を確保します。
始める前に
次の前提条件を満たしていることを確認します。
- Google Cloud 環境で Security Command Center が有効になっている。
- Google SecOps インスタンス。
- Security Command Center と Cloud Logging への特権アクセス。
Cloud Storage バケットを作成する
- Google Cloud コンソールにログインします。
[Cloud Storage バケット] のページに移動します。
[作成] をクリックします。
[バケットの作成] ページでユーザーのバケット情報を入力します。以下のステップでは、操作を完了した後に [続行] をクリックして、次のステップに進みます。
[始める] セクションで、次の操作を行います。
- バケット名の要件を満たす一意の名前を入力します(例: gcp-scc-posture-violation-logs)。
階層名前空間を有効にするには、展開矢印をクリックして [Optimize for file oriented and data-intensive workloads] セクションを開き、[このバケットで階層的な名前空間を有効にする] を選択します。
バケットラベルを追加するには、展開矢印をクリックして [ラベル] セクションを開きます。
[ラベルを追加] をクリックし、ラベルのキーと値を指定します。
[データの保存場所の選択] セクションで、次の操作を行います。
- ロケーション タイプを選択してください。
ロケーション タイプのメニューを使用して、バケット内のオブジェクト データが永続的に保存されるロケーションを選択します。
クロスバケット レプリケーションを設定するには、[クロスバケット レプリケーションを設定する] セクションを開きます。
[データのストレージ クラスを選択する] セクションで、バケットのデフォルトのストレージ クラスを選択します。あるいは、Autoclass を選択して、バケットデータのストレージ クラスを自動的に管理します。
[オブジェクトへのアクセスを制御する方法を選択する] セクションで、[なし] を選択して公開アクセスの防止を適用し、バケットのオブジェクトのアクセス制御モデルを選択します。
[オブジェクト データを保護する方法を選択する] セクションで、次の操作を行います。
- [データ保護] で、バケットに設定するオプションを選択します。
- オブジェクト データの暗号化方法を選択するには、[データ暗号化] というラベルの付いた展開矢印をクリックし、データの暗号化方法を選択します。
[作成] をクリックします。
Security Command Center のロギングを構成する
- Google Cloud コンソールにログインします。
[Security Command Center] ページに移動します。
組織を選択する。
[設定] をクリックします。
[継続的エクスポート] タブをクリックします。
[エクスポート名] で [Logging エクスポート] をクリックします。
[シンク] で、[検出を Logging にロギング] をオンにします。
[ロギング プロジェクト] で、検出結果を記録するプロジェクトを入力または検索します。
[保存] をクリックします。
Security Command Center のポスチャー違反ログのエクスポートを構成する
- Google Cloud コンソールにログインします。
- [ロギング>ログルーター] に移動します。
- [シンクを作成] をクリックします。
次の構成パラメータを指定します。
- シンク名: わかりやすい名前を入力します(例:
scc-posture-violation-logs-sink)。 - シンクの宛先: [Cloud Storage] を選択し、バケットの URI(例:
gs://gcp-scc-posture-violation-logs/)を入力します。 ログフィルタ:
logName="projects/<your-project-id>/logs/cloudsecurityscanner.googleapis.com%2Fposture_violations" resource.type="cloud_security_center_posture_violation"エクスポート オプションを設定: すべてのログエントリを含めます。
- シンク名: わかりやすい名前を入力します(例:
[作成] をクリックします。
Cloud Storage の権限を構成する
- [IAM と管理] > [IAM] に移動します。
- Cloud Logging サービス アカウントを見つけます。
- バケットに対する roles/storage.admin を付与します。
フィードを設定する
フィードを構成する手順は次のとおりです。
- [SIEM Settings] > [Feeds] に移動します。
- [Add New Feed] をクリックします。
- 次のページで [単一のフィードを設定] をクリックします。
- [フィード名] フィールドに、フィードの名前を入力します(例: Security Command Center Posture Violation Logs)。
- [ソースタイプ] として [Google Cloud Storage V2] を選択します。
- [ログタイプ] として [Security Command Center Posture Violation] を選択します。
- [Chronicle Service Account] フィールドの横にある [Get Service Account] をクリックします。
- [次へ] をクリックします。
次の入力パラメータの値を指定します。
- ストレージ バケット URI: Cloud Storage バケットの URL(例:
gs://gcp-scc-posture-violation-logs/)。この URL は、末尾にスラッシュ(/)が付いている必要があります。 Source deletion options: 必要に応じて削除オプションを選択します。
ファイルの最大経過日数: 指定した日数以内に変更されたファイルを含めます。デフォルトは 180 日です。
- ストレージ バケット URI: Cloud Storage バケットの URL(例:
[次へ] をクリックします。
[Finalize] 画面で新しいフィードの設定を確認し、[送信] をクリックします。
UDM マッピング テーブル
| ログフィールド | UDM マッピング | 論理 |
|---|---|---|
| category | read_only_udm.metadata.product_event_type | 直接マッピング。 |
| changed_policy | read_only_udm.security_result.rule_name | 直接マッピング。 |
| cloudProvider | read_only_udm.target.resource.attribute.cloud.environment | 直接マッピング。 |
| createTime | read_only_udm.security_result.detection_fields[createTime] |
直接マッピング。 |
| finding.risks.riskCategory | read_only_udm.security_result.detection_fields[risk_category] |
直接マッピング。 |
| ミュート | read_only_udm.security_result.detection_fields[mute] |
直接マッピング。 |
| name | read_only_udm.metadata.product_log_id | 直接マッピング。 |
| originalProviderId | read_only_udm.target.resource.attribute.labels[original_provider_id] |
直接マッピング。 |
| 親 | read_only_udm.target.resource_ancestors[0].name | 直接マッピング。 |
| parentDisplayName | read_only_udm.metadata.description | 直接マッピング。 |
| propertyDataTypes.changed_policy.primitiveDataType | read_only_udm.security_result.rule_labels[changed_policy_primitive_data_type] |
直接マッピング。 |
| propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.detected_configuration.primitiveDataType | read_only_udm.security_result.rule_labels[detected_configuration_primitive_data_type] |
直接マッピング。 |
| propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.expected_configuration.primitiveDataType | read_only_udm.security_result.rule_labels[expected_configuration_primitive_data_type] |
直接マッピング。 |
| propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.field_name.primitiveDataType | read_only_udm.security_result.rule_labels[field_name_primitive_data_type] |
直接マッピング。 |
| propertyDataTypes.posture_deployment_name.primitiveDataType | read_only_udm.security_result.detection_fields[posture_deployment_name_primitiveDataType] |
直接マッピング。 |
| propertyDataTypes.posture_deployment_resource.primitiveDataType | read_only_udm.security_result.detection_fields[posture_deployment_resource_primitiveDataType] |
直接マッピング。 |
| propertyDataTypes.posture_name.primitiveDataType | read_only_udm.security_result.detection_fields[posture_name_primitiveDataType] |
直接マッピング。 |
| propertyDataTypes.posture_revision_id.primitiveDataType | read_only_udm.security_result.detection_fields[posture_revision_id_primitiveDataType] |
直接マッピング。 |
| resource.cloudProvider | read_only_udm.target.resource.attribute.cloud.environment | 直接マッピング。 |
| resource.displayName | read_only_udm.target.resource.attribute.labels[resource_displayName] |
直接マッピング。 |
| resource.gcpMetadata.organization | read_only_udm.target.resource.attribute.labels[resource_organization] |
直接マッピング。 |
| resource.gcpMetadata.parent | read_only_udm.target.resource.attribute.labels[resource_parent] |
直接マッピング。 |
| resource.gcpMetadata.parentDisplayName | read_only_udm.target.resource.attribute.labels[resource_parentDisplayName] |
直接マッピング。 |
| resource.gcpMetadata.project | read_only_udm.target.resource.attribute.labels[resource_project] |
直接マッピング。 |
| resource.gcpMetadata.projectDisplayName | read_only_udm.target.resource.attribute.labels[resource_projectDisplayName] |
直接マッピング。 |
| resource.organization | read_only_udm.target.resource.attribute.labels[resource_organization] |
直接マッピング。 |
| resource.resourcePath.nodes.displayName | read_only_udm.target.resource_ancestors.name | 直接マッピング。 |
| resource.resourcePath.nodes.id | read_only_udm.target.resource_ancestors.product_object_id | 直接マッピング。 |
| resource.resourcePath.nodes.nodeType | read_only_udm.target.resource_ancestors.resource_subtype | 直接マッピング。 |
| resource.resourcePathString | read_only_udm.target.resource.attribute.labels[resource_path_string] |
直接マッピング。 |
| resource.service | read_only_udm.target.resource_ancestors[10].name | 直接マッピング。 |
| resource.type | read_only_udm.target.resource.attribute.labels[resource_type] |
直接マッピング。 |
| resourceName | read_only_udm.target.resource.name | 直接マッピング。 |
| securityPosture.changedPolicy | read_only_udm.security_result.rule_labels[changed_policy] |
直接マッピング。 |
| securityPosture.name | read_only_udm.security_result.detection_fields[security_posture_name] |
直接マッピング。 |
| securityPosture.policyDriftDetails[0].detectedValue | read_only_udm.security_result.rule_labels[policy_drift_details_detected_value] |
直接マッピング。 |
| securityPosture.policyDriftDetails[0].expectedValue | read_only_udm.security_result.rule_labels[policy_drift_details_expected_value] |
直接マッピング。 |
| securityPosture.policyDriftDetails[0].field | read_only_udm.security_result.rule_labels[policy_drift_details_field] |
直接マッピング。 |
| securityPosture.policySet | read_only_udm.security_result.rule_set | 直接マッピング。 |
| securityPosture.postureDeployment | read_only_udm.security_result.detection_fields[posture_deployment] |
直接マッピング。 |
| securityPosture.postureDeploymentResource | read_only_udm.security_result.detection_fields[posture_deployment_resource] |
直接マッピング。 |
| securityPosture.revisionId | read_only_udm.security_result.detection_fields[security_posture_revision_id] |
直接マッピング。 |
| 重要度 | read_only_udm.security_result.severity | 直接マッピング。 |
| sourceProperties.categories[0] | read_only_udm.security_result.detection_fields[source_properties_categories] |
直接マッピング。 |
| sourceProperties.changed_policy | read_only_udm.security_result.rule_name | 直接マッピング。 |
| sourceProperties.name | read_only_udm.target.application | 直接マッピング。 |
| sourceProperties.policy_drift_details[0].drift_details.detected_configuration | read_only_udm.security_result.rule_labels[policy_drift_details_detected_configuration] |
直接マッピング。 |
| sourceProperties.policy_drift_details[0].drift_details.expected_configuration | read_only_udm.security_result.rule_labels[policy_drift_details_expected_configuration] |
直接マッピング。 |
| sourceProperties.policy_drift_details[0].field_name | read_only_udm.security_result.rule_labels[policy_drift_details_field_name] |
直接マッピング。 |
| sourceProperties.posture_deployment | read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] |
直接マッピング。 |
| sourceProperties.posture_deployment_name | read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] |
直接マッピング。 |
| sourceProperties.posture_deployment_resource | read_only_udm.security_result.detection_fields[source_properties_posture_deployment_resource] |
直接マッピング。 |
| sourceProperties.posture_name | read_only_udm.target.application | 直接マッピング。 |
| sourceProperties.posture_revision_id | read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] |
直接マッピング。 |
| sourceProperties.revision_id | read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] |
直接マッピング。 |
| state | read_only_udm.security_result.detection_fields[state] |
直接マッピング。 |
| read_only_udm.metadata.vendor_name | パーサーは静的値 Google をマッピングします。 |
|
| read_only_udm.metadata.product_name | パーサーは静的値 Security Command Center をマッピングします。 |
|
| read_only_udm.target.resource.resource_type | パーサーは静的値 CLUSTER をマッピングします。 |
|
| read_only_udm.security_result.about.investigation.status | パーサーは静的値 NEW をマッピングします。 |
|
| read_only_udm.security_result.alert_state | パーサーは静的値 ALERTING をマッピングします。 |
|
| read_only_udm.metadata.event_type | パーサーはデフォルト値として GENERIC_EVENT にマッピングされます。フィールド「category」が「SECURITY_POSTURE_DRIFT」に等しく、「client_device_present」と「token_target.application」が空でない場合、「SERVICE_MODIFICATION」にマッピングされます。フィールド「category」が「SECURITY_POSTURE_POLICY_DRIFT」、「SECURITY_POSTURE_POLICY_DELETE」、「SECURITY_POSTURE_DETECTOR_DRIFT」、または「SECURITY_POSTURE_DETECTOR_DELETE」と等しく、「network_edr_not_present」が false で、「client_device_present」が true の場合、「SCAN_UNCATEGORIZED」にマッピングされます。フィールド「token_metadata.event_type」が「GENERIC_EVENT」に等しく、「network_edr_not_present」が false で、「client_device_present」が true の場合、「STATUS_UPDATE」にマッピングされます。 |
|
| read_only_udm.target.resource_ancestors[1].resource_type | パーサーは静的値 CLOUD_PROJECT をマッピングします。 |
|
| read_only_udm.target.resource.product_object_id | パーサーは、2 番目と 3 番目の「/」文字の間の「parent」フィールドから値を抽出します。 | |
| read_only_udm.target.resource_ancestors[1].name | パーサーは、4 番目と 5 番目の「/」文字の間の「resourceName」フィールドから値を抽出します。 | |
| read_only_udm.security_result.url_back_to_product | パーサーは、ログから抽出された組織 ID、ソース ID、検出 ID を使用して URL を動的に構築します。 | |
| securityMarks.name | read_only_udm.security_result.detection_fields[securityMarks_name] |
直接マッピング。 |
さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。