refactor: remove leftovers from the orchestrator/gateway consolidation
Sweep for vestiges of the old combined-plane model and the pre-split shared rootfs. Two are load-bearing, the rest are stale docs/comments: - Bug: macOS `enumerate_active` only excluded the gateway container from the agent list, so after the split the orchestrator container (`bot-bottle-mac-orchestrator`, also `bot-bottle-`-prefixed) was enumerated as a phantom agent. Exclude both infra containers; test covers it. - Dead code: the gateway `bootstrap.py` still carried an `orchestrator` daemon spec + `_OPT_IN_DAEMONS` + a signing-key/JWT env branch, all for the old combined container where the gateway process could also run the control plane. No backend ever requests it now — removed; the key-stripping stays as defense-in-depth. Stale-comment reframes: "the/single infra container" -> the orchestrator + gateway pair (or the specific plane); "shared rootfs / bb_role init / one published rootfs" -> the per-plane rootfs + `role_init`; the deleted Dockerfile.infra references in Dockerfile.orchestrator/.gateway; and the macOS "one infra container ... same address" docstring + its now-false share-one-address test (the planes are distinct containers with distinct addresses). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -64,11 +64,11 @@ class TestEnvForDaemon(unittest.TestCase):
|
||||
self.assertNotIn("X", self._BASE)
|
||||
|
||||
|
||||
class TestOrchestratorEnvScoping(unittest.TestCase):
|
||||
"""The control-plane signing key stays with the orchestrator; the pre-minted
|
||||
`gateway` JWT goes to the data-plane daemons (issue #469 review). Scoping
|
||||
them per-process keeps a compromised data-plane daemon from reading the key
|
||||
and minting a higher-privilege token, even in the combined infra container."""
|
||||
class TestSigningKeyScoping(unittest.TestCase):
|
||||
"""The gateway never holds the control-plane signing key — it's the
|
||||
orchestrator's, which runs in a separate container/VM. Its daemons present
|
||||
the pre-minted `gateway` JWT instead; the key is stripped from every daemon's
|
||||
env as defense-in-depth (issue #469 review)."""
|
||||
|
||||
_BASE = {
|
||||
"PATH": "/usr/bin",
|
||||
@@ -76,11 +76,6 @@ class TestOrchestratorEnvScoping(unittest.TestCase):
|
||||
"BOT_BOTTLE_ORCHESTRATOR_AUTH_JWT": "gw-jwt",
|
||||
}
|
||||
|
||||
def test_orchestrator_gets_key_not_jwt(self):
|
||||
env = _env_for_daemon("orchestrator", self._BASE)
|
||||
self.assertEqual("sk-x", env["BOT_BOTTLE_ORCHESTRATOR_TOKEN"])
|
||||
self.assertNotIn("BOT_BOTTLE_ORCHESTRATOR_AUTH_JWT", env)
|
||||
|
||||
def test_data_plane_daemons_get_jwt_not_key(self):
|
||||
for name in ("egress", "git-gate", "git-http", "supervise"):
|
||||
env = _env_for_daemon(name, self._BASE)
|
||||
|
||||
Reference in New Issue
Block a user