Which hardening measures are in v1 and which are deferred: NetworkPolicy baseline, Pod Security admission level, the Talos/k8s upgrade runbook, Kubernetes audit logging, and supply-chain checks (Flux commit-signature verification plus cosign image signing and admission-time verification)?
Context carried from the map: network policies (including ADR-0009's: :8081 reachable only by kubelet and the scraper, and default-deny egress for monitoring; ADR-0011 already pins the bots namespace's policy), pod security, node OS patching/upgrades (a manual talosctl runbook per ADR-0007), audit logging. Supply chain: Flux verifying commit signatures plus cosign image signing with admission-time verification, as one step (both guard against a compromised Gitea; deferred from ADR-0007).
Part of #44
## Question
Which hardening measures are in v1 and which are deferred: NetworkPolicy baseline, Pod Security admission level, the Talos/k8s upgrade runbook, Kubernetes audit logging, and supply-chain checks (Flux commit-signature verification plus cosign image signing and admission-time verification)?
**Context carried from the map:** network policies (including ADR-0009's: `:8081` reachable only by kubelet and the scraper, and default-deny egress for `monitoring`; ADR-0011 already pins the `bots` namespace's policy), pod security, node OS patching/upgrades (a manual `talosctl` runbook per ADR-0007), audit logging. Supply chain: Flux verifying commit signatures plus cosign image signing with admission-time verification, as one step (both guard against a compromised Gitea; deferred from ADR-0007).
From How does hAPI send notifications through ntfy? (ADR-0013): the NetworkPolicy baseline must allow egress to notify.bobbypalko.com:443 (Cilium toFQDNs) from hAPI's hapi notify deliver CronJob and the breakglass pod, and from Flux's notification-controller. vmalert's is already allowed by ADR-0009.
**From *How does hAPI send notifications through ntfy?* (ADR-0013):** the NetworkPolicy baseline must allow egress to notify.bobbypalko.com:443 (Cilium `toFQDNs`) from hAPI's `hapi notify deliver` CronJob and the breakglass pod, and from Flux's notification-controller. vmalert's is already allowed by ADR-0009.
From How are backups taken, and how do we recover from disaster? (ADR-0014): the NetworkPolicy baseline must allow the hapi db backup CronJob egress to the DB, to Linode Object Storage (us-iad endpoint, Cilium toFQDNs), to VictoriaLogs in monitoring (ingress on the monitoring side), and to Kuma for its push. The hapi db restore pod needs the DB and Object Storage. The hapi-db-backup secret is mounted only into the backup pod.
**From *How are backups taken, and how do we recover from disaster?* (ADR-0014):** the NetworkPolicy baseline must allow the `hapi db backup` CronJob egress to the DB, to Linode Object Storage (`us-iad` endpoint, Cilium `toFQDNs`), to VictoriaLogs in `monitoring` (ingress on the monitoring side), and to Kuma for its push. The `hapi db restore` pod needs the DB and Object Storage. The `hapi-db-backup` secret is mounted only into the backup pod.
bobby
self-assigned this 2026-11-27 15:46:19 -05:00
Recorded as ADR-0015 (amends ADR-0009 and ADR-0014; widens the glossary's Maintenance to the Household's digital systems).
Ships in v1
NetworkPolicy: default-deny for ingress and egress in every namespace we own, written as CiliumNetworkPolicy (toFQDNs for hosts, toCIDR for the DB). It includes the allows from ADR-0009/0011/0013/0014 and the comments above. kube-system stays open.
Pod Security: Talos's baseline stays the cluster default. Our namespaces enforce restricted. The Vector and node-exporter DaemonSets move to a separate privileged namespace, monitoring-node.
ValidatingAdmissionPolicy (built-in CEL, set to Deny): (1) images must come from Gitea's registry or be pinned by digest, everywhere except kube-system; (2) pods in hapi/bots must have a read-only root filesystem and no service-account token.
Kubernetes audit logging: Metadata level with the noise filtered out. Vector ships it to VictoriaLogs, kept 1 year and included in the audit/ export. A pods/exec or a Secret read by a human alerts the ntfy ops topic.
Upgrades: versions pinned in infra/, Renovate opens PRs and never merges. Security patches within 14 days, minor versions after .1. The runbook (docs/runbooks/cluster-upgrade.md, written during the build) is: throwaway etcd snapshot, then workers one at a time, then the control plane, then health checks. Reminder: a monthly Maintenance Task on a "hAPI cluster" Asset, which also carries "Rehearse disaster recovery".
Deferred to v2
Flux commit verification and cosign signing. Their keys would sit with the same Gitea and runner they're meant to guard against. Revisit once CI has an identity a compromised Gitea can't use. v1 instead relies on digest pins, the image-source rule, Trivy in CI, and branch protection on main.
Tetragon/Falco, Trivy Operator, CIS scanning, the Cilium host firewall, least-privilege kubeconfigs, and any CI check of policy coverage. etcd secret encryption is already on in Talos.
## Resolution
Recorded as [ADR-0015](https://git.bobbypalko.com/bobby/hapi/src/branch/main/docs/adr/0015-cluster-hardening-baseline.md) (amends ADR-0009 and ADR-0014; widens the glossary's **Maintenance** to the Household's digital systems).
**Ships in v1**
- **NetworkPolicy:** default-deny for ingress and egress in every namespace we own, written as CiliumNetworkPolicy (`toFQDNs` for hosts, `toCIDR` for the DB). It includes the allows from ADR-0009/0011/0013/0014 and the comments above. `kube-system` stays open.
- **Pod Security:** Talos's `baseline` stays the cluster default. Our namespaces enforce `restricted`. The Vector and node-exporter DaemonSets move to a separate `privileged` namespace, `monitoring-node`.
- **ValidatingAdmissionPolicy** (built-in CEL, set to Deny): (1) images must come from Gitea's registry or be pinned by digest, everywhere except `kube-system`; (2) pods in `hapi`/`bots` must have a read-only root filesystem and no service-account token.
- **Kubernetes audit logging:** Metadata level with the noise filtered out. Vector ships it to VictoriaLogs, kept 1 year and included in the `audit/` export. A `pods/exec` or a Secret read by a human alerts the ntfy `ops` topic.
- **Upgrades:** versions pinned in `infra/`, Renovate opens PRs and never merges. Security patches within 14 days, minor versions after `.1`. The runbook (`docs/runbooks/cluster-upgrade.md`, written during the build) is: throwaway etcd snapshot, then workers one at a time, then the control plane, then health checks. Reminder: a monthly Maintenance Task on a "hAPI cluster" Asset, which also carries "Rehearse disaster recovery".
**Deferred to v2**
- Flux commit verification and cosign signing. Their keys would sit with the same Gitea and runner they're meant to guard against. Revisit once CI has an identity a compromised Gitea can't use. v1 instead relies on digest pins, the image-source rule, Trivy in CI, and branch protection on `main`.
- Tetragon/Falco, Trivy Operator, CIS scanning, the Cilium host firewall, least-privilege kubeconfigs, and any CI check of policy coverage. etcd secret encryption is already on in Talos.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #44
Question
Which hardening measures are in v1 and which are deferred: NetworkPolicy baseline, Pod Security admission level, the Talos/k8s upgrade runbook, Kubernetes audit logging, and supply-chain checks (Flux commit-signature verification plus cosign image signing and admission-time verification)?
Context carried from the map: network policies (including ADR-0009's:
:8081reachable only by kubelet and the scraper, and default-deny egress formonitoring; ADR-0011 already pins thebotsnamespace's policy), pod security, node OS patching/upgrades (a manualtalosctlrunbook per ADR-0007), audit logging. Supply chain: Flux verifying commit signatures plus cosign image signing with admission-time verification, as one step (both guard against a compromised Gitea; deferred from ADR-0007).From How does hAPI send notifications through ntfy? (ADR-0013): the NetworkPolicy baseline must allow egress to notify.bobbypalko.com:443 (Cilium
toFQDNs) from hAPI'shapi notify deliverCronJob and the breakglass pod, and from Flux's notification-controller. vmalert's is already allowed by ADR-0009.From How are backups taken, and how do we recover from disaster? (ADR-0014): the NetworkPolicy baseline must allow the
hapi db backupCronJob egress to the DB, to Linode Object Storage (us-iadendpoint, CiliumtoFQDNs), to VictoriaLogs inmonitoring(ingress on the monitoring side), and to Kuma for its push. Thehapi db restorepod needs the DB and Object Storage. Thehapi-db-backupsecret is mounted only into the backup pod.Resolution
Recorded as ADR-0015 (amends ADR-0009 and ADR-0014; widens the glossary's Maintenance to the Household's digital systems).
Ships in v1
toFQDNsfor hosts,toCIDRfor the DB). It includes the allows from ADR-0009/0011/0013/0014 and the comments above.kube-systemstays open.baselinestays the cluster default. Our namespaces enforcerestricted. The Vector and node-exporter DaemonSets move to a separateprivilegednamespace,monitoring-node.kube-system; (2) pods inhapi/botsmust have a read-only root filesystem and no service-account token.audit/export. Apods/execor a Secret read by a human alerts the ntfyopstopic.infra/, Renovate opens PRs and never merges. Security patches within 14 days, minor versions after.1. The runbook (docs/runbooks/cluster-upgrade.md, written during the build) is: throwaway etcd snapshot, then workers one at a time, then the control plane, then health checks. Reminder: a monthly Maintenance Task on a "hAPI cluster" Asset, which also carries "Rehearse disaster recovery".Deferred to v2
main.