OpenGov isolates public traffic, identity administration, background scanning, and persistent secrets across clear runtime boundaries. Each boundary below names what the platform enforces and what the deployment operator owns.
Network and container boundaries
| Boundary | What the platform enforces | What the operator owns |
|---|---|---|
| Public ingress vs containers | Zero host-published ports in docker-compose.yml. Reverse proxy routes 80 and 443 only. | Terminate TLS with valid certificates and set OPENGOV_TRUSTED_PROXIES. |
| Login admin console | Traefik labels refuse /admin on login.<base> with HTTP 403. | Reach admin console only through an authenticated SSH tunnel. |
| Virus scanner isolation | clamav runs with network_mode: none and reads a Unix socket only. | Place the signature rule file on the host and monitor freshclam updates. |
| Internal metrics listeners | App and worker bind :9100 internally. The SPA router excludes /metrics. | Restrict Docker network access so external callers never reach :9100. |
Identity and request boundaries
| Boundary | What the platform enforces |
|---|---|
| Dual-realm separation | Staff use realm opengov. Applicants use opengov-applicants with separate issuer and audience checks. |
| Bearer-only API auth | APIs accept OIDC bearer tokens only and reject cookie-based authentication. |
| Pre-auth body ceiling | RequestBodyCeiling rejects oversized bodies (413) before body read or token checks. |
| Strict table ownership | Static CI gate (table_access_guard.py) blocks cross-module SQL table queries. |
Secret and key custody boundaries
Secrets in deployments/<code>/secrets.env are SOPS-encrypted with age keys. At provisioning time, Coolify-tier operational secrets go to the deployment control plane. Out-of-band KEK-tier keys (OPENGOV_ENCRYPTION_KEY, OPENGOV_VAULT_KEK_V*, OPENGOV_ANON_HASH_SALT, OPENGOV_WM_BLIND_INDEX_KEY) never enter Coolify or database backups. See Environment Variables Reference for every variable’s tier.