Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
321553e
feat: completely rearrange all the docker files, update README, and a…
jondricek Nov 7, 2025
7d9cdce
chore: add nginx ssl config file
jondricek Nov 7, 2025
89f338f
fix: fix typo in compose.certs.yaml
jondricek Nov 7, 2025
d15a67a
fix: separate taxii service
jondricek Nov 7, 2025
35a41f3
feat: enable docker compose watch mode
jondricek Nov 7, 2025
880c596
feat: add setup script for workbench instance
jondricek Nov 7, 2025
ec501ca
chore: update readme
jondricek Nov 7, 2025
57e3834
fix: update TAXII compose file to use correct syntax, and update setu…
jondricek Nov 7, 2025
62c236e
fix: fixed setup script to be compatible with macOS
jondricek Nov 7, 2025
b44c1b3
docs: update README
jondricek Nov 7, 2025
c3e57ab
docs: update readmes
jondricek Nov 7, 2025
8e538d1
docs: update configuration and template.env to include MONGOSTORE_CRY…
jondricek Nov 8, 2025
675d2f9
fix: update container names and proxy_pass references in Docker confi…
jondricek Nov 9, 2025
cf9c81d
fix: update TAXII server configuration to use port 8000 and adjust re…
jondricek Nov 9, 2025
290abd3
fix: update TAXII_STIX_SRC_URL to use correct rest-api reference
jondricek Nov 9, 2025
686a755
fix: update TAXII_HTTP_PORT to use correct default value of 8000
jondricek Nov 9, 2025
cf59f40
fix: update TAXII_MONGO_URI to use correct MongoDB service address
jondricek Nov 9, 2025
18ad64a
fix: eliminate namerefs for bash 3.2 compatibility
kji-mitre Nov 10, 2025
2b99a9e
Merge branch 'major-refactor' of github.com:mitre-attack/attack-workb…
kji-mitre Nov 10, 2025
7f4db51
chore: cleanup comments
kji-mitre Nov 10, 2025
bdc5c5d
chore: move setup script to docker dir
kji-mitre Nov 10, 2025
092591f
fix: change setup to warn instead of fail on missing repos
kji-mitre Nov 10, 2025
9547fb4
chore: standardize interactive prompt newlines
kji-mitre Nov 10, 2025
61e4ca5
docs: update documentation about docker example
jondricek Nov 10, 2025
30431db
fix: remove compose project name variable
jondricek Nov 10, 2025
feae908
fix: update script to use default paths for custom certs if not speci…
jondricek Nov 11, 2025
6efbed7
fix: update nginx configs for frontend
jondricek Nov 15, 2025
f785b07
fix: update default nginx config
jondricek Nov 15, 2025
d43e0f7
fix: update nginx config files
jondricek Nov 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 17 additions & 198 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,213 +1,32 @@
# ATT&CK Workbench Deployment

This repository contains deployment files for the ATT&CK Workbench, a web application for editing ATT&CK data represented in STIX. It is composed of a frontend SPA, a backend REST API, and a database. Optionally, you can deploy a "sidecar service" that makes your Workbench data available over a TAXII 2.1 API.
This repository contains deployment files for the ATT&CK Workbench, a web application for editing ATT&CK data represented in STIX.
It is composed of a frontend Single Page App (SPA), a backend REST API, and a database.
Optionally, you can deploy a "sidecar service" that makes your Workbench data available over a TAXII 2.1 API.

## Deployment Options
## Docker Setup

### Docker Compose
To quickly create and deploy a custom Workbench instance using Docker Compose use the interactive setup script in the `docker/` directory.

The ATT&CK Workbench can be deployed using Docker Compose with two different configurations:
See [docker/README](docker/README.md) for detailed instructions.

#### 1. Using Pre-built Images (Recommended)

Use `compose.yaml` to pull pre-built images directly from GitHub Container Registry (GHCR):

```bash
# Deploy with pre-built images
docker compose up -d

# Deploy with TAXII server
docker compose --profile with-taxii up -d

# Stop the deployment
docker compose down
```

#### 2. Building from Source

Use `compose.dev.yaml` in combination with `compose.yaml` to build images from source code:

```bash
# Build and deploy from source
docker compose -f compose.yaml -f compose.dev.yaml up -d --build

# Build and deploy with TAXII server
docker compose -f compose.yaml -f compose.dev.yaml --profile with-taxii up -d --build

# Stop the deployment
docker compose -f compose.yaml -f compose.dev.yaml down
```

**Note**: When building from source, you need the following three source repositories to be available as sibling directories to this deployment repository:

