Expose embedded NATS securely to managed task containers #386

Closed
opened 2026-10-27 13:36:07 +00:00 by sam · 0 comments
Owner

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

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_
sam added the highfeature labels 2026-10-27 13:36:08 +00:00
sam self-assigned this 2026-10-27 13:36:08 +00:00
sam closed this issue 2026-10-27 13:36:08 +00:00
sam added a new dependency 2026-10-27 13:41:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#386