Logstash経由のSplunk Enterprise¶
この手順はWallarmをLogstashデータ収集システムと統合し、イベントをSplunk SIEMシステムへ転送する例を示しています。
The most common logging scheme in complex systems consists of the following components:
-
Data collector: accepts logs from several sources and forwards logs to the SIEM system
-
SIEM system or log management systems: used to analyze logs and monitor the system status
使用リソース¶
-
Splunk Enterprise(WEB URL
https://109.111.35.11:8000
およびAPI URLhttps://109.111.35.11:8088
) -
Logstash 7.7.0はDebian 11.x (bullseye)にインストールされており、
https://logstash.example.domain.com
で利用可能です。 -
EU cloudにあるWallarm Consoleへの管理者アクセスが必要で、Logstash統合の設定を行います。
Wallarm Cloud IP addresses
To provide Wallarm Cloud access to your system, you may need a list of its public IP addresses:
Splunk EnterpriseおよびLogstashサービスへのリンクは例として示しているため、実際の応答はありません。
Splunk Enterpriseの設定¶
LogstashログはWallarm Logstash logs
という名前でSplunk HTTP Event Controllerに送信され、他はデフォルト設定となります。
HTTP Event Controllerにアクセスするために、生成されたトークン93eaeba4-97a9-46c7-abf3-4e0c545fa5cb
が使用されます。
Splunk HTTP Event Controllerの設定についての詳細な説明は公式Splunkドキュメントに記載されています。
Logstashの設定¶
Wallarmはwebhookを介してLogstashの中間データ収集システムへログを送信するため、Logstashの設定は以下の要件を満たす必要があります。
-
POSTまたはPUTリクエストを受け付ける
-
HTTPSリクエストを受け付ける
-
パブリックなURLを有する
-
ログをSplunk Enterpriseへ転送する(この例では
http
プラグインを使用してログを転送します)
Logstashはlogstash-sample.conf
ファイルで設定されます。
-
受信するwebhookの処理は
input
セクションで設定されます:- トラフィックはポート5044に送信されます
- LogstashはHTTPS接続のみを受け付けるよう設定されています
- 公開された信頼できるCAに署名されたLogstash TLS証明書はファイル
/etc/server.crt
に格納されています - TLS証明書用の秘密鍵はファイル
/etc/server.key
に格納されています
-
Splunkへのログ転送とログ出力は
output
セクションで設定されます:- LogstashからSplunkへログはJSON形式で転送されます
- LogstashからSplunkのAPIエンドポイント
https://109.111.35.11:8088/services/collector/raw
へはPOSTリクエストを介してすべてのイベントログが転送されます。リクエストの認証にはHTTPS Event Collectorトークンが使用されます - Logstashログはコマンドライン(15行目)にも出力されます。この設定は、Logstashを介してイベントがログ出力されることを検証するために使用されます
設定ファイルの詳細な説明は公式Logstashドキュメントで確認できます。
Logstash 設定のテスト
Logstashログが生成されSplunkへ転送されるか確認するために、POSTリクエストをLogstashへ送信できます。
リクエスト例:
Logstash統合の設定¶
-
Webhooks are sent to
https://logstash.example.domain.com
-
Webhooks are sent via POST requests
-
The webhook integration has default advanced settings
-
Webhooks sent to Webhook URLs are all available events: hits, system events, vulnerabilities, scope changes
テスト例¶
To test the configuration, a new user is added in Wallarm Console:
Logstashは次のようにイベントをログ出力します。
Splunkイベントには以下のエントリが表示されます。
ダッシュボードへのイベント整理¶
To get Wallarm events organized into a ready-to-use dashboard in Splunk 9.0 or later, you can install the Wallarm application for Splunk.
This application provides you with a pre-configured dashboard that is automatically filled with the events received from Wallarm. In addition to that, the application enables you to proceed to detailed logs on each event and export the data from the dashboard.
To install the Wallarm application for Splunk:
-
In the Splunk UI ➝ Apps find the
Wallarm API Security
application. -
Click Install and input the Splunkbase credentials.
If some Wallarm events are already logged in Splunk, they will be displayed on the dashboard, as well as further events Wallarm will discover.
In addition, you can fully customize the ready-to-use dashboard, e.g. its view or search strings used to extract data from all Splunk records.