| 01-federation-mesh-hardening |
20 |
infra |
| tor |
| doctor |
| shell |
| mesh |
| permissions |
|
| phase |
provides |
| 01-federation-mesh-hardening |
scripts/container-doctor.sh's fix_* convention and the archipelago-doctor.timer (OnUnitActiveSec=5min) that drives it |
|
|
| A permission predicate that tests the property that matters (group/other denied) instead of exact-matching one octal string |
| A 30-minute Tor restart backoff, so a restart storm is structurally impossible even if some future condition makes the fix fire repeatedly |
|
|
| added |
patterns |
|
|
| Assert the property, not the representation: `2700` and `700` both deny group and other, which is the security property. Exact-matching the string `700` turned Tor's own setgid bit into a permanent false positive. |
| Pair a predicate fix with a rate limit: the predicate stops today's loop, the backoff stops the whole class of loop. One is a fix, both is a guarantee. |
|
|
| created |
modified |
|
|
| scripts/container-doctor.sh |
|
|
| Compare the low three digits of `stat -c '%a'` rather than the whole string, so both `700` and `2700` read as correct while `750`, `707` and `2755` are still corrected. |
| The 'already correct' path logs at debug level only. The original defect was invisible precisely because 'Fixed permissions on … (2700 -> 700)' looked like the doctor working — a healthy node should stay quiet. |
| Backoff state lives in `/var/lib/archipelago/doctor-tor-last-restart` with a 1800s window, and non-numeric/missing content reads as 0 so a corrupt state file fails open into 'restart allowed' rather than wedging the fix permanently. |
|
|
| id |
description |
requirement |
verification |
human_judgment |
| D1 |
The doctor no longer restarts Tor on every run — Tor uptime grows past the doctor's 5-minute interval |
FED-09 |
| kind |
ref |
status |
| manual_procedural |
archi-dev-box 2026-08-02: tor@default active since 2026-08-01 15:25:45 — 15+ hours continuous, spanning ~180 doctor intervals |
pass |
|
|
false |
|
| id |
description |
requirement |
verification |
human_judgment |
| D2 |
A hidden-service directory at Tor's own 2700 is recognised as correct — no chmod, no restart |
FED-09 |
| kind |
ref |
status |
| other |
Predicate exercised directly on tmpdirs: 2700 -> low3=700 -> ACCEPTED; 700 -> ACCEPTED |
pass |
|
| kind |
ref |
status |
| manual_procedural |
archi-dev-box: zero 'Fixed permissions … hidden_service' lines across 542 doctor log entries in 6 hours |
pass |
|
|
false |
|
| id |
description |
requirement |
verification |
human_judgment |
| D3 |
A genuinely insecure directory (group/other readable) is still corrected |
FED-09 |
| kind |
ref |
status |
| other |
Predicate exercised on 750, 707 and 2755 — all three fall through to the corrective chmod |
pass |
|
|
false |
|
| id |
description |
requirement |
verification |
human_judgment |
| D4 |
Even on a real fix, Tor cannot be restarted more than once per backoff window |
FED-09 |
| kind |
ref |
status |
| other |
TOR_RESTART_BACKOFF_SECONDS=1800 gates the restart against TOR_RESTART_STATE_FILE; non-numeric state reads as 0 |
pass |
|
|
false |
|
| id |
description |
requirement |
verification |
human_judgment |
| D5 |
Tor retains its consensus/HSDir cache long enough to resolve .onion addresses |
FED-09 |
| kind |
ref |
status |
| manual_procedural |
Post-OTA checkpoint on an affected node — NOT RUN (see below). 15h of unbroken Tor uptime on archi-dev-box is the necessary precondition and is met. |
deferred |
|
|
true |
|
|
30min |
2026-08-02 |
complete-pending-post-ota-checkpoint |