Slack¶
Slackは広く使用されているクラウドベースのチームコラボレーションおよびメッセージングプラットフォームです。チームがメッセージをやり取りし、ファイルを共有し、他のツールやサービスと連携するための集中スペースを提供することで、組織内のコミュニケーションとコラボレーションを促進するよう設計されています。WallarmからSlackチャンネルに通知を送信するように設定できます。複数の異なるSlackチャンネルやアカウントに通知を送信したい場合は、Slack integrationを複数作成します。
Integrationの設定¶
-
Integrationsセクションを開きます。
-
Slackブロックをクリックするか、Add integrationボタンをクリックしてSlackを選択します。
-
integrationの名前を入力します。
-
SlackのWebhook設定を開き、メッセージを投稿するチャンネルを選択して新しい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)
- Errors during regular update of specifications used for rogue API detection or API specification enforcement
- 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)
- (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 hitsが検出された場合のSlack通知¶
保護対象リソースに2件以上のSQLi hitsが送られた場合、このイベントに関する通知が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ロールの新しいユーザーが追加されると、このイベントに関する通知がintegrationに指定したメールアドレスと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です
integrationの無効化と削除¶
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.
システムの利用不可およびintegrationパラメータの誤り¶
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.