security: root-only backup credentials, internal-only key feed, corrected cadence
This commit is contained in:
1 parent
d106f7cf01
commit
5ad233c612
3 files changed
+22
-14
No files matched your search
@@ -87,10 +87,15 @@ having failed.
|
|||||||
### Other mechanics
|
### Other mechanics
|
||||||
|
|
||||||
- Weekly `restic check` on Sundays (repo metadata); full data check monthly.
|
- Weekly `restic check` on Sundays (repo metadata); full data check monthly.
|
||||||
- The passphrase (`RESTIC_PASSWORD`) lives in `~/.hermes/.env` **and** the co-op
|
- Backup credentials (`RESTIC_PASSWORD`, `RESTIC_REPOSITORY`,
|
||||||
Vault. A backup whose key exists only on the backed-up box is not a backup.
|
`SWB_S3_ACCESS_KEY`, `SWB_S3_SECRET_KEY`) live in **root-only
|
||||||
- S3 credentials come from `SWB_S3_ACCESS_KEY` / `SWB_S3_SECRET_KEY` (mapped to
|
`/etc/agent-backup.env`** (0600) and in the co-op Vault — never in the
|
||||||
`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` in the script).
|
steward agent's `~/.hermes/.env`. The systemd timer runs as root; the agent
|
||||||
|
can run the backup but cannot read or delete its credentials.
|
||||||
|
- **Append-only is not configured.** The Swiss Backup S3 bucket has no object
|
||||||
|
lock / immutability policy enabled, so stolen S3 keys can still delete
|
||||||
|
snapshots. This remains an open item; the root-only split only reduces who
|
||||||
|
holds them.
|
||||||
|
|
||||||
## 2. Cloudron app backup
|
## 2. Cloudron app backup
|
||||||
|
|
||||||
|
|||||||
@@ -34,15 +34,18 @@ exposure window is bounded by how fast misuse would show.
|
|||||||
|
|
||||||
## What is in place instead (2026-11-05)
|
## What is in place instead (2026-11-05)
|
||||||
|
|
||||||
1. **Access logging on the route**: every fetch logs a WARNING line
|
1. **Internal-network restriction**: `/admin/librechat/keys` refuses any
|
||||||
`librechat key feed served: N member key(s) to <ip> (ua=…)`. Count only —
|
request whose last `X-Forwarded-For` hop is a public address (`403 Internal
|
||||||
never key material, never member emails (the portal's log redactor strips
|
network only`). A stolen sync token used from the internet no longer looks
|
||||||
emails anyway).
|
like the sandbox.
|
||||||
2. **Daily-digest watch** (cron job 95e5b8fece86, §7 anomaly list): the
|
2. **Access logging on the route**: every fetch logs a WARNING line
|
||||||
sandbox polls ~every 10 min (~144 serves/day expected). The digest counts
|
`librechat key feed served: N member key(s) to <ip>`. Count and client
|
||||||
`librechat key feed served` lines and flags (a) a rate far above that
|
address only — never key material, never member emails.
|
||||||
cadence, or (b) any 401 burst on the route — either is a suspected token
|
3. **Daily-digest watch** (cron job 95e5b8fece86, §7 anomaly list): the
|
||||||
misuse and becomes a decision item.
|
sandbox polls **every minute (~1,440/day) by design**; the old ~144/day
|
||||||
|
baseline was stale. The digest flags (a) a rate far above ~1/min, (b) any
|
||||||
|
401/ERROR burst, or (c) any `REFUSED for non-internal address` line —
|
||||||
|
either is suspected token misuse and becomes a decision item.
|
||||||
|
|
||||||
## What a real fix looks like (if ever needed)
|
## What a real fix looks like (if ever needed)
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ needed to restore are inside the thing being restored.
|
|||||||
the *secret* must be in hand before the window — get it from the Infomaniak console
|
the *secret* must be in hand before the window — get it from the Infomaniak console
|
||||||
and store it with the passphrase, off-box.
|
and store it with the passphrase, off-box.
|
||||||
- [x] The **restic** passphrase is safe: `~/.hermes/scripts/backup.sh` documents that
|
- [x] The **restic** passphrase is safe: `~/.hermes/scripts/backup.sh` documents that
|
||||||
`RESTIC_PASSWORD` lives in the agent host's `.env` **and** the co-op Vault. The agent
|
`RESTIC_PASSWORD` lives in root-only `/etc/agent-backup.env` **and** the co-op Vault. The agent
|
||||||
host is not being migrated, so the agent-side backup stays recoverable. (The Vault,
|
host is not being migrated, so the agent-side backup stays recoverable. (The Vault,
|
||||||
however, is an app on the box being migrated — so the Vault copy alone is not
|
however, is an app on the box being migrated — so the Vault copy alone is not
|
||||||
off-box until it is exported.)
|
off-box until it is exported.)
|
||||||
|
|||||||
Reference in new issue
Block a user