ProofedMesh/deploy/dummy-sink/40-networkpolicy.yaml
CTO 5d2bf73d84
Some checks failed
build-images / signing-service image (push) Successful in 23s
build-images / verification-service image (push) Successful in 48s
build-images / dummy-sink image (push) Successful in 49s
validate / JSON Schema (ajv) (push) Successful in 23s
validate / Rego (opa fmt + opa test) (push) Successful in 15s
phase1-smoke / Phase 1 end-to-end smoke (push) Successful in 1m0s
validate / DB (migrate up/down dry-run) (push) Successful in 24s
validate / Go (vet + test) (push) Has been cancelled
deploy: verification-service + dummy-sink Phase-1 manifests (DEV-615)
ServiceAccount, Deployment, Service, and NetworkPolicy per
sub-directory, matching the signing-service template (non-root,
read-only rootfs, distroless, agent-trust namespace).

verification-service — NetworkPolicy allows ingress only from
approval-service, testagent-transform, and dummy-sink, and egress
only to transparency-log, trust-pg, Pocket-ID JWKS (HTTPS/443),
and kube-dns.

dummy-sink — adds a 1Gi longhorn PVC `dummy-sink-data` mounted at
/data/dummy-sink, projected trust-api SA token at
/var/run/secrets/tokens/trust-api, Pocket-ID client creds from a
dev Secret, strategy Recreate (RWO PVC). NetworkPolicy allows
ingress from testagent-transform and egress to verification-service,
signing-service, transparency-log, HTTPS/443 (Pocket-ID OIDC), and
kube-dns.

build-images workflow — adds verification-service and dummy-sink
jobs mirroring signing-service's BuildKit + Harbor pipeline.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-25 21:09:14 +00:00

86 lines
2.6 KiB
YAML

# NetworkPolicy for dummy-sink.
#
# Cluster-wide NetworkPolicy enforcement is active on BasicStack (see
# cluster memory on NetworkPolicy activation). Pods in agent-trust
# without an explicit allow-list are isolated; this file is the
# explicit allow-list for dummy-sink per DEV-615.
#
# Ingress callers (per Phase-1 architecture V1.1 §7):
# - testagent-transform — the sole producer of handover deliveries.
#
# Egress reachable targets (Phase-1 §7 Senken-Vertrag):
# - verification-service — chain verification + replay guard.
# - signing-service — handover-attestation signing.
# - transparency-log — logging the signed handover envelope.
# - DNS — kube-dns for service name resolution.
#
# dummy-sink intentionally does NOT egress Pocket-ID directly; it uses
# the Pocket-ID OIDC endpoint via HTTPS/443 as the client_credentials
# source for its Bearer token to signing-service. That cluster-external
# target is included below.
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: dummy-sink
namespace: agent-trust
labels:
app.kubernetes.io/name: dummy-sink
app.kubernetes.io/part-of: proofedmesh
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: dummy-sink
policyTypes:
- Ingress
- Egress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: testagent-transform
ports:
- port: 8083
protocol: TCP
egress:
# verification-service (same namespace).
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: verification-service
ports:
- port: 8084
protocol: TCP
# signing-service (same namespace).
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: signing-service
ports:
- port: 8081
protocol: TCP
# transparency-log (same namespace, port 80 → container 8080).
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: transparency-log
ports:
- port: 8080
protocol: TCP
# Pocket-ID OIDC token exchange + JWKS — cluster-external HTTPS/443.
- ports:
- port: 443
protocol: TCP
# DNS egress to kube-dns.
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP