| Platform | PATCH Vulnerability Mitigation Platform (VMP) — TA1 |
| Stack | TapirXL → BlueFlow → Viper |
| Phase 1 | Engineering smoke: mounted PCAP → BlueFlow upsert (one-shot) |
| Phase 2 | Audience demo: Viper asset sync via Inngest + live tcpreplay (blueflow:demo-0.3.4, tapirxl:demo-0.3.1) |
# Tools
docker # ≥ 24, Compose v2 plugin required
just
curl
jq
# First-time setup
cp .env.example .env
# Edit .env — set BLUEFLOW_API_TOKEN to a value of your choice.
# Pin BLUEFLOW_TAG=demo-0.3.4 (required for Phase 2 without compose workarounds).
# The same token is used by both BlueFlow and TapirXL; do not use two values.
docker compose pulljust parse # Parse only (no BlueFlow upload)
just boot # Start stack + seed BlueFlow
just capture # Parse and ingest (run after just boot)
just integrate # register BlueFlow ↔ Viper + trigger sync
just demo # start live replay (full stack + seed + tapirxl live)
just fresh # Tear down + wipe volumes
just check blueflow # Print asset counts + names from BlueFlow
just check viper # Print asset counts + names from Viper
just logs # Tail tapirxl + blueflow
just ps # Show service healthWhat it proves: mounted PCAP → TapirXL → Vector → BlueFlow upsert. Viper is running but not exercised.
# Optional: parse PCAP to JSON only (no BlueFlow upload)
just parse
# Boot stack + seed BlueFlow
just boot
# Run one-shot PCAP ingest
just capture
# Verify
just check blueflow
# expect: count = 8, all assets nameddocker compose exec viper npm run db:create-test-api-key
export VIPER_API_KEY=<key printed above>just integrateinit/register-viper.sh does two things:
- Step A:
integrations.create(tRPC) — registers BlueFlow as a PARTNER integration in Viper withintegrationUri = http://blueflow:8000/api/viper/webhook/ - Step B:
integrations.triggerSync(tRPC) — fires an immediate Inngest sync event
Sync flow (automatic after Step B):
- Viper Inngest generates a one-time callback token
- POSTs
{callback, since, max_pages, page_size}to BlueFlow's/api/viper/webhook/ - BlueFlow executes the Celery task synchronously (
CELERY_TASK_ALWAYS_EAGER=Truein dev settings) - BlueFlow POSTs paginated assets to
http://viper.local:3000/api/v1/assets/integrationUpload/{token}(in-cluster hostname; seecompose.yamlviper.localalias)
The blueflow-worker container is not required in this configuration. Stock blueflow/celery/tasks.py from demo-0.3.4 is used.
just integrate also runs init/backfill-last-pinged.sh (workaround B3): TapirXL upsert leaves Asset.last_pinged null, but the webhook queryset filters on last_pinged__gte=since.
# BlueFlow
just check blueflow
# Viper
just check viper
open http://localhost:3000curl -sS -H "Authorization: Bearer ${VIPER_API_KEY}" \
"http://localhost:3000/api/v1/assets?pageSize=100" \
| jq '[.items[] | select(.upstreamApi | test("localhost:8000")) | {hostname, mac: .macAddress, upstream: .upstreamApi}]'Viper's total asset count may be higher than the asset count in BlueFlow due to seed data.
After just fresh, expect the eight PCAP display_name values to appear in that filtered list.
If some are missing while docker compose logs blueflow shows viper_webhook succeeded with no TypeError, treat it as a Viper integrationUpload item-handling issue (see failure modes). Viper re-syncs automatically every 5 minutes via Inngest cron.
just demo
just logsjust demo brings up the full stack (including seed) and starts tapirxl in
live mode with the replay tcpreplay sidecar. TapirXL listens on the shared
netns eth0; replay loops the PCAP continuously, so BlueFlow is fed a
steady stream of upserts. Watch just logs for PUT /api/assets/upsert/ 200
lines confirming the pipeline is live.
just fresh # wipes all named volumes; start from Phase 1 on next run