Skip to content

Port backend remainder: submissions, orchestrator, reports generation, host-local signals, settings admin APIs #1612

Description

@Xore

Split out of #1608's handoff so this can run in parallel with the visual completion pass (in progress on port-foundation — coordinate by rebasing on that branch; frontend routes and small READ endpoints are being handled there, this issue owns the write paths, workers, and host-coupled backends).

Scope (work directly on port-foundation, Rust tier arcane/home/honeypot-dashboard/backend-service/)

1. Mounted worker role (spool-dir flows)

The legacy Go dashboard writes/reads host spool dirs (see the dashboard service volumes in arcane/home/honeypot-dashboard/compose.yml). Add a mounted variant of the backend-worker compose service and port:

  • Sandbox submission: POST writes a request file into SANDBOX_REQUEST_DIR (+ windows/ghosts variants), status from the worker's status file (sandbox.go / sandbox_submit.go / sandbox_golden_image_status).
  • Ghidra submission (ghidra_submit.go) and GitHub-analysis submission (github_analysis_submit.go) — same request-spool pattern.
  • Workbench orchestrator (workbench_orchestrator.go, ~590 lines): recipe → child analyzer runs → spools, state in dashboard-workbench-runs-v1.
  • On-demand payload bytes mirror (payload_bytes_es.go mirrorOnePayloadBytes): static analysis path self-heal.
  • Expose all as /api/v1/* endpoints behind the existing service-token middleware.

2. Reports generation

3. Alert notifier host-local signals (extend src/worker.rs)

ES-derivable signals are done. Missing (all need mounts or service URLs):

  • log-stream size alerts (scanLogStreams over LOG_DIR, thresholds LOG_STREAM_MAX_BYTES / LOG_STREAM_ALERT_PERCENT)
  • sandbox/ghidra spool + worker-status health (loadSandboxStatus / loadGhidraStatus)
  • filebeat stats via FILEBEAT_URL (ingestion-unhealthy / filebeat-loss alerts)
  • cape/github-analysis alert emitters (capeAlerts / githubAnalysisAlerts)
  • OT command alerts (T1692.001 per source — can be ES-derived from honeypot.canonical_attck_techniques, no mount needed)

4. Settings admin backend APIs

  • Services control through the services-adapter socket (settings_services_api.go; tier decision — the socket is host-local)
  • Retention settings (settings_retention / ES ILM), config history + rollback (settings_history.go), audit trail (settings_audit.go)
  • Per-user preference sync: read/write the per-subject preferences blob in dashboard-users-v1 (settings_users.go) — the ported UI currently keeps theme/palette/prefetch in localStorage only; add GET/PUT /api/v1/preferences so prefs follow the operator across browsers
  • Reporter stats passthrough (settings_reporter_stats_api.go)

5. Misc write paths

  • honeyfs-implant credential provisioning/rotation passthrough (honeyfs_implant_client.go; HONEYFS_IMPLANT_URL, off-unless-configured)
  • Canarytokens: fired-event ack/management beyond mint+download if the legacy UI has any (canarytokens_manager.go)

Explicitly NOT in this issue (being done in the visual pass right now — avoid collisions)

  • Frontend routes/components, and these small READ endpoints: sandbox-run-by-job, ghidra-by-sha, revdeck/cape/github store passthroughs, attackers-graph, attack-vectors drill-down, ML anomaly ack (single-doc update, mirrors alert ack).

Conventions

  • Tests: extend arcane/home/honeypot-dashboard/port-tests/ (README has the harness contract; live ES via ssh -N -L 19200:172.16.1.12:9200 xore@192.168.42.250; writes only to TEST-NET/test values, restore state).
  • honeypot.* is flattened (no wildcard/stats aggs); prefer honeypot.canonical_* fields.
  • Same-image worker roles via WORKER_LOOPS env; keep every service stateless/env-configured (cross-host requirement, see Port follow-up: migrate every worker into the new BFF/service architecture; BFF scalability #1610).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions