security: document bot-scoped steward access and key-only operator root
Rewrite the host-access runbook for the installed model: ubuntu may sudo into the bot accounts and run the docs/backup allowlist but has no root; operator holds NOPASSWD:ALL via its own SSH key; root SSH stays closed. Record the closed backup root path, the silent watchdog, verification commands, safe-mode recovery, and rollback. Update the fleet and backup pages to match.
This commit is contained in:
1 parent
f63096d4dc
commit
cd5960f62d
4 files changed
+154
-27
No files matched your search
@@ -12,7 +12,7 @@ mistake — they do not back each other up, and neither one covers the other's h
|
||||
| Target | Infomaniak **Swiss Backup** (S3-compatible) | Infomaniak **Swiss Backup** (S3-compatible, `s3-v4-compat`) |
|
||||
| Schedule | 04:30 UTC + up to 5 min jitter (`agent-backup.timer`) | daily 23:00 UTC (`00 00 23 * * *`) |
|
||||
| Retention | 7 daily / 4 weekly / 3 monthly, no grouping | 7 days (`keepWithinSecs: 604800`) |
|
||||
| Config lives | `~/.hermes/scripts/backup.sh`, unit at `/etc/systemd/system/agent-backup.*` | Cloudron dashboard (no write API — see below) |
|
||||
| Config lives | installed as `/usr/local/sbin/agent-backup` (root-owned) from `~/.hermes/scripts/backup.sh`; unit at `/etc/systemd/system/agent-backup.*` | Cloudron dashboard (no write API — see below) |
|
||||
| Last verified | 2026-11-04 (13 snapshots in the repo) | 2026-11-02 (runs 2026-10-30 → 11-03 all `normal`, ~5.4 GB) |
|
||||
|
||||
Nothing on the Cloudron **host OS** is backed up by either system (netplan, sshd,
|
||||
@@ -23,7 +23,8 @@ it. This was the migration's central caveat and it still holds.
|
||||
|
||||
## 1. Agent-host backup (restic)
|
||||
|
||||
`agent-backup.timer` → `agent-backup.service` → `~/.hermes/scripts/backup.sh`.
|
||||
`agent-backup.timer` → `agent-backup.service` → `/usr/local/sbin/agent-backup`,
|
||||
a root-owned installed copy of `~/.hermes/scripts/backup.sh`.
|
||||
|
||||
- **The unit runs as `User=root` on purpose.** The agent homes under `/home/*`
|
||||
are mode `0700`, so only root can enumerate them; `ubuntu` sees `EACCES` and a
|
||||
@@ -41,6 +42,12 @@ it. This was the migration's central caveat and it still holds.
|
||||
- **Failure is visible, not silent.** On failure the script appends a note to
|
||||
`~/.hermes/cron/updates_notes.jsonl`, which the daily stewarding digest reads.
|
||||
Exit codes: 0 ok, 1 config, 2 backup, 3 prune.
|
||||
- **Root trust.** The installed copy runs with root-owned `restic`, does not put
|
||||
`/home/ubuntu/.local/bin` on `PATH`, and does not source
|
||||
`/home/ubuntu/.hermes/.env`. Credentials come only from root-only
|
||||
`/etc/agent-backup.env`, so no agent-writable file is executed as root.
|
||||
Verified 2026-11-21: `check_root_trust.py` is silent and a manual timer run
|
||||
completed with `backup: ok`.
|
||||
|
||||
### Deliberate-but-surprising: the PER-USER restic cache split
|
||||
|
||||
|
||||
Reference in new issue
Block a user