Expose embedded NATS securely to managed task containers #386
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#386
Reference in new issue
Block a user
Embedded NATS currently binds unauthenticated loopback, so task containers cannot use it. Give the daemon and task containers distinct reachable URLs for the same embedded listener, require generated per-start credentials, and wire Docker host/network reachability without exposing credentials in logs or config files.
Acceptance criteria
Native archied can connect to embedded JetStream; managed agent containers can connect to the same listener; all connections require a cryptographically generated token; the listener is not exposed on ordinary LAN interfaces; lifecycle and container environment tests pass.
Notes
Implemented authenticated embedded NATS reachability for native archied plus managed Docker workers. Embedded NATS now generates a crypto token per start, binds the resolved local Docker bridge gateway when a pool is available, and freezes URL/token into worker env. Added bridge validation, cleanup ordering, config acceptance/guardrails, Docker-create seam tests, lifecycle/auth tests, and amended the architecture decision. task check passed; focused race passed; new-code lint 0; fresh adversarial re-review 0 findings.
Close reason
Implemented in 5c4b599 (feat(nats): expose embedded broker to managed workers); per-start token, Docker bridge binding, frozen worker env. Verified landed on main.
Imported from beads
archie-core-q15y.1· GitHub #619 · type feature · priority P1 · created 2026-08-24 · closed 2026-08-24