netpol: allow edge 4647 from node2 kilo gateway IP

Cross-cluster mesh traffic arrives SNATed through the node2 kilo
gateway (10.4.2.1), not with the original node2 pod CIDR source —
confirmed via tcpdump on node4 kilo0. /32 on the gateway preserves the
outpost-only restriction while letting the Authentik proxy outpost
through.
This commit is contained in:
Ubuntu
2026-10-23 12:43:36 +00:00
parent deb8968307
commit 510d85bde5
+7 -5
View File
@@ -191,10 +191,12 @@ metadata:
# - port 4646 (internal, token-gated): any source (cluster + federation
# mesh). Auth is enforced by PROXY_INTERNAL_TOKEN in the app layer —
# the Authentik trust header is NOT accepted on this port.
# - port 4647 (edge): Authentik outpost only. The outpost runs on node2
# (pod CIDR 10.42.0.0/24, preserved across the kilo mesh). Direct
# in-cluster access to the edge port is blocked, so the
# X-Authentik-Username trust header cannot be forged locally.
# - port 4647 (edge): Authentik outpost only. The outpost runs on node2;
# cross-cluster mesh traffic is SNATed by kilo to the node2 gateway
# address (10.4.2.1/32), so the CIDR below is the node2 kilo gateway,
# not the node2 pod CIDR. Direct in-cluster access to the edge port is
# blocked, so the X-Authentik-Username trust header cannot be forged
# locally.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
@@ -215,7 +217,7 @@ spec:
port: 4646
- from:
- ipBlock:
cidr: 10.42.0.0/24
cidr: 10.4.2.1/32
ports:
- protocol: TCP
port: 4647