# API: Anfragen von Traefik und vom Frontend. Raus nur zu Postgres und per # 443 zu oeffentlichen Adressen (Have I Been Pwned, Open-Meteo, Entra-Login). # Canal kennt keine FQDN-Regeln, darum "443 ohne private Bereiche"; den # SSRF-Schutz fuer Webhook-Ziele behaelt die App (webhook-url-guard.ts). apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: apicore-api spec: podSelector: matchLabels: app: apicore-backend policyTypes: [Ingress, Egress] ingress: - from: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: kube-system podSelector: matchLabels: app.kubernetes.io/name: rke2-traefik - podSelector: matchLabels: app: apicore-frontend ports: - {protocol: TCP, port: 3001} egress: - to: - podSelector: matchLabels: app.kubernetes.io/name: apicore-postgres ports: - {protocol: TCP, port: 5432} - to: - ipBlock: cidr: "0.0.0.0/0" except: ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "100.64.0.0/10", "169.254.0.0/16", "127.0.0.0/8"] - ipBlock: cidr: "::/0" except: ["fc00::/7", "fe80::/10", "::1/128"] ports: - {protocol: TCP, port: 443}