dev_arc_aws/src/pages
Samuel James 35fd7fc703
Add Docker-over-SSH management and push-agent monitoring (#31)
Expands the Containers feature with two new ways to see and manage Docker
containers without exposing the Docker Engine TCP socket, plus the docs and
roadmap entries that frame them.

Docker over SSH (management):
- Runs the `docker` CLI on a remote SSH host instead of talking to the Engine
  TCP API, reusing the existing SSH transport (jump-host chaining, host-key
  verification, key/password auth) via connectTarget + execCommand. No dockerd
  socket has to be exposed — the mesh + SSH auth are the gate.
- backend/src/ssh/docker.ts: list/logs/start/stop/restart/pause/unpause/remove
  and an interactive `docker exec` shell builder. Container refs are validated
  against a strict allowlist and single-quoted to prevent command injection;
  action verbs are whitelisted.
- backend/src/routes/dockerSsh.ts: REST routes mirroring the TCP Docker API
  shape (mutating actions gated by adminOnly) + a /api/docker-ssh/exec
  WebSocket modeled on the terminal PTY plumbing.
- Note: the SSH path uses the ssh2 key/password auth; it does not implement the
  OpenSSH-certificate (OPKSSH) fallback that the terminal route has.

Docker push-agent monitoring (self-hosted, read-only):
- A small bash agent (agent/archnest-docker-agent.sh) runs on each Docker VM,
  collects a rich snapshot (docker ps + inspect + a stats snapshot), masks
  secret-looking env values locally, and POSTs it to ArchNest. VMs need
  outbound-only mesh access — no exposed port, no SSH for monitoring.
- backend/src/routes/agents.ts: token-gated ingest
  (POST /api/agents/docker/report, ARCHNEST_AGENT_TOKEN, constant-time compare;
  503 when unset, so it is disabled by default) plus user-auth read endpoints
  (hosts list with staleness flag, per-host containers, single-container
  detail). New docker_agent_reports table (latest report per host).
- Ingest stores data only; it never executes anything from the agent.

Containers page:
- Host selector now spans Docker API, SSH, and Agent sources.
- Intra-page tabs: a Containers list plus dynamic, closeable per-container
  detail tabs opened by clicking a container name. Agent detail shows
  overview/state/stats/ports/networks/mounts/env(masked)/labels; docker/ssh
  degrade gracefully. Agent rows are read-only; docker/ssh keep management.

Docs/roadmap:
- docs/docker-agent-monitoring.md (design doc, written before implementation).
- ROADMAP.md: LXC management (paid), Docker monitoring agent tiering
  (push self-hosted now / pull-agent paid), terminal grid tiering.

Deferred (documented, not built here): the mesh-prerequisite setup gate, the
paid pull-agent (Option 2), per-host tokens, time-series metrics.

Requires ARCHNEST_AGENT_TOKEN in the backend env to enable agent ingest.
Verified: backend `tsc --noEmit` and frontend `tsc -b && vite build` both pass;
agent jq filters, byte conversion, and `bash -n` checked locally.

Co-authored-by: Samuel James <ssamjame@amazon.com>
Co-authored-by: Kiro <noreply@kiro.dev>
2026-06-20 16:24:57 -04:00
..
BookNest.tsx Add bulk delete-all for bookmarks (#20) 2026-06-20 09:09:44 -04:00
Containers.tsx Add Docker-over-SSH management and push-agent monitoring (#31) 2026-06-20 16:24:57 -04:00
Enrollment.tsx Add enrollment, login, and auth-gated routing to the frontend 2026-06-18 19:13:27 +00:00
Files.tsx Fix page titles, dropdown stacking, bookmark editing, and button/select polish 2026-06-19 21:34:04 +00:00
Glance.tsx Add client-side routing and build Infrastructure page 2026-06-18 16:15:34 +00:00
Help.tsx Fix favicon, dark select dropdowns, add brand bookmark icons and Help page 2026-06-19 21:13:32 +00:00
HostMetrics.tsx Add host metrics widgets (Phase 6): CPU/mem/disk/network/processes/ports/firewall/login dashboard 2026-06-19 15:38:30 +00:00
Infrastructure.tsx Use network-traffic background for Integration Health card (#11) 2026-06-20 07:15:32 -04:00
Login.tsx Add enrollment, login, and auth-gated routing to the frontend 2026-06-18 19:13:27 +00:00
RemoteDesktop.tsx Phase 5: RDP/VNC/Telnet remote desktop via guacamole-lite + guacd 2026-06-19 15:25:10 +00:00
Settings.tsx Fix missing ManagedUser type import breaking the frontend build (#29) 2026-06-20 12:47:24 -04:00
Terminal.tsx Keep SSH terminal sessions connected across page navigation (#30) 2026-06-20 15:02:50 -04:00
Tunnels.tsx Phase 2: SSH tunnels (local/remote/dynamic SOCKS5 port forwarding) 2026-06-19 11:40:59 +00:00