コンテンツにスキップ

Slack

Slackは広く使用されているクラウドベースのチームコラボレーションおよびメッセージングプラットフォームです。チームがメッセージをやり取りし、ファイルを共有し、他のツールやサービスと連携するための集中スペースを提供することで、組織内のコミュニケーションとコラボレーションを促進するよう設計されています。WallarmからSlackチャンネルに通知を送信するように設定できます。複数の異なるSlackチャンネルやアカウントに通知を送信したい場合は、Slack integrationを複数作成します。

Integrationの設定

  1. Integrationsセクションを開きます。

  2. Slackブロックをクリックするか、Add integrationボタンをクリックしてSlackを選択します。

  3. integrationの名前を入力します。

  4. SlackのWebhook設定を開き、メッセージを投稿するチャンネルを選択して新しいWebhookを追加します。

  5. 提供されたWebhook URLをコピーし、Wallarm UIのWebhook URLフィールドに値を貼り付けます。

  6. 通知をトリガーするイベントタイプを選択します。

    Slack integration

    利用可能なイベントの詳細:

  7. Test integrationをクリックして、設定の正しさ、Wallarm Cloudの到達性、および通知形式を確認します。

    これにより、[Test message]というプレフィックス付きのテスト通知が送信されます:

    [Test message] [Test partner] Network perimeter has changed
    
    Notification type: new_scope_object_ips
    
    New IP addresses were discovered in the network perimeter:
    8.8.8.8
    
    Client: TestCompany
    Cloud: EU
    
  8. Add integrationをクリックします。

追加アラートの設定

Besides the notifications you have already set up through the integration card, Wallarm triggers allow you to select additional events for notifications:

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.

Choosing an integration

例: 1分間に2件以上のSQLi hitsが検出された場合のSlack通知

保護対象リソースに2件以上のSQLi hitsが送られた場合、このイベントに関する通知がSlackチャンネルに送信されます。

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チャンネルに送信されます。

Slackおよびメールで通知を送信するトリガーの例

トリガーをテストするには:

  1. Wallarm ConsoleでSettingsUsersを開き、新しいユーザーを追加します。例:

    追加したユーザー

  2. メールの受信トレイを開き、次のメッセージが受信されていることを確認します:

    新規ユーザー追加に関するメール

  3. 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 Smithjohnsmith@example.com は追加されたユーザーの情報です
    • Analyst は追加されたユーザーのロールです
    • John Doejohndoe@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.