P3.8: Audit NetworkPolicy — downstream must only accept gateway traffic #13

Closed
opened 2026-09-08 04:43:00 +00:00 by rock · 1 comment
Owner

Summary

Identity headers are trustworthy only if downstream cannot receive spoofed traffic directly. Audit + fix NetworkPolicies.

Config repo: rock/homelabk8s/apps/llm-serving/, k8s/apps/sqs/

Services to audit

  • llm-serving (NO NetworkPolicy — any pod can call inference directly)
  • poimen-memory
  • sqs management-service
  • minio (has own auth, verify no bypass)

Per service

  1. NetworkPolicy with policyTypes: [Ingress]
  2. Ingress from only allows api namespace + monitoring
  3. No wildcard ingress
  4. Use kubernetes.io/metadata.name (not plain name: label)

Acceptance Criteria

  • llm-serving pods only accept from api namespace
  • Verified with kubectl exec from non-api namespace (timeout/refuse)

Depends on

  • P3.4 (headers exist before downstream trusts them)
## Summary Identity headers are trustworthy only if downstream cannot receive spoofed traffic directly. Audit + fix NetworkPolicies. **Config repo:** `rock/homelab` — `k8s/apps/llm-serving/`, `k8s/apps/sqs/` ## Services to audit - [ ] llm-serving (NO NetworkPolicy — any pod can call inference directly) - [ ] poimen-memory - [ ] sqs management-service - [ ] minio (has own auth, verify no bypass) ## Per service 1. NetworkPolicy with `policyTypes: [Ingress]` 2. Ingress `from` only allows `api` namespace + monitoring 3. No wildcard ingress 4. Use `kubernetes.io/metadata.name` (not plain `name:` label) ## Acceptance Criteria - [ ] llm-serving pods only accept from api namespace - [ ] Verified with kubectl exec from non-api namespace (timeout/refuse) ## Depends on - P3.4 (headers exist before downstream trusts them)
rock added this to the Phase 3: OAuth2 Token Exchange & Identity Propagation milestone 2026-09-08 04:43:00 +00:00
rock added the priority/mediumstatus/todotype/infraarea/downstream labels 2026-09-08 04:43:01 +00:00
rock self-assigned this 2026-09-08 04:43:01 +00:00
rock added this to the API-GW OAuth project 2026-09-08 04:44:04 +00:00
rock added the status/review label 2026-09-08 16:18:52 +00:00
rock moved this to In Review in API-GW OAuth on 2026-09-08 16:19:15 +00:00
rock closed this issue 2026-09-08 22:50:38 +00:00
Author
Owner

Closed by homelab PR #15: #15

Closed by homelab PR #15: https://forgejo.riotpiao.com/riotpiao-poimen/homelab/pulls/15
Sign in to join this conversation.