Asset renames (matching the new Nextcloud source naming convention — doc name first, then description): - architecture-trust-depth.svg -> architecture-overview-trust-depth.svg - firewall-docker-bypass.svg -> firewall-and-network-docker-bypass.svg - secrets-lifecycle.svg -> secrets-and-pki-lifecycle.svg - trust-boundaries-blast-radius.svg -> readme-trust-boundaries-blast-radius.svg Updated all 4 markdown references accordingly. Also refreshed diagram exports (secret-distribution-flows.svg, and the 4 renamed ones) with today's fixes, and folded in the earlier pending sso-and-identity.md work: precise live-verified native-OIDC app list (12 apps, not ~9), the Proxmox no-Proxy-Provider exception, real API evidence for it, and the automation-bot migration story.
11 KiB
📐 Architecture Overview
Note
Most homelabs have one trust boundary: "inside the LAN = trusted." This one has four, each calibrated to a different actual risk level rather than applying maximum security everywhere or none anywhere — that calibration is the hardest and most interesting decision in the whole architecture, and the rest of this doc builds out from it.
| 11 fleet hosts |
4 trust boundaries |
3 routing authorities |
8 traffic laws |
The hardest decision: how many trust boundaries is enough?
The easy answers are both wrong. One boundary ("you're on the LAN, you're trusted") is what most self-hosted setups actually run, and it means a single compromised container can reach everything else with no further resistance. Maximum boundaries everywhere (mTLS on every single connection, no exceptions) sounds safer but isn't free — every hop gets slower, every service needs its own client certificate lifecycle, and the operational burden of that is exactly the kind of complexity that gets quietly disabled under deadline pressure, which is worse than never having built it.
The actual answer here is four boundaries, each doing a different job:
| Boundary | Who's on the other end | Control | Why this control, not another |
|---|---|---|---|
| 🔴 WAN → edge | Anyone on the internet | Public reverse proxy, firewall-filtered | The only boundary facing genuinely untrusted traffic — gets the strictest, most isolated treatment |
| 🔵 Browsers → user-facing proxy | A human, on a device that could be compromised, phished, or simply lost | Mutual TLS (client cert required) + SSO | The highest-value target for credential theft — a stolen password alone isn't enough without the client cert too |
| 🟢 App-to-app | A container that's already inside the network, already provisioned by the same pipeline as everything else | IP-allowlist + SSO fallback, no mTLS | Full mTLS here would mean managing certificate lifecycle for every internal service-to-service call — real overhead for traffic that's already constrained to known, provisioned sources. The risk profile doesn't justify the same control as human-operated browsers. |
| 🟡 LAN infra-to-infra | Non-HTTP traffic — metrics, logs, NTP, agent reporting | Explicit per-flow firewall rule, no proxy at all | Can't go through a reverse proxy — it isn't HTTP. The firewall itself is the only layer that can enforce this one. |
Every boundary above only means something if a service can't just skip it by reading the wrong header: backend services trust proxy headers, never the raw client IP. If that weren't true, the mTLS/SSO enforcement happening at the proxy layer would be theater — anything downstream could just claim to be a trusted IP and walk straight through. The proxy is the only thing allowed an opinion on who a client really is.
Three separate routing authorities enforce these — the edge firewall, the user-facing proxy, and the internal proxy zone — rather than one central router handling everything. That's a deliberate rejection of the simpler single-router design: one router is one thing to hardening-focus on and one thing that takes everything down if it's compromised or misconfigured.
What actually happens when one fails
Not a hypothetical — this is the real, deliberate payoff of splitting routing authority three ways instead of one:
| If this fails... | ❌ Affected | ✅ Unaffected |
|---|---|---|
| Edge firewall | All public/WAN access | Everything internal — browsers, app-to-app, infra traffic all keep working |
| User-facing proxy | Every human browser session | Public access, all app-to-app traffic, all infra traffic |
| Internal proxy zone | App-to-app service calls | Public access, human browser sessions, infra traffic (it doesn't route through here at all) |
A single-router design fails this test completely — one outage, one misconfiguration, everything goes dark at once. Three independent authorities mean the worst case for any one failure is "a third of the traffic types stop," never all of them.
Important
None of this existed at once — it hardened in stages, each one closing whatever soft spot the last stage left standing.
The first fix was structural: the public reverse proxy used to run as its own dedicated VM, a whole extra host sitting in the public-ingress path for no reason beyond history. Folding HAProxy directly into the edge firewall as a package collapsed that hop away entirely — one less host that could be the reason the public path went down.
The second fix was conceptual, and the bigger one: for a long time the app-to-app boundary simply didn't exist. Internal service traffic crossed a flat, unauthenticated mesh network — anything on it could reach anything else on it, no proxy, no identity check, nothing. That's exactly the "you're on the network, you're trusted" pattern this document opens by calling the easy, wrong answer. Replacing it with the two-zone model in
docs/dns-naming.mdis what gave app-to-app traffic a real boundary for the first time.The third fix found the same flaw hiding somewhere less obvious: plain LAN-to-LAN traffic — metrics, logs, NTP, agent reporting — still had a blanket allow at the firewall, even after the app-to-app zone had its own identity-checked proxy. Any host could reach any other host; the only thing standing between "one compromised container" and "everything else on the LAN" was whatever that individual host's own firewall happened to be configured to do, which is a coin flip, not a boundary. Closing it meant giving up "it just works" for LAN infra traffic and writing an explicit rule for every flow that's actually supposed to exist — the same trade this document makes everywhere else: a boundary only counts if crossing it takes a decision, not an accident of network topology.
Three different places, the same failure mode, the same fix each time — that's not a coincidence, it's what happens when you actually go looking for where "trusted by default" is still hiding.
That third fix isn't just a claim — it's the actual live ruleset:
See the rest of the actual pfSense configuration
WAN — only three things pass inbound, everything else default-deny:
LAN — fleet observability and security-agent reporting, one explicit rule per flow:
LAN — the Ansible SSH fan-out (one explicit rule per host, sourced from the automation host only), plus the application-integration rules sitting right below it:
LAN — the built-in anti-lockout rule, at the top of the list by necessity:
The aliases behind all of the above — named per host/role, not raw IPs scattered through every rule:
The other six traffic laws
Each of these gets its own full mechanism doc elsewhere in this repo — this table is the map, not the territory:
| # | Law | Failure behavior |
|---|---|---|
| 3. Secrets | Applications never talk to Vault directly — one hop through a local agent only. See docs/secrets-and-pki.md. |
Vault down → secret renewal stops, services run until their current token expires. No immediate disruption. |
| 4. DNS | Which internal zone a hostname resolves in determines which trust boundary (above) a request enters. See docs/dns-naming.md. |
DNS down → app-to-app resolution fails; a direct-IP fallback exists, and it bypasses the SSO gate — but only for traffic already coming from an IP on the trusted allowlist. Anything else still hits Authentik regardless of DNS. |
| 5. Observability | Logs and metrics push asynchronously — never inline with application traffic, full stop. See docs/observability.md and docs/security-monitoring.md. |
Monitoring down → collection stops; every application service keeps running, completely unaffected. |
| 6. Notifications | Two independent branches (message-queue and HTTP webhook) converge on one formatter; neither is part of any service's runtime dependency chain. See docs/notifications.md. |
Notification delivery is event-driven, not persistent inline execution — a failure here doesn't touch application traffic either way. |
| 7. CI/CD | Build/deploy traffic never sits inline with runtime; schedule-triggered, not push-triggered. See docs/registry-and-build.md. |
A failed deploy doesn't affect already-running services — enforced by the redeploy step's own rollback logic. |
| 8. Management | Administrative access is its own separate plane — one dedicated identity, non-standard ports, explicit per-host firewall rules from one source only. | Management access down → administration unavailable; every running service is completely unaffected. |
The pattern repeats across all eight laws, not just the trust-boundary story above: control-plane failure never takes down the data plane. Every "failure behavior" row above ends the same way — the thing that broke stops working, and everything else keeps running regardless. That's not a coincidence; it's the same design principle applied consistently everywhere, not just to network trust.
What this map deliberately excludes
Not a firewall rule listing, not a port inventory, not a service configuration reference — those live in docs/firewall-and-network.md and the docs linked in the table above. This is strictly the stable, directional shape of how trust and traffic actually move — meant to still be true even after the specific tools implementing it change again, the way it already has three times.
Related: docs/firewall-and-network.md, docs/dns-naming.md, docs/secrets-and-pki.md, docs/notifications.md, docs/registry-and-build.md







