All checks were successful
build-images / signing-service image (push) Successful in 26s
build-images / verification-service image (push) Successful in 27s
phase1-smoke / Phase 1 end-to-end smoke (push) Successful in 1m2s
build-images / approval-service image (push) Successful in 27s
build-images / dummy-sink image (push) Successful in 26s
validate / JSON Schema (ajv) (push) Successful in 21s
validate / Rego (opa fmt + opa test) (push) Successful in 15s
validate / DB (migrate up/down dry-run) (push) Successful in 27s
validate / Go (vet + test) (push) Successful in 1m22s
The Phase-1 NetworkPolicy from DEV-614 allowed ingress only from the `pangolin` namespace, under the mistaken assumption that Traefik runs there. In this cluster Traefik lives in `kube-system`; Pangolin only renders the Traefik dynamic config and does not sit in the request path. The policy therefore blocked external calls to `approval.proofedmesh.basicstack.de`, which 502'd at Traefik. Point the ingress rule at `kube-system/app.kubernetes.io/name=traefik` and update the inline comment to match reality. Verified: `curl -sS https://approval.proofedmesh.basicstack.de/healthz` → `{"status":"ok"}` (HTTP 200, LetsEncrypt cert via Traefik ACME). Co-Authored-By: Paperclip <noreply@paperclip.ing>
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
# NetworkPolicy for approval-service.
|
|
#
|
|
# Cluster-wide NetworkPolicy enforcement is already active on BasicStack
|
|
# (see cluster memory on NetworkPolicy activation). Any pod in agent-trust
|
|
# without a policy is isolated by default; this file is the explicit
|
|
# allow-list for approval-service.
|
|
#
|
|
# Ingress: only from the Pangolin ingress edge (public traffic terminates
|
|
# at Pangolin/Traefik; nothing in-cluster calls approval-service
|
|
# directly in Phase 1).
|
|
# Egress: signing-service (:8081) + transparency-log (:8080) in
|
|
# agent-trust, Pocket-ID (:1411) for OIDC discovery/JWKS, DNS, and (once
|
|
# trust-pg lands) a Postgres :5432 egress to trust-pg in agent-trust.
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: approval-service
|
|
namespace: agent-trust
|
|
labels:
|
|
app.kubernetes.io/name: approval-service
|
|
app.kubernetes.io/part-of: proofedmesh
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: approval-service
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|
|
ingress:
|
|
# Public traffic reaches approval-service via the Pangolin resource,
|
|
# but the actual TCP connection is made by the Traefik ingress pod
|
|
# in kube-system (Pangolin only renders the Traefik config; it does
|
|
# not sit in the request path). Keep this list conservative — add
|
|
# additional callers on demand, not speculatively.
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: kube-system
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: traefik
|
|
ports:
|
|
- port: 8080
|
|
protocol: TCP
|
|
egress:
|
|
# signing-service (ADR-0005 signer) + transparency-log (Trillian frontend)
|
|
# live in the same agent-trust namespace; future trust-pg will too.
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: agent-trust
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: signing-service
|
|
ports:
|
|
- port: 8081
|
|
protocol: TCP
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: agent-trust
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: transparency-log
|
|
ports:
|
|
- port: 8080
|
|
protocol: TCP
|
|
# Future trust-pg Postgres egress — pre-authorised here so the pod
|
|
# does not need a NetworkPolicy edit when DEV-607's prod store lands.
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: agent-trust
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: trust-pg
|
|
ports:
|
|
- port: 5432
|
|
protocol: TCP
|
|
# Pocket-ID for OIDC discovery + token endpoint.
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: pocket-id
|
|
podSelector:
|
|
matchLabels:
|
|
app: pocket-id
|
|
ports:
|
|
- port: 1411
|
|
protocol: TCP
|
|
# DNS egress to kube-system CoreDNS.
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: kube-system
|
|
podSelector:
|
|
matchLabels:
|
|
k8s-app: kube-dns
|
|
ports:
|
|
- port: 53
|
|
protocol: UDP
|
|
- port: 53
|
|
protocol: TCP
|