Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ recipient-state: ## Record which age recipients can open the secrets, and when e
@# Reads the recipient list out of the encrypted file's own metadata and
@# writes one series per recipient into the textfile dir, carrying every
@# existing proof timestamp forward and setting none. Needs no key: the
@# `sops:` block is plaintext. This is what SecretsKeyBackupUnproven reads;
@# without it a host that proved its key before ADR-0024 has no series and
@# the ninety-day nag is silent. secrets-verify-backup is what sets a proof.
@# `sops:` block is plaintext. No alert reads it since ADR-0120; it is the
@# recipient list remove-recipient.sh checks against. secrets-verify-backup
@# is what sets a proof.
./scripts/key-recipients.sh --record --stack $(STACK)

.PHONY: ca-key-state
Expand Down Expand Up @@ -741,15 +741,11 @@ secrets-verify-backup: ## Check a backup age key decrypts the secrets (KEY=/path
printf 'See docs/runbooks/back-up-the-age-key.md\n' >&2; \
exit 2; \
}
@# Wrapped, even though a human runs it, and that is the whole point of #77.
@# This is the one job that cannot be put on a timer — verify-key-backup.sh
@# refuses the live key by device:inode precisely so that what gets tested is
@# a copy on removable media, and no timer can mount that. So the schedule is
@# enforced from the other end: a successful run records its timestamp, and
@# SecretsKeyBackupUnproven fires when that proof passes ninety days old.
@# Nagging is not as good as running it, but it beats remembering.
@# STACK=sensitive records verify-key-backup-sensitive, trinity's row in
@# install-timers.sh: a job name may be declared on one host only.
@# Optional since ADR-0120: run it when you want to know a copy of the key
@# still opens the secrets. Nothing waits for it and no alert fires if it
@# is never run. verify-key-backup.sh refuses the live key by device:inode,
@# so what gets tested is a copy. Wrapped so the run is still recorded;
@# STACK=sensitive records it as verify-key-backup-sensitive.
./scripts/run-scheduled.sh --job verify-key-backup$(if $(filter sensitive,$(STACK)),-sensitive) --lock keys \
-- ./scripts/verify-key-backup.sh "$(KEY)" $(STACK)

Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ documents for different readers.
can't run an agent (firewall, switch, UPS, iLO). One agent config, deployed
identically everywhere. [How](docs/architecture.md#observability-data-flow)
- **Dashboards and alerting as code.** 8 provisioned dashboards, 156 panels, and
185 alert rules — 164 metric-based in Prometheus, 21 log-based in Loki — sharing
183 alert rules — 162 metric-based in Prometheus, 21 log-based in Loki — sharing
one Alertmanager routing tree. No dashboard exists only in a database.
- **Secrets encrypted in-repo with SOPS + age.** Per-device credentials,
decrypted at deploy time into gitignored paths, with `git log` showing which
Expand Down Expand Up @@ -136,7 +136,7 @@ documents for different readers.
at all. Every pinned digest is also scanned weekly for fixable HIGH and
CRITICAL CVEs, and each image with findings has an open issue until a scan
finds it clean.
- **Documented decisions and runbooks.** 119 ADRs covering what was chosen
- **Documented decisions and runbooks.** 120 ADRs covering what was chosen
and what was rejected — including the costs accepted knowingly; 55
runbooks for the operations that are easy to get wrong at 1am, one of which
is the handover page a successor reads first. Every critical alert links to
Expand Down Expand Up @@ -207,7 +207,7 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology
.
├── stacks/
│ ├── observability/ # the estate's stack on prometheus — ten services
│ │ ├── prometheus/ # config, file_sd targets, 164 alert rules
│ │ ├── prometheus/ # config, file_sd targets, 162 alert rules
│ │ ├── alertmanager/ # routing and inhibition
│ │ ├── loki/ # single-binary config + 21 LogQL rules
│ │ ├── alloy/ # the agent config directory, shipped to every host
Expand Down Expand Up @@ -236,7 +236,7 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology
│ ├── architecture.md network.md hardware.md
│ ├── observability.md security.md roadmap.md changelog.md
│ ├── diagrams/ # the network diagram (SVG) and its predecessors
│ ├── adr/ # 119 ADRs — architecture decision records
│ ├── adr/ # 120 ADRs — architecture decision records
│ ├── exercises/ # purple-team exercise records — see its README
│ └── runbooks/ # 55 runbooks; successor-handover.md is the front door
└── Makefile # make help
Expand Down Expand Up @@ -320,9 +320,11 @@ $ make help
The timers are what stop `backup`, `backup-firewall`, `snmp-verify` and now
deployment itself being things someone has to remember, and the alert rules that come with them fire on a
job having *stopped being run* rather than only on one that failed
([#77](https://github.com/Gerrrt/HomeLab/issues/77)). One job deliberately has no
timer: `secrets-verify-backup` needs a human to mount removable media, so it gets
a ninety-day deadline and an alert instead. See
([#77](https://github.com/Gerrrt/HomeLab/issues/77)). The human proofs that need
removable media, such as `certs-verify-backup`, have no timer and get a
ninety-day deadline and an alert instead. `secrets-verify-backup` is optional
and has no deadline
([ADR-0120](docs/adr/0120-drop-the-age-key-proof-deadline.md)). See
[`docs/runbooks/schedule-maintenance.md`](docs/runbooks/schedule-maintenance.md).

## Dashboards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
**Status:** Accepted · 2026-09

> [!NOTE]
> **No proof deadline, 2026-11-20.**
> [ADR-0120](0120-drop-the-age-key-proof-deadline.md) removes part 3's
> ninety-day deadline and `SecretsKeyBackupUnproven`. Proving a copy is
> optional and still recorded per recipient. Parts 1 and 2 are unchanged.
>
> **The second recipient also opens the household's copy, 2026-10-01.**
> [ADR-0073](0073-carry-the-household-copy-on-a-drive-the-holder-keeps.md)
> adds it to `stacks/sensitive/household.recipients` as the fallback behind
Expand Down
58 changes: 58 additions & 0 deletions docs/adr/0120-drop-the-age-key-proof-deadline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ADR-0120: Drop the age-key proof deadline

**Status:** Accepted · 2026-11 · amends [ADR-0024](0024-hold-a-second-age-recipient-and-prove-each-one-separately.md)

## Context

[ADR-0024](0024-hold-a-second-age-recipient-and-prove-each-one-separately.md)
part 3 gave every age recipient its own ninety-day proof. A human mounts an
offline copy of the key, runs `make secrets-verify-backup`, and
`SecretsKeyBackupUnproven` fires for any recipient whose last proof is older
than that. `SecretsKeyRecipientsUnrecorded` was added later (#400) for a host
that declared the deadline and had no per-recipient series. #1501 extended the
deadline to `trinity` as `verify-key-backup-sensitive`.

Neither key has ever been proved on `trinity`, and the operator does not
intend to start. A trinity audit on 2026-11-20 raised the proofs again. The
operator's position is that recurring offline and off-site key drills are too
much for a home lab. They also rule out bringing in anyone outside the family
as a technical second to hold or check a copy. An alert that is never acted on is noise, and it trains
the operator to ignore the channel the real alerts arrive on.

## Decision

**The age-key proof has no deadline and no alert.**

- `verify-key-backup` leaves `JOBS` and `verify-key-backup-sensitive` leaves
`SENSITIVE_JOBS` in `scripts/install-timers.sh`.
- `SecretsKeyBackupUnproven` and `SecretsKeyRecipientsUnrecorded` are removed
from `backup.rules.yaml`, with their tests.
- The Glance maintenance page stops listing the age-key proof.
- `ScheduledJobStale`, `ScheduledJobStaleCritical` and `ScheduledJobNeverRan`
skip both names. A host whose `homelab-jobs.prom` predates this change then
stays quiet until `make install-timers` rewrites it. `ScheduledJobFailed`
skips them too: a failed optional check is on the screen of whoever ran it.

**`make secrets-verify-backup` stays, as an optional check.** It still proves
that a copy opens the secrets, and it still records which recipient was
checked. Nothing waits for it.

**`recipient-state` stays.** It still writes `key-recipients.prom` daily.
`remove-recipient.sh` reads the recipient list from that file, and keeping it
current costs nothing.

**Unchanged:** ADR-0024 parts 1 and 2 (the second recipient, and how one is
added) and `check_sops_rules.py`'s rule that a stack guarding data has two
recipients. The CA key's proof (`CaKeyBackupUnproven`, ADR-0043), the off-site
copy (`OffsiteCopyStale`, ADR-0048) and the household copy
(`HouseholdCopyStale`, ADR-0073) are also unchanged. Each has its own deadline
and is a separate decision.

## Consequences

- A lost or corrupted offline key copy is found only when someone goes to use
it. The operator accepts that.
- One reason for `recipient-state` is gone. The timer stays for the file it
writes.
- Proving a copy is still possible and is still recorded, so a later decision
to bring the deadline back is a timer row and a rule, not new tooling.
23 changes: 23 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ roadmap as it read that day, and the *Done* entries keep the shape they had
there. `check_docs.py` does not check this file, for the reason its module
docstring gives: it is a record, not a claim about now.

## 2026-11-20

- **The age-key proof has no deadline and no alert.**
[ADR-0120](adr/0120-drop-the-age-key-proof-deadline.md) amends ADR-0024 part
3. `SecretsKeyBackupUnproven` and `SecretsKeyRecipientsUnrecorded` are
removed with their tests, which takes the Prometheus rules from 164 to 162.
`verify-key-backup` and `verify-key-backup-sensitive` leave `install-timers.sh`'s
tables, and the Glance maintenance page stops listing them.
- **Optional.** `make secrets-verify-backup` still checks a copy and records
which recipient it checked.
- **Kept.** `recipient-state` still writes `key-recipients.prom` daily, for
`remove-recipient.sh`.
- **Old declarations stay quiet.** The stale-job rules,
`ScheduledJobNeverRan` and `ScheduledJobFailed` skip both names. A host whose `homelab-jobs.prom`
predates this change is therefore quiet until `make install-timers`
rewrites the file.
- **Unchanged.** The CA key, off-site and household deadlines.
- **#671 closes.** Its remaining step was proving the lab key's second
recipient. Its section, *Saruman: the domain, then the SOC*, leaves the
roadmap empty.
- **This reverses part of the 2026-11-14 entry.** That entry added
`verify-key-backup-sensitive` (#1501). The row is gone again.

## 2026-11-19

- **`phoenix`'s own way in is closed: `sshd` takes keys only, and `ufw` is
Expand Down
Loading