slack chatops.md

Slack Chatops

Purpose

This document is intended for both internal teams and customers. It explains how to set up and use the Slack ChatOps integration in Dropzone, including:


1. Overview

The Slack ChatOps feature enables users to perform investigation management actions directly from Slack, such as:

v0 (Beta) Slash Commands


2. Prerequisites

Before setting up ChatOps:


3. Setup Instructions

Step 1 – Create a Slack App

  1. Go to: https://api.slack.com/apps
  2. Click Create New App.
  3. Choose From Manifest.
  4. Paste the JSON manifest (provided at the end of this document).
  5. Replace <TENANT> in the manifest with your Dropzone tenant hostname.

This automatically configures:


Step 2 – Gather Credentials

After creating and installing the Slack app, collect:


Step 3 – Add Credentials to Dropzone

Within your Dropzone tenant:

  1. Navigate to System Info.
  2. Enter:
    • Signing Secret → Slack Signing Secret
    • Bot Token → Slack Bot Token

Note: In future versions, this configuration will likely move to the Integrations page under a dedicated Slack ChatOps section.


4. Authentication Details

  1. Slack sends the slash command request to the Dropzone endpoint.
  2. The Dropzone backend verifies the request using the Signing Secret.
  3. If the Signing Secret is incorrect:
    • The request is rejected.
    • The user receives an error from Slack’s built-in Slackbot (not the Dropzone bot).
  4. If verification succeeds:
    • Dropzone matches the Slack user’s email address to an existing Dropzone tenant user.
    • The user must have previously logged into the tenant.
  5. If no user match is found:
    • The command fails with an authentication error.

5. Using Slash Commands

Command Description Example
/dzapprove Approve an investigation by ID /dzapprove 1012
/dzreopen Reopen a previously closed investigation /dzreopen 1012
/dzoutcome Change outcome with note and optional learning flag /dzoutcome 1012 malicious Confirmed phishing attempt. --no-learn
/dzhelp Display usage information /dzhelp

6. Behavior and Visibility


7. Best Practices


8. Known Limitations


JSON Manifest

Replace <TENANT> with your Dropzone tenant hostname before pasting into Slack.

{
  "display_information": {
    "name": "DropzoneAI-ChatOps",
    "description": "Manage investigations via Slack",
    "background_color": "#000000"
  },
  "features": {
    "bot_user": {
      "display_name": "DropzoneAI-ChatOps",
      "always_online": true
    },
    "slash_commands": [
      {
        "command": "/dzapprove",
        "url": "https://<TENANT>.dropzone.app/app/api/chatops/slack/approve",
        "description": "Approve an investigation",
        "usage_hint": "[id]",
        "should_escape": false
      },
      {
        "command": "/dzreopen",
        "url": "https://<TENANT>.dropzone.app/app/api/chatops/slack/reopen",
        "description": "Reopen an investigation",
        "usage_hint": "[id]",
        "should_escape": false
      },
      {
        "command": "/dzoutcome",
        "url": "https://<TENANT>.dropzone.app/app/api/chatops/slack/outcome",
        "description": "Change an investigation outcome",
        "usage_hint": "[id] [outcome] [note] [optional: --no-learn]",
        "should_escape": false
      },
      {
        "command": "/dzhelp",
        "url": "https://<TENANT>.dropzone.app/app/api/chatops/slack/help",
        "description": "Usage information for Dropzone AI slash commands",
        "should_escape": false
      }
    ]
  },
  "oauth_config": {
    "scopes": {
      "bot": ["chat:write", "commands", "users:read", "users:read.email"]
    }
  },
  "settings": {
    "org_deploy_enabled": false,
    "socket_mode_enabled": false,
    "token_rotation_enabled": false
  }
}