Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git=1:2.39.5-0+deb12u3 \
ca-certificates=20230311+deb12u1 \
iproute2=6.1.0-3 \
iptables=1.8.9-2 \
&& rm -rf /var/lib/apt/lists/*

# gosu for privilege separation (gateway vs sandbox user).
Expand Down
14 changes: 12 additions & 2 deletions test/e2e-gateway-isolation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,19 @@ else
fail "symlink targets wrong:$FAILED_LINKS"
fi

# ── Test 10: Sandbox user cannot kill gateway-user processes ─────
# ── Test 10: iptables is installed (required for network policy enforcement) ──

info "10. Sandbox user cannot kill gateway-user processes"
info "10. iptables is installed"
OUT=$(run_as_root "iptables --version 2>&1")
if echo "$OUT" | grep -q "iptables v"; then
pass "iptables installed: $OUT"
else
fail "iptables not found — sandbox network policies will not be enforced: $OUT"
fi

# ── Test 11: Sandbox user cannot kill gateway-user processes ─────

info "11. Sandbox user cannot kill gateway-user processes"
# Start a dummy process as gateway, try to kill it as sandbox
OUT=$(docker run --rm --entrypoint "" "$IMAGE" bash -c '
gosu gateway sleep 60 &
Expand Down
Loading