feat/remote-egress #2

Merged
troed merged 15 commits from feat/remote-egress into main 2026-10-11 14:04:18 +02:00
Owner

Adds opt-in egress for remote umwelt sandboxes.

  • umwelt_egress rule argument renamed host -> destination (breaking).
  • Remote agent permits egress, refuses ingress; remote-install --egress
    provisions the gateway image, CA/bundle and install.json.
  • remote-install --egress records a durable [egress] floor; ctl's drift
    check keys on it; re-provision upserts it.
  • Fully-qualify base image FROM lines (host short-name config varies).

Verified end-to-end against a real server: kubectl (full TLS verify) and
pgcli reach the target host's k3s API and Postgres, internet egress works,
unlisted destinations are denied.

Adds opt-in egress for remote umwelt sandboxes. - `umwelt_egress` rule argument renamed host -> destination (breaking). - Remote agent permits egress, refuses ingress; remote-install --egress provisions the gateway image, CA/bundle and install.json. - `remote-install --egress` records a durable `[egress]` floor; ctl's drift check keys on it; re-provision upserts it. - Fully-qualify base image FROM lines (host short-name config varies). Verified end-to-end against a real server: kubectl (full TLS verify) and pgcli reach the target host's k3s API and Postgres, internet egress works, unlisted destinations are denied.
Extends the remote design: un-reduce the remote agent to the local egress
path, rename umwelt_egress's destination argument host -> destination,
opt-in server-side egress provisioning (remote-install --egress), and the
first-consumer reachability (static TCP to the host address, derived
kubeconfig, runtime tool installs).
Frees 'host' to mean the sandbox on every tool. The persisted config key
and EgressRule.host are unchanged.
The remote front-end now starts the egress gateway and enforces egress
policy exactly as run.py does; ingress stays remote-refused.
Builds the gateway image, CA, and install.json on the server and verifies
the egress prerequisites; the pushed tree now carries the gateway build
inputs.
write_config returned early when the base config already existed, before
the [egress] append, so re-provisioning a server with --egress (or
retrying a half-finished install) recorded no egress opt-in - and
_verify_server_floor keys its egress drift check on that record, yielding
a false green on remote-status. Extract append_egress_section and call it
from the leave-alone branch too, guarded by a grep for an existing
[egress] header. Covered by
test_remote_install_egress_upserts_section_into_existing_config.
The remote-targets section listed the acting tools without egress and
claimed egress was a local management call whose host argument was the
policy target. Both are wrong: egress is remote-routable, and its rule
target is the destination argument (host is the sandbox selector). Add
egress to the acting-tools list, rewrite the sentence, and mention the
--egress provisioning flag in the provisioning paragraph.
- test_run: drive a real load_install_state failure (stale schema) so the
  remote path's str.replace of the local remedy is exercised (the prior
  test only reached the append fallback) and assert the substituted
  message, not a doubled remedy.
- test_agent: assert start_egress_gateway received remote=True instead of
  swallowing it in **kw.
Apply the README fix to CONFIGURATION.md's remote-targets section, which
carried the same two false claims: its acting-tools list omitted egress,
and it called egress a local management call whose host argument was the
policy target. egress is remote-routable; its rule target is the
destination argument and host selects the sandbox. The provisioning
section already documents --egress, so only these two statements change.
Host short-name alias/search config differs per machine (openSUSE maps some
names to registry.opensuse.org), so an unqualified FROM resolved differently
on a service account and failed the gateway build. Fully-qualified pulls are
deterministic on any host with network.
troed merged commit d8128f3e4e into main 2026-10-11 14:04:18 +02:00
troed deleted branch feat/remote-egress 2026-10-11 14:04:18 +02:00
troed referenced this pull request from a commit 2026-10-11 14:04:20 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
troed/umwelt!2
No description provided.