- [attack-workbench-frontend](https://github.com/center-for-threat-informed-defense/attack-workbench-frontend/)
- [attack-workbench-rest-api](https://github.com/center-for-threat-informed-defense/attack-workbench-rest-api/)
- [attack-workbench-taxii-server](https://mitre-attack/attack-workbench-taxii-server/)

The directory structure should look like this:

```bash
.
├── attack-workbench-deployment
├── attack-workbench-frontend
├── attack-workbench-rest-api
└── attack-workbench-taxii-server (optional)
```

### Kubernetes
## Kubernetes Setup

For production deployments, Kubernetes manifests with Kustomize are available in the `k8s/` directory.
See [k8s/README.md](k8s/README.md) for detailed instructions.

## Configuration

### Environment Variables

We make heavy use of string interpolation to minimize having to modify the Docker Compose manifest files (e.g., [compose.yaml](./compose.yaml)). Consequently, that means you must set a bunch of environment variables when using these templates. Fortunately, we've provided a dotenv template that you can source.

Copy `template.env` to `.env` and customize the values as needed:

```bash
cp template.env .env
```

Available environment variables:

| Variable | Default Value | Description |
|----------|---------------|-------------|
| **Docker Image Tags** | | |
| `ATTACKWB_FRONTEND_VERSION` | `latest` | Frontend Docker image tag |
| `ATTACKWB_RESTAPI_VERSION` | `latest` | REST API Docker image tag |
| `ATTACKWB_TAXII_VERSION` | `latest` | TAXII server Docker image tag |
| **HTTP Listener Ports** | | |
| `ATTACKWB_FRONTEND_HTTP_PORT` | `80` | Frontend HTTP port |
| `ATTACKWB_FRONTEND_HTTPS_PORT` | `443` | Frontend HTTPS port |
| `ATTACKWB_RESTAPI_HTTP_PORT` | `3000` | REST API port |
| `ATTACKWB_DB_PORT` | `27017` | MongoDB port |
| `ATTACKWB_TAXII_HTTP_PORT` | `5002` | TAXII server port |
| **SSL/TLS Configuration** | | |
| `ATTACKWB_FRONTEND_CERTS_PATH` | `./certs` | Path to SSL certificates |
| **TAXII Configuration** | | |
| `ATTACKWB_TAXII_ENV` | `dev` | Specifies the name of the dotenv file to load (e.g., A value of `dev` tells the TAXII server to load `dev.env`) |

### Service-Specific Configuration

Each service has its own configuration directory:

#### Frontend

**Default config files**: `configs/frontend/`

The frontend container is an Nginx instance which serves the frontend SPA and reverse proxies requests to the backend REST API.
We provide a basic `nginx.conf` template in the aforementioned directory that should get you started.
Refer to the [frontend documentation](https://github.com/center-for-threat-informed-defense/attack-workbench-frontend)
for further details on customizing the SPA.

#### REST API

> [!IMPORTANT]
> The REST API service requires the `SESSION_SECRET` environment variable to be set in order to deploy.
> Without it set, `docker compose up` will fail to start this required service.

**Default config files**: `configs/rest-api/`

The backend REST API loads runtime configurations from environment variables, as well as from a JSON configuration file.
Templates are provided in the aforementioned directory.
Refer to the [REST API usage documentation](https://github.com/center-for-threat-informed-defense/attack-workbench-rest-api/blob/main/USAGE.md#configuration)
for further details on customizing the backend.

#### TAXII Server

**Default config files**: `configs/taxii/config/`

The TAXII server loads all runtime configuration parameters from a dotenv file.
The specific filename of the dotenv file is specified by the `ATTACKWB_TAXII_ENV` environment variable.
For example, a value of `dev` tells the TAXII server to load `dev.env`.

## Quick Start

1. Clone this repository:

```bash
git clone https://github.com/center-for-threat-informed-defense/attack-workbench-deployment.git
cd attack-workbench-deployment
```

2. Configure environment variables (optional):

```bash
cp template.env .env
# Edit .env with your preferred settings
```

3. Configure REST API environment variables (required):

```bash
cp configs/rest-api/template.env configs/rest-api/.env
```

Generate a secure random secret

```bash
node -e "console.log(require('crypto').randomBytes(48).toString('base64'))"
```

Set the above secret in `configs/rest-api/.env`

```bash
SESSION_SECRET=<value from above command>
```

4. Deploy using pre-built images:

```bash
docker compose up -d
```

5. Access the application at `http://localhost` (or your configured port)

6. To include the TAXII server:

```bash
docker compose --profile with-taxii up -d
```

## Data Persistence

MongoDB data is persisted in the `workspace-data` named Docker volume. Thus, the `database` service can be deleted and re-deployed without losing access to the database. The database volume will be remounted to the `database` service upon deployment.

## Troubleshooting

### Check Service Status

```bash
# View running containers
docker compose ps

# Show logs for all running containers
docker compose logs

# Follow logs
docker compose logs -f

# Show logs for a specific container
docker compose logs frontend
docker compose logs rest-api
docker compose logs database
docker compose logs taxii
```

## Contributing
See [k8s/README](k8s/README.md) for detailed instructions.

Please refer to the [contribution guide](./docs/CONTRIBUTING.md) for contribution guidelines, as well as the [developer guide](./docs/DEVELOPMENT.md) for information on our release process.
## Troubleshooting & Support

## License
- View logs: `docker compose logs -f`
- Check running containers: `docker compose ps`

This project is licensed under the Apache License 2.0. See the [LICENSE](./LICENSE) file for details.
More tips in [docs/troubleshooting](docs/troubleshooting.md).

## Support
For questions or issues, visit the [GitHub issues page](https://github.com/mitre-attack/attack-workbench-deployment/issues).

For issues and questions:
## Contributing & License

- Check the [deployment repository issues](https://github.com/center-for-threat-informed-defense/attack-workbench-deployment/issues)
- Refer to the main [ATT&CK Workbench documentation](https://github.com/center-for-threat-informed-defense/attack-workbench-frontend)
- Contribution guide: [contribution guide](./docs/CONTRIBUTING.md)
- Developer guide: [developer guide](./docs/DEVELOPMENT.md)
- License: [Apache License 2.0](./LICENSE)
2 changes: 1 addition & 1 deletion certs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you're using environment variables in your shell, you can use:

```yaml
volumes:
- .${HOST_CERTS_PATH}:/usr/src/app/certs
- ${HOST_CERTS_PATH}:/usr/src/app/certs
environment:
- NODE_EXTRA_CA_CERTS=./certs/${CERTS_FILENAME}
```
Expand Down
13 changes: 0 additions & 13 deletions compose.dev.yaml

This file was deleted.

86 changes: 0 additions & 86 deletions compose.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions configs/frontend/nginx.conf

This file was deleted.

Loading