Repository navigation
fix(minvmd): honor the egress deny-all opt-out for undeclared host rows - #2043
Conversation
The host-side egress gate compiled a client box with no `egress` section to allow-all unconditionally, ignoring both the rollout phase and the operator's `MINVMD_EGRESS_DENY_ALL_OPT_OUT` opt-out. The guest daemon resolves the same absent section through `sessions::effective_egress`, so an opted-out VM host denied at the host what the guest allowed. Thread the opt-out into `BoxRegistry` and resolve an absent section via `sessions::effective_egress` in `register_client_box_as`, so the host gate and the guest gate agree. Share the duplicated true/false parse in `sessions::egress_deny_all_opt_out_from_raw`, and name the VM host's variable in the activate notice on VM-backed hosts. Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVex3Yg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change shares egress opt-out parsing, applies phase-dependent defaults to VM client boxes, and configures the VM supervisor from the opt-out environment variable. VM-backed session notices and tests now use the VM-specific restart instruction. ChangesVM egress defaults
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant run_foreground
participant egress_deny_all_opt_out_from_env
participant sessions_egress_deny_all_opt_out_from_raw
participant BoxRegistry
participant register_client_box_as
run_foreground->>egress_deny_all_opt_out_from_env: read opt-out environment value
egress_deny_all_opt_out_from_env->>sessions_egress_deny_all_opt_out_from_raw: parse raw value
run_foreground->>BoxRegistry: configure opt-out
BoxRegistry->>register_client_box_as: resolve undeclared egress by phase and opt-out
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The VM egress default, opt-out handling, and notice changes have no identified issue that should block merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the egress gate, Comment |
…ll notice VM-backed lanes now assert the announcement names MINVMD_EGRESS_DENY_ALL_OPT_OUT=1 and not the native flag. The box_registry test also pins a declared egress section in both directions and covers the (Announced, opt-out) arm. The phase field doc notes that host/guest agreement needs the two phase constants to match.
|
/review |
|
@coderabbitai review |
|
Approved: no findings at Nothing to do. Clobber: none: |
|
The host gate's UNREGISTERED_SOURCE_PHASE and the guest daemon's sessions::EGRESS_DEFAULT_PHASE are one rollout. A const assertion now fails the build if only one of them flips.
|
/review |
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
The host-side egress gate compiled a client box with no
egresssection to allow-all unconditionally, ignoring both the rollout phase and the operator'sMINVMD_EGRESS_DENY_ALL_OPT_OUTopt-out. The guest daemon resolves the same absent section throughsessions::effective_egress, so an opted-out VM host denied at the host what the guest allowed.This threads the opt-out into
BoxRegistryand resolves an absent section viasessions::effective_egressinregister_client_box_as, so the host gate and the guest gate agree. It also shares the duplicated true/false parse insessions::egress_deny_all_opt_out_from_raw, and names the VM host's variable in the activate notice on VM-backed hosts.Part of the egress default rollout: both phase constants flip together.
UNREGISTERED_SOURCE_PHASE(minvmd) andsessions::EGRESS_DEFAULT_PHASEare pinned to each other by a const assertion inegress_gate.rs.Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVex3Yg
Summary by CodeRabbit
MINVMD_EGRESS_DENY_ALL_OPT_OUT=1; native daemons continue to receive the--egress-deny-all-opt-outoption.