Identity headers (X-Forwarded-User, X-Auth-Verified) are only trustworthy if downstream cannot receive direct traffic that spoofs them. Audit and fix NetworkPolicies for all services that will consume identity headers.
Services to audit
poimen-memory (poimen namespace) — needs ingress policy restricting to api namespace
management-service (sqs namespace) — already has NetworkPolicy, verify
minio (storage namespace) — has own auth, but verify no bypass
reasoning/ornith/embeddings/reranker-predictor (llm-serving) — no auth, must only accept from api namespace
For each service, verify
NetworkPolicy exists with policyTypes: [Ingress]
Ingress from only allows api namespace (and monitoring for scraping)
No wildcard ingress rules
Default deny is in effect (at least one NetworkPolicy selecting those pods)
Current state (from code review)
api-gateway NetworkPolicy exists and is comprehensive (egress to all downstreams)
llm-serving namespace: NO NetworkPolicy found — any pod in cluster can call inference engines directly
sqs namespace: has NetworkPolicy
poimen namespace: unknown
Acceptance Criteria
Every downstream that consumes X-Forwarded-* headers has ingress NetworkPolicy
llm-serving pods only accept traffic from api namespace
Verified with kubectl exec from non-api namespace (should timeout/refuse)
Review checklist
Monitoring namespace allowed for Prometheus scraping
CNPG replication traffic not blocked (pod-to-pod within same namespace)
No namespace uses plain name: label (use kubernetes.io/metadata.name)
## Summary
Identity headers (X-Forwarded-User, X-Auth-Verified) are only trustworthy if downstream cannot receive direct traffic that spoofs them. Audit and fix NetworkPolicies for all services that will consume identity headers.
## Services to audit
- [ ] `poimen-memory` (poimen namespace) — needs ingress policy restricting to `api` namespace
- [ ] `management-service` (sqs namespace) — already has NetworkPolicy, verify
- [ ] `minio` (storage namespace) — has own auth, but verify no bypass
- [ ] `reasoning/ornith/embeddings/reranker-predictor` (llm-serving) — no auth, must only accept from `api` namespace
## For each service, verify
1. NetworkPolicy exists with `policyTypes: [Ingress]`
2. Ingress `from` only allows `api` namespace (and monitoring for scraping)
3. No wildcard ingress rules
4. Default deny is in effect (at least one NetworkPolicy selecting those pods)
## Current state (from code review)
- `api-gateway` NetworkPolicy exists and is comprehensive (egress to all downstreams)
- `llm-serving` namespace: NO NetworkPolicy found — any pod in cluster can call inference engines directly
- `sqs` namespace: has NetworkPolicy
- `poimen` namespace: unknown
## Acceptance Criteria
- [ ] Every downstream that consumes X-Forwarded-* headers has ingress NetworkPolicy
- [ ] llm-serving pods only accept traffic from api namespace
- [ ] Verified with `kubectl exec` from non-api namespace (should timeout/refuse)
## Review checklist
- [ ] Monitoring namespace allowed for Prometheus scraping
- [ ] CNPG replication traffic not blocked (pod-to-pod within same namespace)
- [ ] No namespace uses plain `name:` label (use `kubernetes.io/metadata.name`)
rock
added this to the Phase 3: OAuth2 Token Exchange & Identity Propagation milestone 2026-09-08 03:57:27 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Identity headers (X-Forwarded-User, X-Auth-Verified) are only trustworthy if downstream cannot receive direct traffic that spoofs them. Audit and fix NetworkPolicies for all services that will consume identity headers.
Services to audit
poimen-memory(poimen namespace) — needs ingress policy restricting toapinamespacemanagement-service(sqs namespace) — already has NetworkPolicy, verifyminio(storage namespace) — has own auth, but verify no bypassreasoning/ornith/embeddings/reranker-predictor(llm-serving) — no auth, must only accept fromapinamespaceFor each service, verify
policyTypes: [Ingress]fromonly allowsapinamespace (and monitoring for scraping)Current state (from code review)
api-gatewayNetworkPolicy exists and is comprehensive (egress to all downstreams)llm-servingnamespace: NO NetworkPolicy found — any pod in cluster can call inference engines directlysqsnamespace: has NetworkPolicypoimennamespace: unknownAcceptance Criteria
kubectl execfrom non-api namespace (should timeout/refuse)Review checklist
name:label (usekubernetes.io/metadata.name)