feat(egress): host-side guarded-egress proxy (policy + forward proxy)#2
Merged
Conversation
First slice of M6-6 guarded egress: a self-contained egress package with the allow-list policy schema + evaluator and a host-side forward proxy — CONNECT tunnelling (host allow/deny) plus absolute-form HTTP with node-side credential injection and typed 403 denials. Stdlib-only and not yet wired into the claim path; config, per-sandbox listeners, the silkd egress_dial verb, and nftables enforcement land in follow-up slices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M6-6 / M7-A guarded egress — first slice
Introduces a self-contained
sandboxd/egresspackage: the foundation for turning egress into an allow-listed, audited resource enforced host-side, so a sandbox gets the effect of a credential and never the credential itself.What lands here
policy.go): the config schema (Policy,Rule,Decision) and a pure evaluator — host matching (exact /*.suffixwildcard that excludes the apex /*), method filtering,Validate,Eval.proxy.go): a host-sidehttp.Handlerhandling CONNECT tunnels (host allow/deny + splice) and absolute-form HTTP (allow/deny + method check + node-side secret injection that overwrites any guest-supplied value + response relay), with typed 403 denials and pluggableDialFunc/Secrets/Auditseams.Scope
Stdlib-only, touches no existing file, and is not wired into the claim/refill hot path — so it cannot affect the running data plane. Deliberately out of this slice (follow-ups): config wiring, per-sandbox listeners, the silkd
egress_dialverb, TLS interception CA, and nftables enforcement. The full design is incocoon-specs/sandbox/sandbox-m6-6-guarded-egress.md.Gates
go build ./... && go test ./egress/...green;golangci-lint0 issues on linux and darwin.