Skip to content

Add NetworkPolicy for the ZTWIM namespace#145

Open
p-rog wants to merge 25 commits into
validatedpatterns:mainfrom
p-rog:network-policy
Open

Add NetworkPolicy for the ZTWIM namespace#145
p-rog wants to merge 25 commits into
validatedpatterns:mainfrom
p-rog:network-policy

Conversation

@p-rog

@p-rog p-rog commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds network isolation for the zero-trust-workload-identity-manager namespace using the default-deny + per-pod allow pattern.

Depends on ztwim-chart PR #5 which adds the NetworkPolicy templates to the wrapper chart. Until that PR merges, the values in this PR are silently ignored by Helm (no NetworkPolicies created).

Changes

  • Add overrides/values-ztwim-network-policy.yaml with per-pod rules for spire-server, OIDC discovery provider, SPIFFE CSI driver, and ZTWIM operator
  • Enable via extraValueFiles in values-hub.yaml for the ZTWIM application

Per-pod rules

Component Ingress Egress
spire-server 8081 gRPC (port-only — agents use hostNetwork), 8443 federation (router), 9443 webhook (port-only), 9402 metrics DNS (5353), K8s API (6443)
OIDC discovery provider 8443 HTTPS (router — serves JWKS for Vault and Keycloak) DNS (5353)
SPIFFE CSI driver DNS (5353)
ZTWIM operator 8443 metrics DNS (5353), K8s API (6443)

Not covered (by design): spire-agent uses hostNetwork: true + hostPID: true — Kubernetes NetworkPolicies do not apply to hostNetwork pods.

Test plan

  • Dry-run on OCP 4.21 — all policies applied directly via oc apply
  • Agent attestation (6/6 agents re-attested after restart)
  • OIDC discovery route (HTTP 200, JWKS keys returned)
  • Vault JWT auth (depends on SPIRE OIDC)
  • Keycloak SPIFFE IdP (depends on SPIRE OIDC)
  • qtodo full SPIFFE auth chain
  • Operator reconciliation (allReady=true)
  • Full end-to-end after ztwim-chart PR merges

🤖 Generated with Claude Code

Przemyslaw Roguski and others added 25 commits April 9, 2026 19:04
…ft.io/ingress: triggers OVN-K's special ACL handling for host-network traffic
…snwers on both an internal hostname (for back-channel) and an external hostname (for browser redirects)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@p-rog p-rog requested review from minmzzhang, mlorenzofr and sabre1041 and removed request for minmzzhang June 12, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant