LoginSignup
3
0

More than 1 year has passed since last update.

【IBM Security Verify】Adaptive Accessで「非常に高い」と判定されたユーザーアクセスをSlackに通知する。

Posted at

はじめに

通知Webhookの利用方法として、Adaptive Accessのリスク判定で「非常に高い」と判断されたユーザーをSlackに通知してみました。
qiita_webhook_a2.png

デフォルト設定でご利用いただいている場合、「非常に高い」と判定されたユーザ―のアクセスはブロックされ、以下のようなエラー画面が表示されます。
qiita_webhook_a2(2).png

システム管理者の方が、ユーザーの問い合わせの前に状況を把握するために、この通知Webhookが利用できるのではと思います。

IBM Security Verifyの通知Webhook設定について

SlackのIncommingWebhookの設定の流れは、前回の記事【IBM Security Verify】ユーザーの登録・変更・削除イベントをSlackに通知する。 と同じため割愛させて頂きます。

APIを使って、IBM Security Verifyに通知Webhookを登録します。

設定内容は以下の通りです。
interestsで、"event_type"が"adaptive_risk"であるイベントを指定しています。
transform-outgoingの設定の中で、risk_level == 'VERY_HIGH' で、非常に高いと判定されたイベントを抽出してSlackに通知を行っています。

{
    "name": "adaptive_access_high_webhook",
    "type": "notification",
    "transform": {
        "outgoing": "statements:\r\n- context: \"isEventType := (body.data.risk_level == 'VERY_HIGH')\"\r\n- if:\r\n    match: context.isEventType \r\n    block:\r\n      - context: \"d := body['data']\"\r\n      - return: \"{'body': {'text': '<!channel>該当ユーザーのログインが、「リスクレベル:非常に高い」 と判定されました'+'対象ユーザー:'+ context.d.username }}\"\r\n- return: \"{'body':  {'text':'other'}}\""
    },
    "urls": [
        "https://hooks.slack.com/services/xxxxxx/xxxxxx/xxxxxx"
    ],
    "purpose": [
        "notifications"
    ],
    "notification": {
        "interests": [
            {
                "name": "adaptive access events",
                "description": "",
                "clauses": [
                    {
                        "operation": "include",
                        "key": "event_type",
                        "value": "adaptive_risk"
                    }
                ]
            }
        ],
        "enabled": true
    }
}

最後に

interest/transform の設定を考える際には、実際イベントのデータを出力して確認しながら行うと設定しやすいです。
イベント・ペイロードやAPIのマニュアルも参考になります。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0