Network modes per zone and per isolation tier: mediated, filtered, direct

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
kubernetes, linux, rust

Research direction

Start with design §7 and §9.1, then read the referenced issues #5, #27, #48, #49, and #62 to understand the constraints. Trace the network setup entry points for each isolation tier, especially gVisor, runc, and Firecracker; the issue does not name implementation files or tests. Done means a direct gVisor zone downloads near line rate while steered traffic still uses the proxy, mediated behavior stays unchanged, and an agent cannot create a more open child zone.

Written by the indexing model from the issue text.

Description

enhancement

Why. Full mediation (every byte through wicket's proxies) is the right default, but some zones need raw speed. One per-zone setting, three modes, implemented for each isolation tier.

Modes (zone.network):

  • mediated (default, built for gVisor and runc): no interface. Everything goes through wicket's endpoints at wicket.internal, with full per-request control, approvals, injection and audit. DNS isn't an exfiltration route.
  • filtered: a real interface. The host filters by IP and DNS name to an allowlist. Requests aren't inspected.
  • direct (the fast path): a real interface with open internet, except steered domains (those with credential injection or request-level rules). wicket's resolver answers steered domains with wicket.internal, so they reach the proxy, which decrypts, checks and injects. Every other name leaves through NAT on the host, UDP and HTTP/3 included. A box that bypasses the resolver reaches steered domains without credentials, which grants nothing. Credentials never enter the box in any mode.

Per tier:

  • gVisor: --network none plus sockets (mediated); gVisor's network stack on a veth, with host-side nftables, NAT and wicket's resolver (filtered/direct). Filtering stays outside the box.
  • runc: the same as gVisor.
  • Firecracker / Cloud Hypervisor: vsock only, no net device (mediated); virtio-net on a host TAP with host nftables and NAT, plus Firecracker's bandwidth limits (filtered/direct).
  • Kata: vsock forwarding for wicket's endpoints (to verify); Kubernetes network policy (e.g. Cilium DNS-aware rules) plus steering (filtered/direct).
  • Virtualization.framework (#48): vsock only (mediated); a file-handle network device with wicket as the NAT in user space (controlled, slower), or Apple's NAT with pf rules (filtered/direct).
  • Seatbelt (#49): network only to wicket's forwarders (mediated); general outbound with steering only by proxy environment variables, which programs can ignore (direct, weakest). Document it as such.

Policy:

  • direct and filtered give up per-request control and audit for unsteered traffic, and DNS becomes an exfiltration route. Allow them only for zones with nothing confidential to leak (no private repositories, confidential volumes or tenant data).
  • Only a human grants them.
  • By the subset rule (#5), a zone can't give a child a more open mode than its own.
  • The zone view and approval cards say "open internet".
  • With #27, a direct zone counts as an untrusted source to tracked zones.

Done when. A direct gVisor zone downloads at near line rate while api.github.com still goes through the proxy with injection; a mediated zone is unchanged; an agent can't create a direct child from a mediated zone.

Refs. #5, #27, #48, #49, #62; design §7, §9.1.

Dominant language
Rust
Stars
0
Forks
0
Avg merge
1h 43m
Merged PRs (30d)
190

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from public/wicket

All issues in public/wicket

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.