Enterprise Security Layer β Defense in Depth
Security is not a single tool β it is layered. This platform implements defense in depth: each layer assumes the previous one can be bypassed, so multiple independent controls must all fail before an attacker reaches a critical asset.
Defense in Depth Modelβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LAYER 7 β GOVERNANCE & COMPLIANCE β
β kube-bench (CIS) β API Audit Logs β OpenMetadata PII tags β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 6 β SUPPLY CHAIN β
β Cosign image signing β SBOM generation β Trivy CVE scan β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 5 β RUNTIME SECURITY β
β Falco (anomaly detection) β Seccomp β AppArmor profiles β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 4 β POLICY ENFORCEMENT β
β OPA / Gatekeeper (admission control) β NetworkPolicy (Cilium) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 3 β SECRETS MANAGEMENT β
β Vault (dynamic credentials) β External Secrets Operator β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 2 β AUTHORIZATION β
β Kubernetes RBAC β OPA policies β Authentik roles β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 1 β AUTHENTICATION β
β Authentik SSO / OIDC β Service accounts β mTLS (Cilium) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β LAYER 0 β HOST PERIMETER β
β
β UFW (deny all inbound) β Tailscale mesh β Cloudflare Tunnel β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Security Components Mapβ
| Component | Layer | What It Does |
|---|---|---|
| UFW | Host perimeter | Default-deny firewall on controller; blocks MAAS/Squid from public internet β |
| Cloudflare Tunnel | Host perimeter | Public apps via Cloudflare β home IP never exposed to internet β |
| Tailscale | Host perimeter | WireGuard mesh VPN β all admin access encrypted and authenticated β |
| Authentik | Identity | Single sign-on for all platform UIs; OIDC/OAuth2 + forward-auth provider (Phase 23 β ) |
| OPA / Gatekeeper | Policy | Admission controller β blocks non-compliant workloads at deploy time |
| Falco | Runtime | Detects anomalous container behavior (e.g., shell in container, file read) |
| Cosign + SBOM | Supply chain | Signs images; generates bill of materials; blocks unsigned images |
| kube-bench | Compliance | Runs CIS Kubernetes benchmark; scores cluster hardening |
| Vault | Secrets | Already in Phase 15 β dynamic DB passwords, PKI, secret injection |
| Cilium | Network | Already in Phase 22 β eBPF NetworkPolicy + mTLS between pods |
What Each Layer Stopsβ
ATTACK STOPPED BY
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Direct scan of home IP Cloudflare Tunnel hides real IP for *.devandre.sbs
MAAS/Squid exposed on IPv6 UFW default-deny: both ports now blocked
Unauthenticated admin access Tailscale: all admin paths require VPN membership
Compromised admin credentials Authentik MFA + short-lived tokens
Privilege escalation in pod OPA: no privileged containers
Image with known CVEs Trivy scan in CI (Phase 13)
Unsigned / tampered image Cosign policy in Gatekeeper
Shell spawned in running pod Falco alert + auto-kill
Data exfiltration via DNS Cilium NetworkPolicy (egress deny)
Lateral movement between pods Cilium NetworkPolicy (namespace isolation)
Leaked DB password in config Vault: dynamic credentials, no static secrets
CIS benchmark failures kube-bench + remediation runbook
PII data accessed by wrong team OPA row-level + OpenMetadata PII tags
Platform Security Contactsβ
Each team owns the security of their namespace. Platform security team owns:
| Area | Contact / Runbook |
|---|---|
| SSO / identity incidents | Platform team β Authentik admin (https://auth.10.0.0.200.nip.io) |
| Active intrusion (Falco alert) | On-call β incident runbook |
| CVE in production image | Dev team β patch + redeploy within SLA |
| Compliance audit | Platform team β kube-bench report |
Security Scanning Pipeline (CI/CD Integration)β
git push
β
GitLab CI build stage
β
Trivy scan (CRITICAL exit-code 1)
β
Cosign sign image (if scan passes)
β
Syft SBOM attach to image
β
Harbor stores image + SBOM + signature
β
Gatekeeper admission check (signature required)
β
Deploy to cluster
Quick Security Health Checkβ
# Check Falco alerts in last hour
kubectl logs -n falco daemonset/falco --since=1h | grep -E "WARNING|CRITICAL"
# Check Gatekeeper constraint violations
kubectl get constraintviolations -A
# Check kube-bench score
kubectl logs -n kube-bench job/kube-bench | tail -20
# Check for privileged pods (should be 0)
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].securityContext.privileged == true) | .metadata.name'
# Check for pods with no resource limits
kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].resources.limits == null) | .metadata.name'
Done Whenβ
β UFW enabled on controller β MAAS and Squid blocked from public internet (2026-06-21 β
)
β Cloudflare Tunnel β home IP hidden for all *.devandre.sbs traffic (Phase 25 β
)
β Tailscale β all admin access via WireGuard mesh (Phase 3 β
)
β Authentik SSO active β apps on SSO (Phase 23 β
); MAAS deferred
β OPA Gatekeeper blocking privileged / no-resource-limit pods
β Falco alerting on shell-in-container and unexpected file access
β All production images signed with Cosign + SBOM attached
β kube-bench score β₯ 80% on all CIS checks
β Zero static DB passwords in Kubernetes secrets (all via Vault)
β NetworkPolicy isolating namespaces (Cilium)