feat(network-policy): opt-in operator egress NetworkPolicy for the kustomize base (#299) - #317
Merged
Merged
Conversation
…stomize base (#299) The Helm chart already restricts operator egress (networkPolicy.enable), but the kustomize base had only the metrics ingress rule, so a non-Helm deployment had no egress control. Add config/network-policy/allow-egress-traffic.yaml — the network-layer half of the remoteControl.endpoint SSRF defense: default-deny egress with explicit allows for DNS, HTTPS 443 (API server / CelesTrak / Space-Track), and the per-CR Prometheus (9090) and gNB (8001) ports. It joins the already opt-in config/network-policy bundle (disabled by default; needs a NetworkPolicy-enforcing CNI), so existing deployments are unchanged. Documents that the port-only gNB rule must be replaced with a CIDR-scoped to: block to actually bound where the operator may dial; the app-layer --remote-control-allowed-endpoint-hosts list is the complement.
thc1006
force-pushed
the
feat/operator-egress-networkpolicy
branch
from
July 31, 2026 01:26
8921cba to
bec8412
Compare
This was referenced Jul 31, 2026
Merged
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.
The network-layer half of the
remoteControl.endpointSSRF defense tracked in #299.Context
#299's proposed defense is two-layer: an app-layer host allow-list (already shipped as
--remote-control-allowed-endpoint-hostsin #300) plus a network-layer egress restriction. The Helm chart already ships the egress policy (dist/chart/templates/manager/networkpolicy.yaml, gated bynetworkPolicy.enable, with per-CR gNB/Prometheus port values andextraEgressfor CIDR-scoping). But the kustomize base (config/network-policy/) only had the metrics ingress rule — so a non-Helm (kubectl apply -k) deployment had no egress control. This adds the parity resource.Change
config/network-policy/allow-egress-traffic.yaml— default-deny egress with explicit allows:metricsSource)Added to the already opt-in
config/network-policybundle (config/default/kustomization.yamlkeeps- ../network-policycommented out), so existing deployments are unchanged. Needs a NetworkPolicy-enforcing CNI (Calico/Cilium; Kind's kindnet does not enforce, so it is inert on e2e).SSRF note (in the file)
The port-only gNB/Prometheus rules allow those ports to any destination, which does not stop the operator dialing an arbitrary host on that port. The file documents replacing the port-only gNB rule with a CIDR-scoped
to: [ipBlock]block to actually bound egress to sanctioned gNB subnets — that, plus the app-layer allow-list, is what closes the probing surface. The ground-station monitoring endpoint (also CR-controlled) is called out as another egress to scope.Verification
kustomize build config/network-policyrenders both policies (Egress + Ingress);kustomize build config/defaultunchanged (bundle stays commented out).With this, #299's two-layer defense exists in both the Helm and kustomize paths; the remaining #299 items (a
ServiceReferencealternative to free-formhost:port) stay tracked there.