Slack¶
Slack は幅広く使用されているクラウドベースのチーム共同作業およびメッセージングプラットフォームです.組織内のコミュニケーションと共同作業を促進するため,チームがメッセージを交換し,ファイルを共有し,その他のツールやサービスと統合するための集中管理スペースを提供します.Wallarmを使用してSlackチャンネルに通知を送信するよう設定できます.複数の異なるSlackチャンネルまたはアカウントに通知を送信する場合は,複数のSlack統合を作成してください.
統合のセットアップ¶
-
Integrationsセクションを開きます.
-
Slackブロックをクリックするか,Add integrationボタンをクリックしてSlackを選びます.
-
統合名を入力します.
-
Webhook settings in Slack を開き,メッセージを投稿するチャンネルを選択して新しいWebhookを追加します.
-
指定されたWebhook URLをコピーし,Wallarm UI内のWebhook URLフィールドに貼り付けます.
-
通知をトリガーするイベントタイプを選択します.
利用可能なイベントの詳細:
- System related:
- User changes (newly created, deleted, role change)
- Integration changes (disabled, deleted)
- Application changes (newly created, deleted, name change)
- Vulnerabilities detected, all by default or only for the selected risk level(s):
- High risk
- Medium risk
- Low risk
- Rules and triggers changed (creating, updating, or deleting the rule or trigger)
- Scope (exposed assets) changed: updates in hosts, services, and domains
- (Requires AASM Enterprise) Security issues detected, all or only for the selected risk level(s):
- Critical risk
- High risk
- Medium risk
- Low risk
- Info risk
- System related:
-
Test integrationをクリックして,設定の正確性,Wallarm Cloudの利用状況,および通知形式を確認します.
これにより,プレフィックス
[Test message]
を付けたテスト通知が送信されます. -
Add integrationをクリックします.
追加アラートのセットアップ¶
Besides the notifications you have already set up through the integration card, Wallarm triggers allow you to select additional events for notifications:
-
Number of attacks, hits or incidents per time interval (day, hour, etc.) exceeds the set number
What is not counted
- For attacks:
- The experimental attacks based on the custom regular expressions.
- For hits:
- The experimental hits based on the custom regular expressions.
- Hits not saved in the sample.
- For attacks:
-
Changes in API took place
-
IP address was denylisted
-
New rogue API (shadow, orphan, zombie) was detected
-
New user was added to the company account
For condition detailing, you can add one or more filters. As soon, as condition and filters are set, select the integration through which the selected alert should be sent. You can select several integrations simultaneously.
例: 1分間に2つ以上のSQLiヒットが検出された場合のSlack通知¶
保護対象リソースに対して2つ以上のSQLiヒットが送信された場合,このイベントに関する通知がSlackチャンネルに送信されます.
トリガーをテストするには:
保護対象リソースに対して以下のリクエストを送信します.
curl 'http://localhost/?id=1%27%20UNION%20SELECT%20username,%20password%20FROM%20users--<script>prompt(1)</script>'
curl 'http://localhost/?id=1%27%20select%20version();'
Slackチャンネルを開き,ユーザーwallarmから以下の通知が受信されたことを確認します.
[Wallarm] Trigger: The number of detected hits exceeded the threshold
Notification type: attacks_exceeded
The number of detected hits exceeded 1 in 1 minute.
This notification was triggered by the "Notification about SQLi hits" trigger.
Additional trigger’s clauses:
Attack type: SQLi.
View events:
https://my.wallarm.com/attacks?q=attacks&time_from=XXXXXXXXXX&time_to=XXXXXXXXXX
Client: TestCompany
Cloud: EU
-
「Notification about SQLi hits」はトリガー名です.
-
「TestCompany」はWallarm Consoleでの会社アカウント名です.
-
「EU」は会社アカウントが登録されているWallarm Cloudです.
例: アカウントに新ユーザーが追加された場合のSlackおよびメール通知¶
Wallarm Consoleで会社アカウントにAdministratorまたはAnalystロールの新ユーザーが追加された場合,統合で指定されたメールアドレスおよびSlackチャンネルにこのイベントに関する通知が送信されます.
トリガーをテストするには:
-
Wallarm Consoleの → Settings → Users を開き,新しいユーザーを追加します.例:
-
メールの受信トレイを開き,以下のメッセージが受信されていることを確認します.
-
Slackチャンネルを開き,ユーザーwallarmから以下の通知が受信されていることを確認します.
[Wallarm] Trigger: New user was added to the company account Notification type: create_user A new user John Smith <johnsmith@example.com> with the role Analyst was added to the company account by John Doe <johndoe@example.com>. This notification was triggered by the "Added user" trigger. Client: TestCompany Cloud: EU
- 「John Smith」と「johnsmith@example.com」は追加されたユーザーの情報です.
- 「Analyst」は追加されたユーザーのロールです.
- 「John Doe」と「johndoe@example.com」は新ユーザーを追加したユーザーの情報です.
- 「Added user」はトリガー名です.
- 「TestCompany」はWallarm Consoleでの会社アカウント名です.
- 「EU」は会社アカウントが登録されているWallarm Cloudです.
統合の無効化と削除¶
You can delete or temporarily disable the integration. While deleting stops sending notificatioins and completely deletes all configuration, disabling just stops sending notifications which you can at any moment re-enable with the same settings.
If for the integration the System related events are selected to trigger notifications, Wallarm will notify about both of these actions.
システムの利用不可および統合パラメータの不正¶
Notifications to the system are sent via requests. If the system is unavailable or integration parameters are configured incorrectly, the error code is returned in the response to the request.
If the system responds to Wallarm request with any code other than 2xx
, Wallarm resends the request with the interval until the 2xx
code is received:
-
The first cycle intervals: 1, 3, 5, 10, 10 seconds
-
The second cycle intervals: 0, 1, 3, 5, 30 seconds
-
The third cycle intervals: 1, 1, 3, 5, 10, 30 minutes
If the percentage of unsuccessful requests reaches 60% in 12 hours, the integration is automatically disabled. If you receive system notifications, you will get a message about automatically disabled integration.