enforce enclave ingress and egress allowlists #457

Manually merged
vkobel merged 1 commit from fix/reject-unsupported-egress into main 2026-10-17 03:24:40 +00:00
vkobel commented 2026-09-14 17:51:38 +00:00 (Migrated from codeberg.org)

Summary

  • Validate and preserve IPv4 source/destination, protocol and port allowlists across managed and BYOC deployment generation.
  • Enforce application ingress before TCP-to-vsock forwarding loses the socket peer; keep HTTP upstream ports private and scope recovery listeners separately.
  • Apply stateful, fail-closed guest egress filtering, including explicit DNS permissions, parent/metadata protection and IPv6 denial. Install policy before the TAP/tunnel can carry traffic.
  • Preserve historical measured-network inputs for reproduction while applying strict validation to new deployments.
  • Keep user documentation in the existing companion docs PR #36, not this repository.

Scope and documentation cleanup

Current head: 63f98c1676ea9a3135e934c0439f35c84b1fbbf7, one signed commit on dfb626b820e13c7c6fd45c116bd66e1676361ba6, preserving the existing author/date.

The cleanup relative to 5a2e11d7953001cff964692d2db8782edc40e3b6 removes only docs/network-policy.md and the feature-added README section: 172 lines removed. README now matches main. Every runtime and test blob is unchanged. The PR-only file inventory is 18 paths; no agent files, campaign scripts or unrelated fixes were added.

Exact-head local verification

Run on the current head in a sanitized environment with Rust 1.96.1 and CARGO_BUILD_JOBS=16:

  • make test-network-policy — passed: 11 lifecycle tests, 11 API/rendering/local-Caddy checks, and 15 real namespace packet tests using the production firewall template.
  • make test-cli-install test-bootstrap — passed installer checks and all 10 bootstrap tests.
  • unshare --user --map-root-user --net cargo test --manifest-path src/tap-framer/Cargo.toml tests::real_tap_is_up_and_lives_until_last_owned_fd_closes -- --ignored --exact — passed the real-TAP lifetime test.
  • make test — exit 2, not a green full-suite result: 1,075 passed, 2 failed, 15 ignored before Cargo stopped. The two failures are handlers::common::tests::public_key_lookup_failure_is_internal and handlers::credentials::passkey::tests::same_account_duplicate_body_is_distinct_from_cross_account. Both were previously reproduced on exact main dfb626b8; gateway sources and workspace dependency files remain identical to that baseline.
  • git diff --check dfb626b8...HEAD and clean integration with main — passed.

Focused counts overlap the regular suite and must not be added to it. The docs companion also has a passing production build, six network examples validated through the real HCL/config parser, and a rendered local-link check. Earlier Clippy findings were baseline-reproduced; Clippy was not rerun for this docs-only delta.

Remaining rollout qualification

No cloud deployment or production validation was performed for this cleanup. Local packet/proxy/bootstrap checks do not establish actual AWS cloud-init, security-group attachment, native vsock/Nitro integration or live S3/IAM behavior. A focused exact-runtime AWS/Nitro networking smoke test remains required before rollout; a full BYOC business-flow suite is not a blanket merge prerequisite.

The PR remains draft; no merge or deployment is implied by this update.

## Summary - Validate and preserve IPv4 source/destination, protocol and port allowlists across managed and BYOC deployment generation. - Enforce application ingress before TCP-to-vsock forwarding loses the socket peer; keep HTTP upstream ports private and scope recovery listeners separately. - Apply stateful, fail-closed guest egress filtering, including explicit DNS permissions, parent/metadata protection and IPv6 denial. Install policy before the TAP/tunnel can carry traffic. - Preserve historical measured-network inputs for reproduction while applying strict validation to new deployments. - Keep user documentation in the existing companion [docs PR #36](https://git.caution.co/public/docs/pulls/36), not this repository. ## Scope and documentation cleanup Current head: `63f98c1676ea9a3135e934c0439f35c84b1fbbf7`, one signed commit on `dfb626b820e13c7c6fd45c116bd66e1676361ba6`, preserving the existing author/date. The cleanup relative to `5a2e11d7953001cff964692d2db8782edc40e3b6` removes only `docs/network-policy.md` and the feature-added README section: 172 lines removed. README now matches main. Every runtime and test blob is unchanged. The PR-only file inventory is 18 paths; no agent files, campaign scripts or unrelated fixes were added. ## Exact-head local verification Run on the current head in a sanitized environment with Rust 1.96.1 and `CARGO_BUILD_JOBS=16`: - `make test-network-policy` — passed: 11 lifecycle tests, 11 API/rendering/local-Caddy checks, and 15 real namespace packet tests using the production firewall template. - `make test-cli-install test-bootstrap` — passed installer checks and all 10 bootstrap tests. - `unshare --user --map-root-user --net cargo test --manifest-path src/tap-framer/Cargo.toml tests::real_tap_is_up_and_lives_until_last_owned_fd_closes -- --ignored --exact` — passed the real-TAP lifetime test. - `make test` — **exit 2, not a green full-suite result**: 1,075 passed, 2 failed, 15 ignored before Cargo stopped. The two failures are `handlers::common::tests::public_key_lookup_failure_is_internal` and `handlers::credentials::passkey::tests::same_account_duplicate_body_is_distinct_from_cross_account`. Both were previously reproduced on exact main `dfb626b8`; gateway sources and workspace dependency files remain identical to that baseline. - `git diff --check dfb626b8...HEAD` and clean integration with main — passed. Focused counts overlap the regular suite and must not be added to it. The docs companion also has a passing production build, six network examples validated through the real HCL/config parser, and a rendered local-link check. Earlier Clippy findings were baseline-reproduced; Clippy was not rerun for this docs-only delta. ## Remaining rollout qualification No cloud deployment or production validation was performed for this cleanup. Local packet/proxy/bootstrap checks do not establish actual AWS cloud-init, security-group attachment, native vsock/Nitro integration or live S3/IAM behavior. A focused exact-runtime AWS/Nitro networking smoke test remains required before rollout; a full BYOC business-flow suite is not a blanket merge prerequisite. The PR remains draft; no merge or deployment is implied by this update.
anton changed title from Reject unsupported egress restrictions to WIP: enforce enclave ingress and egress allowlists 2026-10-15 05:30:40 +00:00
anton force-pushed fix/reject-unsupported-egress from 30ead510fc to 0ddc14424d 2026-10-15 05:30:41 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from 7e657f3c5a to c0e5319dea 2026-10-16 05:14:28 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from d986011de9 to f4e812a0b6 2026-10-17 02:40:55 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from f4e812a0b6 to 3ef81d75df 2026-10-17 02:49:46 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from 3ef81d75df to 5a2e11d795 2026-10-17 02:54:17 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from 5a2e11d795 to 63f98c1676 2026-10-17 03:16:55 +00:00 Compare
anton force-pushed fix/reject-unsupported-egress from 63f98c1676 to 8a3e193d63 2026-10-17 03:22:43 +00:00 Compare
anton changed title from WIP: enforce enclave ingress and egress allowlists to enforce enclave ingress and egress allowlists 2026-10-17 03:24:13 +00:00
anton manually merged commit 8a3e193d63 into main 2026-10-17 03:24:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
public/platform!457
No description provided.