hub (unreleased): the end dates of the hub's own public names are read once a day; 14 days before, the operator is told (D85, R-1379)
The names are the setting HUB_OWN_NAMES; with no setting the hub makes no call. The setting is NOT in the manifest yet. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
c616727d84
commit
c72ecf52b4
8 files changed
+616
-5
No files matched your search
@@ -822,7 +822,7 @@ another date or new names each hour. **Not proven:** on a box or a deployed hub;
|
||||
|
||||
| End date (block) | Who knows the date today | Could the product read it? | Proposed |
|
||||
|---|---|---|---|
|
||||
| The hub address's certificate, and the download, ISO, Gitea and website names (DH20) | anybody: readable from outside with no login | yes — the hub can open a TLS connection to its own five names once a day | **build next:** the same checker, a third source. Small. Not built tonight: it is a call from the hub to outside names, and the name list needs the operator's yes |
|
||||
| The hub address's certificate, and the download, ISO, Gitea and website names (DH20) | anybody: readable from outside with no login | yes — the hub can open a TLS connection to its own five names once a day | **BUILT, not released (2026-11-15; D85, `09` §3 decision 310): §12.3** |
|
||||
| A node's Tailscale key (DH30) | the Tailscale admin page; one date is in `operations/tailscale.md` | not from a box (the service does not run on two of three) | the operator's list |
|
||||
| The package signing keys (DB16) | measured: the soonest key in use ends 2029-01-15 | yes, by the root wrapper's facts read | no warning now; read again in the yearly end-dates pass |
|
||||
| The 30-day restore copy (DB24) | the box (the copy's own date) | yes | not an alarm: a page fact. The household's restore page shows the date already; nothing for the operator |
|
||||
@@ -835,3 +835,38 @@ another date or new names each hour. **Not proven:** on a box or a deployed hub;
|
||||
**A third source that is small and was left out on purpose:** the hub's own five public names (first row). It needs
|
||||
no secret, and its cost is one outbound connection a day; it waits for a yes because tonight's brief forbids outside
|
||||
calls and the list of names is a promise about what the hub watches.
|
||||
|
||||
### 12.3 The hub's own public names `[FACT — built, not released: hub `main` after v0.182.0, 2026-11-15]` (D85, `09` §3 decision 310, R-1379)
|
||||
|
||||
Once a day (06:40 Budapest, the daily job `own-names-check`) the hub opens one TLS connection to each of its own
|
||||
public names and reads the end date of the certificate that is served (`monitor.OwnNameChecker`). The third source
|
||||
beside an operator token and a box's web certificate; the same 14 days.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| The names | **the setting `HUB_OWN_NAMES`** (the hub's manifest), never code and never a box's word: `host` or `host:port`, at most 16; an entry that is not a plain host name is refused and named in the start log. **No setting → no call.** The operator's list (D85): the hub address, the download address, the ISO address, the Gitea address, the website |
|
||||
| 14 days before the end | `hub_name_cert_ends_soon`, warning, operator-only, once per name; the text names the name, the days and the day |
|
||||
| The date passed and the certificate is still served | the same event once more, as an error |
|
||||
| A renewal | nothing to clear: the renewed certificate has a later date and is told only when that one comes near |
|
||||
| **A name that does not answer** | its OWN line, `hub_name_unreachable` (warning, operator-only, once while it lasts; `hub_name_reachable` clears it). **Never an end-date alarm:** „did not answer” says nothing about the certificate |
|
||||
| The run was skipped (the hub was down at 06:40) | the daily ledger tells it at the next start (`hub_daily_job_skipped`, `05` §16.6) |
|
||||
| Two names the same day | two mails: the cooldown is per name |
|
||||
| The read | no chain check, on purpose: a certificate that has ENDED must still give its date. Nothing is trusted from the connection and nothing is sent over it |
|
||||
|
||||
**For the release (not done tonight — no manifest change, no outside call):** add to `manifests/hub.yaml`, with the
|
||||
image tag, the lines
|
||||
|
||||
```
|
||||
- name: HUB_OWN_NAMES
|
||||
value: "hub.felhom.eu,files.felhom.eu,iso.felhom.eu,gitea.dooplex.hu,felhom.eu"
|
||||
```
|
||||
|
||||
and read the start line „own-names check: 5 name(s) are read daily…”. The five names are CC's reading of the list in
|
||||
the end-dates evidence (`audits/end-dates-list-2026-11-11/`, DH20: the hub, the download, the ISO, Gitea, the
|
||||
website); **the operator confirms the five at the deploy.** From inside the cluster the hub's own address may answer
|
||||
from the LAN side — the certificate is the same one.
|
||||
|
||||
**Not proven:** on a deployed hub; no outside name was read. Tests with a real TLS server on the test machine and with
|
||||
a certificate that has ended (`TestOwnNames_*`, `TestD85_*`); 18 mutations seen red
|
||||
(`audits/build-release-4-2026-11-15/C/redproof-hub-own-names.txt`).
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
== MUTATION: the warning comes at 7 days, not 14
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_WarnsOncePerNameFourteenDaysBefore (0.00s)
|
||||
own_names_test.go:78: want one warning for each of the two near names, got 1: [hub_name_cert_ends_soon|warning||hub|The certificate of the hub's own name iso.example.test ends in 3 day(s), on 2026-11-18. It renews by itself about
|
||||
--- FAIL: TestOwnNames_TheLineIsFourteenDays (0.00s)
|
||||
own_names_test.go:109: not told at 14 days: []
|
||||
== MUTATION: the same certificate is told at every run
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_WarnsOncePerNameFourteenDaysBefore (0.00s)
|
||||
own_names_test.go:94: the same certificate was told again the next day: [hub_name_cert_ends_soon|warning||hub|The certificate of the hub's own name hub.example.test ends in 13 day(s), on 2026-11-28. It renews by itself about 30 da
|
||||
== MUTATION: an ended certificate stays a warning
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_EndedIsAnErrorAndARenewalIsNewNews (0.00s)
|
||||
own_names_test.go:123: want one warning then one error for the ended certificate: [hub_name_cert_ends_soon|warning||hub|The certificate of the hub's own name a.example.test ends in 5 day(s), on 2026-11-20. It renews by itself abou
|
||||
== MUTATION: a renewed certificate near its own end is never told again
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_EndedIsAnErrorAndARenewalIsNewNews (0.00s)
|
||||
own_names_test.go:133: the renewed certificate's own end was not told: [hub_name_cert_ends_soon|warning||hub|The certificate of the hub's own name a.example.test ends in 5 day(s), on 2026-11-20. It renews by itself about 30 days b
|
||||
== MUTATION: a name that does not answer raises the end-date alarm
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_ANameThatDoesNotAnswerIsNotAnEndDateAlarm (0.00s)
|
||||
own_names_test.go:146: want ONE unreachable line for two runs, got 0: [hub_name_cert_ends_soon|warning||hub|The hub could not read the certificate of its own name down.example.test today: the name did not answer a TLS connection f
|
||||
== MUTATION: the unreachable line is told at every run
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_ANameThatDoesNotAnswerIsNotAnEndDateAlarm (0.00s)
|
||||
own_names_test.go:146: want ONE unreachable line for two runs, got 2: [hub_name_unreachable|warning||hub|The hub could not read the certificate of its own name down.example.test today: the name did not answer a TLS connection from
|
||||
== MUTATION: a dead name stops the names after it
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_ANameThatDoesNotAnswerIsNotAnEndDateAlarm (0.00s)
|
||||
own_names_test.go:154: the name after the dead one was not read: [hub_name_unreachable|warning||hub|The hub could not read the certificate of its own name down.example.test today: the name did not answer a TLS connection from the
|
||||
== MUTATION: the recovery keeps the unreachable mark
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_ANameThatDoesNotAnswerIsNotAnEndDateAlarm (0.00s)
|
||||
own_names_test.go:162: the recovery was not told once, or its mark stayed: events [hub_name_unreachable|warning||hub|The hub could not read the certificate of its own name down.example.test today: the name did not answer a TLS con
|
||||
== MUTATION: any text in the setting is dialled
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_OnlyPlainHostNamesFromTheSettingAreDialled (0.00s)
|
||||
own_names_test.go:176: names = ["hub.example.test" "iso.example.test:8443" "https://evil.example/x" "a..b" "user@host" "10.0.0.1"]
|
||||
== MUTATION: the list has no cap
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_OnlyPlainHostNamesFromTheSettingAreDialled (0.00s)
|
||||
own_names_test.go:191: the list is not capped at 16: 17 names, 0 refused
|
||||
== MUTATION: a name with a port is dialled on 443
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_OnlyPlainHostNamesFromTheSettingAreDialled (0.00s)
|
||||
own_names_test.go:187: dialled ["hub.example.test:443|hub.example.test" "iso.example.test:443|iso.example.test" "10.0.0.1:443|10.0.0.1"]
|
||||
== MUTATION: the read verifies the chain (an ended certificate gives no date)
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_DialCertEndReadsTheServedDate_AlsoOfAnEndedCertificate (0.02s)
|
||||
own_names_test.go:226: served end 2026-11-24 13:34:53 +0000 UTC, read 0001-01-01 00:00:00 +0000 UTC (err tls: failed to verify certificate: x509: certificate signed by unknown authority)
|
||||
== MUTATION: the read gives the time of the read, not the certificate's end
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestOwnNames_DialCertEndReadsTheServedDate_AlsoOfAnEndedCertificate (0.00s)
|
||||
own_names_test.go:226: served end 2026-11-24 13:34:56 +0000 UTC, read 2026-08-26 13:34:56 +0000 UTC (err <nil>)
|
||||
|
||||
13 mutations, 0 not a red-proof
|
||||
|
||||
## the wiring
|
||||
== MUTATION: the ledger does not watch the own-names job
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD85_MainWiresTheOwnNamesCheck (0.00s)
|
||||
d85_wiring_test.go:28: main.go: want exactly one "\"deadline-check\", \"offsite-key-audit\", ownNamesJob)", found 0
|
||||
== MUTATION: the names are a list in code
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD85_MainWiresTheOwnNamesCheck (0.00s)
|
||||
d85_wiring_test.go:28: main.go: want exactly one "monitor.ParseOwnNames(os.Getenv(\"HUB_OWN_NAMES\"))", found 0
|
||||
d85_wiring_test.go:34: main.go names hub.felhom.eu in code — the list of own names must come from the setting
|
||||
== MUTATION: the job is never started
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD85_MainWiresTheOwnNamesCheck (0.00s)
|
||||
d85_wiring_test.go:28: main.go: want exactly one "go scheduleDaily(ctx, ownNamesJob, \"06:40\", ownNames.CheckOnce, logger)", found 0
|
||||
d85_wiring_test.go:40: the own-names job is not started inside the branch that has names — an empty setting would start it
|
||||
|
||||
3 mutations, 0 not a red-proof
|
||||
== MUTATION: the end-date event of a hub name can reach a household
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD85_TheEventsAreOperatorOnlyAndPerName (0.00s)
|
||||
d85_wiring_test.go:48: hub_name_cert_ends_soon is not operator-only: a household could get a mail about the hub's own names
|
||||
== MUTATION: two names of one day share one cooldown
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestD85_TheEventsAreOperatorOnlyAndPerName (0.00s)
|
||||
d85_wiring_test.go:51: hub_name_cert_ends_soon has no per-name cooldown: the second name of the same day would be suppressed and never told again
|
||||
d85_wiring_test.go:51: hub_name_unreachable has no per-name cooldown: the second name of the same day would be suppressed and never told again
|
||||
d85_wiring_test.go:51: hub_name_reachable has no per-name cooldown: the second name of the same day would be suppressed and never told again
|
||||
|
||||
2 mutations, 0 not a red-proof
|
||||
Reference in new issue
Block a user